diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bdaa29a2..559cbc0a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ set(EIGEN3_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/eigen") include_directories(${EIGEN3_INCLUDE_DIR}) # Add the version of GMM in the repository to the include pathes -set(GMMXX_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/gmm-4.2/include") +set(GMMXX_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/gmm-5.0/include") include_directories(${GMMXX_INCLUDE_DIR}) ############################################################# diff --git a/resources/3rdparty/gmm-4.2/missing b/resources/3rdparty/gmm-4.2/missing deleted file mode 100755 index 86a8fc31e..000000000 --- a/resources/3rdparty/gmm-4.2/missing +++ /dev/null @@ -1,331 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2012-01-06.13; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009, 2010, 2011, 2012 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 - 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. - ;; - - *) - 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 - ;; - - *) - 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/resources/3rdparty/gmm-4.2/tests/Makefile.in b/resources/3rdparty/gmm-4.2/tests/Makefile.in deleted file mode 100644 index 7fbee6dc4..000000000 --- a/resources/3rdparty/gmm-4.2/tests/Makefile.in +++ /dev/null @@ -1,598 +0,0 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ -check_PROGRAMS = dummy$(EXEEXT) -subdir = tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(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.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am_dummy_OBJECTS = dummy.$(OBJEXT) -dummy_OBJECTS = $(am_dummy_OBJECTS) -dummy_LDADD = $(LDADD) -dummy_DEPENDENCIES = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -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) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(dummy_SOURCES) -DIST_SOURCES = $(dummy_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@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILDDATE = @BUILDDATE@ -BUILDER = @BUILDER@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CONFIGURE_ARGS = @CONFIGURE_ARGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -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@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -LIBTOOL_VERSION_INFO = @LIBTOOL_VERSION_INFO@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -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@ -SUPLDFLAGS = @SUPLDFLAGS@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -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@ -localedir = @localedir@ -localstatedir = @localstatedir@ -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@ -dummy_SOURCES = dummy.cc -INCLUDES = -I$(top_srcdir)/include -I../include -LDADD = -lm @SUPLDFLAGS@ -TESTS = $(top_srcdir)/tests/make_gmm_test.pl -EXTRA_DIST = \ - make_gmm_test.pl\ - gmm_torture01_lusolve.cc\ - gmm_torture02_baseop.cc\ - gmm_torture05_mult.cc\ - gmm_torture06_mat_mult.cc\ - gmm_torture10_qr.cc\ - gmm_torture15_sub.cc\ - gmm_torture20_iterative_solvers.cc - -CLEANFILES = toto.mat ii_files/* auto_gmm* -TESTS_ENVIRONMENT = perl -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) --gnu tests/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu 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-checkPROGRAMS: - @list='$(check_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 -dummy$(EXEEXT): $(dummy_OBJECTS) $(dummy_DEPENDENCIES) $(EXTRA_dummy_DEPENDENCIES) - @rm -f dummy$(EXEEXT) - $(CXXLINK) $(dummy_OBJECTS) $(dummy_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Po@am__quote@ - -.cc.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@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@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@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@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@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 - -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 \ - col="$$grn"; \ - else \ - col="$$red"; \ - fi; \ - echo "$${col}$$dashes$${std}"; \ - echo "$${col}$$banner$${std}"; \ - test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ - test -z "$$report" || echo "$${col}$$report$${std}"; \ - echo "$${col}$$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_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -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: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -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-checkPROGRAMS clean-generic clean-libtool \ - 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-checkPROGRAMS clean-generic clean-libtool 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 - - -# 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/resources/3rdparty/gmm-4.2/AUTHORS b/resources/3rdparty/gmm-5.0/AUTHORS similarity index 100% rename from resources/3rdparty/gmm-4.2/AUTHORS rename to resources/3rdparty/gmm-5.0/AUTHORS diff --git a/resources/3rdparty/gmm-4.2/COPYING b/resources/3rdparty/gmm-5.0/COPYING similarity index 100% rename from resources/3rdparty/gmm-4.2/COPYING rename to resources/3rdparty/gmm-5.0/COPYING diff --git a/resources/3rdparty/gmm-4.2/ChangeLog b/resources/3rdparty/gmm-5.0/ChangeLog similarity index 100% rename from resources/3rdparty/gmm-4.2/ChangeLog rename to resources/3rdparty/gmm-5.0/ChangeLog diff --git a/resources/3rdparty/gmm-4.2/INSTALL b/resources/3rdparty/gmm-5.0/INSTALL similarity index 97% rename from resources/3rdparty/gmm-4.2/INSTALL rename to resources/3rdparty/gmm-5.0/INSTALL index a1e89e18a..209984075 100644 --- a/resources/3rdparty/gmm-4.2/INSTALL +++ b/resources/3rdparty/gmm-5.0/INSTALL @@ -1,7 +1,7 @@ Installation Instructions ************************* -Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, @@ -12,8 +12,8 @@ without warranty of any kind. Basic Installation ================== - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented @@ -309,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== @@ -367,4 +368,3 @@ operates. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - diff --git a/resources/3rdparty/gmm-4.2/Makefile.am b/resources/3rdparty/gmm-5.0/Makefile.am similarity index 100% rename from resources/3rdparty/gmm-4.2/Makefile.am rename to resources/3rdparty/gmm-5.0/Makefile.am diff --git a/resources/3rdparty/gmm-4.2/Makefile.in b/resources/3rdparty/gmm-5.0/Makefile.in similarity index 71% rename from resources/3rdparty/gmm-4.2/Makefile.in rename to resources/3rdparty/gmm-5.0/Makefile.in index ac31b2314..58b277eb4 100644 --- a/resources/3rdparty/gmm-4.2/Makefile.in +++ b/resources/3rdparty/gmm-5.0/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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. @@ -15,6 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,16 +78,16 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/gmm-config.in $(top_srcdir)/configure AUTHORS \ - COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \ - install-sh ltmain.sh missing +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(srcdir)/gmm-config.in COPYING compile \ + config.guess config.sub install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(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.in + $(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 \ @@ -52,22 +96,62 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = gmm-config CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = 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_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-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 \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac 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 +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) @@ -78,6 +162,7 @@ am__remove_distdir = \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -105,12 +190,14 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -279,8 +366,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -305,22 +392,25 @@ 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; \ +# 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. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -335,57 +425,12 @@ $(RECURSIVE_TARGETS): $(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: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -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) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -401,12 +446,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) 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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -418,15 +458,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) 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; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -435,9 +471,31 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -473,13 +531,10 @@ distdir: $(DISTFILES) 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 \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -508,40 +563,42 @@ distdir: $(DISTFILES) || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) + $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_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 @@ -552,8 +609,6 @@ distcheck: dist 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.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ @@ -565,18 +620,19 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(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" \ + && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -599,7 +655,7 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_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' @@ -735,24 +791,24 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - 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-lzip dist-lzma dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean 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-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 +.MAKE: $(am__recursive_targets) all install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean 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-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-am uninstall \ + uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/resources/3rdparty/gmm-4.2/NEWS b/resources/3rdparty/gmm-5.0/NEWS similarity index 100% rename from resources/3rdparty/gmm-4.2/NEWS rename to resources/3rdparty/gmm-5.0/NEWS diff --git a/resources/3rdparty/gmm-4.2/README b/resources/3rdparty/gmm-5.0/README similarity index 100% rename from resources/3rdparty/gmm-4.2/README rename to resources/3rdparty/gmm-5.0/README diff --git a/resources/3rdparty/gmm-4.2/aclocal.m4 b/resources/3rdparty/gmm-5.0/aclocal.m4 similarity index 60% rename from resources/3rdparty/gmm-4.2/aclocal.m4 rename to resources/3rdparty/gmm-5.0/aclocal.m4 index 2dd8f06fb..690af8997 100644 --- a/resources/3rdparty/gmm-4.2/aclocal.m4 +++ b/resources/3rdparty/gmm-5.0/aclocal.m4 @@ -1,8 +1,7 @@ -# generated automatically by aclocal 1.11.3 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. @@ -12,33 +11,31 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. 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'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 2002-2013 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_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' +[am__api_version='1.14' 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.3], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -54,24 +51,22 @@ m4_define([_AM_AUTOCONF_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.3])dnl +[AM_AUTOMAKE_VERSION([1.14.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, 2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 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 - # 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/../..'. +# $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 @@ -90,7 +85,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # # 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 +# 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, @@ -116,22 +111,19 @@ 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. +# Copyright (C) 1997-2013 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_PREREQ([2.52])dnl + m4_if([$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 @@ -150,16 +142,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, -# 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 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 12 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# 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 @@ -169,7 +159,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # 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 @@ -182,12 +172,13 @@ 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=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" 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], @@ -195,8 +186,8 @@ AC_CACHE_CHECK([dependency style of $depcc], # 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'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -236,16 +227,16 @@ AC_CACHE_CHECK([dependency style of $depcc], : > 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 + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > 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" + # 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 + # 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 @@ -254,8 +245,8 @@ AC_CACHE_CHECK([dependency style of $depcc], test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # 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 @@ -263,7 +254,7 @@ AC_CACHE_CHECK([dependency style of $depcc], fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # 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} @@ -311,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# 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 @@ -321,9 +312,13 @@ 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]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' @@ -338,20 +333,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 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 + # Older Autoconf 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 @@ -364,7 +357,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # 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 + # 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. @@ -376,21 +369,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # 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 + 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 + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -408,7 +399,7 @@ AC_DEFUN([_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 +# 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], @@ -418,18 +409,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # 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. +# Copyright (C) 1996-2013 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. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -442,7 +436,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # 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 +[AC_PREREQ([2.65])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 @@ -471,31 +465,40 @@ 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_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +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_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [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 +[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) +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 +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl @@ -506,34 +509,78 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_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 + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_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 + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_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_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])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_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro 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 +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) + +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. @@ -555,15 +602,12 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, -# Inc. +# Copyright (C) 2001-2013 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_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -577,16 +621,14 @@ if test x"${install_sh}" != xset; then install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 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], @@ -602,14 +644,12 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 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. @@ -627,7 +667,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# 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 @@ -654,15 +694,12 @@ 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. +# Copyright (C) 1997-2013 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], @@ -670,11 +707,10 @@ AC_DEFUN([AM_MISSING_PROG], $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. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, 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 @@ -687,54 +723,22 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006, 2011 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_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, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 2001-2013 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_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], @@ -744,7 +748,7 @@ AC_DEFUN([_AM_MANGLE_OPTION], # -------------------- # 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)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ @@ -758,24 +762,82 @@ AC_DEFUN([_AM_SET_OPTIONS], 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) 1999-2013 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_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 2001-2013 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_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-2013 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_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=' @@ -786,32 +848,40 @@ case `pwd` in esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# 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 - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + 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 + 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 + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -821,46 +891,118 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 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], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +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 +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 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 +# 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 +# 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 +# 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'. +# 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, 2010 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 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 3 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -874,18 +1016,16 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 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'. +# 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 @@ -895,76 +1035,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # 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. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} 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. + +# We'll 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 +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + 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 - # 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]) + # 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 - 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_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 diff --git a/resources/3rdparty/gmm-5.0/compile b/resources/3rdparty/gmm-5.0/compile new file mode 100755 index 000000000..531136b06 --- /dev/null +++ b/resources/3rdparty/gmm-5.0/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# 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. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# 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/resources/3rdparty/gmm-4.2/config.guess b/resources/3rdparty/gmm-5.0/config.guess similarity index 92% rename from resources/3rdparty/gmm-4.2/config.guess rename to resources/3rdparty/gmm-5.0/config.guess index d622a44e5..b79252d6b 100755 --- a/resources/3rdparty/gmm-4.2/config.guess +++ b/resources/3rdparty/gmm-5.0/config.guess @@ -1,14 +1,12 @@ #! /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, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2013-06-10' # 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 +# 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 @@ -22,19 +20,17 @@ timestamp='2012-02-10' # 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. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# 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. +# Originally written by Per Bothner. # # 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 +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ 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, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 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." @@ -138,6 +132,27 @@ 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 +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -801,6 +820,9 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; @@ -852,21 +874,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`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 + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +901,54 @@ EOF 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} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${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 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 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}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +967,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} 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 ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1201,6 +1227,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1227,19 +1256,21 @@ EOF 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 + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + 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 + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1256,7 +1287,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1330,9 +1361,6 @@ EOF 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 < header file. */ #undef HAVE_DLFCN_H diff --git a/resources/3rdparty/gmm-4.2/config.sub b/resources/3rdparty/gmm-5.0/config.sub similarity index 94% rename from resources/3rdparty/gmm-4.2/config.sub rename to resources/3rdparty/gmm-5.0/config.sub index c894da455..9633db704 100755 --- a/resources/3rdparty/gmm-4.2/config.sub +++ b/resources/3rdparty/gmm-5.0/config.sub @@ -1,24 +1,18 @@ #! /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, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2013-08-10' -# 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 +# 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 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. +# 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 . @@ -26,11 +20,12 @@ timestamp='2012-02-10' # 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. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ 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, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 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." @@ -123,7 +116,7 @@ esac 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* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) @@ -156,7 +149,7 @@ case $os in -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) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -225,6 +218,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -253,10 +252,12 @@ case $basic_machine in | 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 \ - | be32 | be64 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -267,7 +268,7 @@ case $basic_machine in | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -285,16 +286,17 @@ case $basic_machine in | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ - | or32 \ + | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ @@ -364,13 +366,13 @@ case $basic_machine in | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -383,7 +385,8 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -401,12 +404,13 @@ case $basic_machine in | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ @@ -782,11 +786,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -822,7 +830,7 @@ case $basic_machine in basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1013,7 +1021,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1340,21 +1352,21 @@ case $os in -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* \ + | -sym* | -kopensolaris* | -plan9* \ | -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* \ + | -bitrig* | -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* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1486,9 +1498,6 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1537,6 +1546,12 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1577,6 +1592,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or1k-*) + os=-elf + ;; or32-*) os=-coff ;; diff --git a/resources/3rdparty/gmm-4.2/configure b/resources/3rdparty/gmm-5.0/configure similarity index 97% rename from resources/3rdparty/gmm-4.2/configure rename to resources/3rdparty/gmm-5.0/configure index 22bc05abc..f4cff78f2 100755 --- a/resources/3rdparty/gmm-4.2/configure +++ b/resources/3rdparty/gmm-5.0/configure @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. +# Generated by GNU Autoconf 2.69 for gmm 5.0. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # 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. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} 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 @@ -167,7 +190,8 @@ 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" +test x\$exitcode = x0 || exit 1 +test -x / || 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'\" && @@ -220,21 +244,25 @@ 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. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # 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. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -336,6 +364,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -457,6 +493,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits 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; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # 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). @@ -491,16 +531,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... 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'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -512,28 +552,8 @@ else 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 +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -565,12 +585,12 @@ MFLAGS= MAKEFLAGS= # Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= +PACKAGE_NAME='gmm' +PACKAGE_TARNAME='gmm' +PACKAGE_VERSION='5.0' +PACKAGE_STRING='gmm 5.0' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ @@ -672,6 +692,10 @@ CPPFLAGS LDFLAGS CXXFLAGS CXX +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -736,6 +760,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_silent_rules enable_dependency_tracking enable_static enable_shared @@ -798,7 +823,7 @@ sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' @@ -1213,8 +1238,6 @@ target=$target_alias 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 @@ -1300,7 +1323,7 @@ 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 this package to adapt to many kinds of systems. +\`configure' configures gmm 5.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1348,7 +1371,7 @@ Fine tuning of the installation directories: --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/PACKAGE] + --docdir=DIR documentation root [DATAROOTDIR/doc/gmm] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1369,15 +1392,21 @@ _ACEOF fi if test -n "$ac_init_help"; then - + case $ac_init_help in + short | recursive ) echo "Configuration of gmm 5.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] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --enable-static[=PKGS] build static libraries [default=yes] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] @@ -1472,10 +1501,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -configure -generated by GNU Autoconf 2.68 +gmm configure 5.0 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1626,7 +1655,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1849,7 +1878,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1958,8 +1987,8 @@ 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 $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by gmm $as_me 5.0, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2305,13 +2334,13 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` PACKAGE="gmm" -MAJOR_VERSION="4" -MINOR_VERSION="2" +MAJOR_VERSION="5" +MINOR_VERSION="0" VERSION=$MAJOR_VERSION.$MINOR_VERSION echo "configuring $PACKAGE $VERSION..." -am__api_version='1.11' +am__api_version='1.14' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2379,7 +2408,7 @@ case $as_dir/ in #(( # 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 as_fn_executable_p "$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. @@ -2437,9 +2466,6 @@ 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=' @@ -2450,32 +2476,40 @@ case `pwd` in esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# 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 - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + 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 + 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 + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -2487,6 +2521,16 @@ Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -2499,12 +2543,12 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " 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;} + { $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 @@ -2516,10 +2560,10 @@ if test x"${install_sh}" != xset; then esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# 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. +# 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. @@ -2538,7 +2582,7 @@ 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 as_fn_executable_p "$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 @@ -2578,7 +2622,7 @@ 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 as_fn_executable_p "$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 @@ -2629,7 +2673,7 @@ do 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 + as_fn_executable_p "$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) '* | \ @@ -2658,12 +2702,6 @@ 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. @@ -2682,7 +2720,7 @@ 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 as_fn_executable_p "$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 @@ -2746,6 +2784,45 @@ else fi rmdir .tst 2>/dev/null +# 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=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -2767,8 +2844,8 @@ fi # Define the identity of the package. - PACKAGE=$PACKAGE - VERSION=$VERSION + PACKAGE='gmm' + VERSION='5.0' cat >>confdefs.h <<_ACEOF @@ -2796,12 +2873,22 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -2809,6 +2896,48 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + USER_CXXFLAGS="$CXXFLAGS" ac_ext=cpp @@ -2839,7 +2968,7 @@ 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 as_fn_executable_p "$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 @@ -2883,7 +3012,7 @@ 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 as_fn_executable_p "$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 @@ -3336,7 +3465,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# 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 @@ -3392,8 +3521,8 @@ else # 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'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -3428,16 +3557,16 @@ else : > 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 + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > 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" + # 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 + # 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 @@ -3446,8 +3575,8 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # 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 @@ -3455,7 +3584,7 @@ else fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # 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} @@ -3983,7 +4112,7 @@ 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 as_fn_executable_p "$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 @@ -4023,7 +4152,7 @@ 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 as_fn_executable_p "$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 @@ -4076,7 +4205,7 @@ 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 as_fn_executable_p "$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 @@ -4117,7 +4246,7 @@ 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 as_fn_executable_p "$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 @@ -4175,7 +4304,7 @@ 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 as_fn_executable_p "$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 @@ -4219,7 +4348,7 @@ 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 as_fn_executable_p "$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 @@ -4415,8 +4544,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* 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); @@ -4501,6 +4629,65 @@ 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_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 whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +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 + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -4512,8 +4699,8 @@ else # 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'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -4548,16 +4735,16 @@ else : > 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 + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > 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" + # 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 + # 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 @@ -4566,8 +4753,8 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # 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 @@ -4575,7 +4762,7 @@ else fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # 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} @@ -4651,7 +4838,7 @@ do 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 + as_fn_executable_p "$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 @@ -4727,7 +4914,7 @@ do 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 + as_fn_executable_p "$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 @@ -4793,7 +4980,7 @@ do 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 + as_fn_executable_p "$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 @@ -4860,7 +5047,7 @@ do 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 + as_fn_executable_p "$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 @@ -5116,7 +5303,7 @@ 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 as_fn_executable_p "$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 @@ -5160,7 +5347,7 @@ 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 as_fn_executable_p "$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 @@ -5349,7 +5536,8 @@ else ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$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 @@ -5584,7 +5772,7 @@ 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 as_fn_executable_p "$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 @@ -5624,7 +5812,7 @@ 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 as_fn_executable_p "$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 @@ -5750,10 +5938,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -5792,7 +5976,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -5930,7 +6114,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5970,7 +6154,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6073,7 +6257,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6117,7 +6301,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6242,7 +6426,7 @@ 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 as_fn_executable_p "$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 @@ -6282,7 +6466,7 @@ 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 as_fn_executable_p "$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 @@ -6341,7 +6525,7 @@ 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 as_fn_executable_p "$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 @@ -6381,7 +6565,7 @@ 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 as_fn_executable_p "$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 @@ -6874,7 +7058,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -6890,9 +7074,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -6911,7 +7105,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -7031,7 +7228,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7071,7 +7268,7 @@ 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7151,7 +7348,7 @@ 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 as_fn_executable_p "$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 @@ -7191,7 +7388,7 @@ 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 as_fn_executable_p "$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 @@ -7243,7 +7440,7 @@ 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 as_fn_executable_p "$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 @@ -7283,7 +7480,7 @@ 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 as_fn_executable_p "$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 @@ -7335,7 +7532,7 @@ 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 as_fn_executable_p "$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 @@ -7375,7 +7572,7 @@ 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 as_fn_executable_p "$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 @@ -7427,7 +7624,7 @@ 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 as_fn_executable_p "$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 @@ -7467,7 +7664,7 @@ 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 as_fn_executable_p "$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 @@ -7519,7 +7716,7 @@ 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 as_fn_executable_p "$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 @@ -7559,7 +7756,7 @@ 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 as_fn_executable_p "$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 @@ -8699,7 +8896,7 @@ lt_prog_compiler_static= lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -10869,17 +11066,6 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - 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 - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no @@ -10996,7 +11182,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no @@ -12819,9 +13005,6 @@ fi ld_shlibs_CXX=yes ;; - gnu*) - ;; - haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes @@ -12983,7 +13166,7 @@ fi inherit_rpath_CXX=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -13843,7 +14026,7 @@ lt_prog_compiler_static_CXX= ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -14715,17 +14898,6 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - 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 - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no @@ -14842,7 +15014,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no @@ -15298,6 +15470,14 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -15616,16 +15796,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... 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'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -15685,28 +15865,16 @@ else 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 + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # 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'" @@ -15727,8 +15895,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by gmm $as_me 5.0, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15793,11 +15961,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.68, +gmm config.status 5.0 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -15888,7 +16056,7 @@ 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 + 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' @@ -16900,7 +17068,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} 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 + # Older Autoconf 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 @@ -16913,7 +17081,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # 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 + # 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. @@ -16947,21 +17115,19 @@ $as_echo X"$mf" | continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # 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 + 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 + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || diff --git a/resources/3rdparty/gmm-4.2/configure.in b/resources/3rdparty/gmm-5.0/configure.ac similarity index 98% rename from resources/3rdparty/gmm-4.2/configure.in rename to resources/3rdparty/gmm-5.0/configure.ac index fd018a170..24442ff3a 100644 --- a/resources/3rdparty/gmm-4.2/configure.in +++ b/resources/3rdparty/gmm-5.0/configure.ac @@ -8,14 +8,14 @@ dnl thus, updating cache ./config.cache avoided. define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl -AC_INIT +AC_INIT(gmm, 5.0) AC_CONFIG_HEADERS(config.h) AC_PREREQ(2.56) AC_ARG_PROGRAM PACKAGE="gmm" -MAJOR_VERSION="4" -MINOR_VERSION="2" +MAJOR_VERSION="5" +MINOR_VERSION="0" dnl VERSION=$MAJOR_VERSION.$MINOR_VERSION VERSION=$MAJOR_VERSION.$MINOR_VERSION echo "configuring $PACKAGE $VERSION..." @@ -24,7 +24,7 @@ dnl ------------------------------------------------------------------------ dnl init automake dnl ------------------------------------------------------------------------ -AM_INIT_AUTOMAKE($PACKAGE,$VERSION) +AM_INIT_AUTOMAKE([1.11 parallel-tests]) dnl ----------------------------------------------- dnl test du c++ diff --git a/resources/3rdparty/gmm-4.2/depcomp b/resources/3rdparty/gmm-5.0/depcomp similarity index 56% rename from resources/3rdparty/gmm-4.2/depcomp rename to resources/3rdparty/gmm-5.0/depcomp index bd0ac0895..4ebd5b3a2 100755 --- a/resources/3rdparty/gmm-4.2/depcomp +++ b/resources/3rdparty/gmm-5.0/depcomp @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2011-12-04.11; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 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 @@ -28,9 +27,9 @@ scriptversion=2011-12-04.11; # UTC case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -40,8 +39,8 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + 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 outputting dependencies. @@ -57,6 +56,66 @@ EOF ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + 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 @@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # 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 @@ -80,26 +142,32 @@ if test "$depmode" = hp; then fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # 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 + # 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 if test "$depmode" = msvc7msys; then - # This is just like msvc7 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=msvc7 + # This is just like msvc7 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=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -122,8 +190,7 @@ gcc3) done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -131,13 +198,17 @@ gcc3) ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## 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). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -145,33 +216,31 @@ gcc) fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then 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. + # 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. +## 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 +## 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. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## 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 "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -189,8 +258,7 @@ sgi) "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -198,43 +266,41 @@ sgi) 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 + # 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" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$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" + tr ' ' "$nl" < "$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" + make_dummy_depfile fi rm -f "$tmpdepfile" ;; +xlc) + # 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 + ;; + 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 + # 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$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -247,9 +313,7 @@ aix) "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -258,44 +322,100 @@ aix) 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" + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" 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 +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -307,8 +427,8 @@ icc) 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" + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -319,9 +439,8 @@ hp2) # '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$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -332,8 +451,7 @@ hp2) "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -343,77 +461,61 @@ hp2) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_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" - ;; + # 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. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool 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$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; msvc7) if test "$libtool" = yes; then @@ -424,8 +526,7 @@ msvc7) "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test "$stat" = 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -443,14 +544,15 @@ msvc7) p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g -s/\(.*\)/ \1 \\/p +s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { - s/.*/ / + s/.*/'"$tab"'/ G p }' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; @@ -478,7 +580,7 @@ dashmstdout) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -498,18 +600,18 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # 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. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$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" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -562,11 +664,12 @@ makedepend) # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$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" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -583,7 +686,7 @@ cpp) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -602,10 +705,10 @@ cpp) 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" + "$@" -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" @@ -637,23 +740,23 @@ msvisualcpp) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - 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::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff --git a/resources/3rdparty/gmm-4.2/gmm-config.in b/resources/3rdparty/gmm-5.0/gmm-config.in similarity index 100% rename from resources/3rdparty/gmm-4.2/gmm-config.in rename to resources/3rdparty/gmm-5.0/gmm-config.in diff --git a/resources/3rdparty/gmm-4.2/include/Makefile.am b/resources/3rdparty/gmm-5.0/include/Makefile.am similarity index 97% rename from resources/3rdparty/gmm-4.2/include/Makefile.am rename to resources/3rdparty/gmm-5.0/include/Makefile.am index e9a1a727d..9ed1298ff 100644 --- a/resources/3rdparty/gmm-4.2/include/Makefile.am +++ b/resources/3rdparty/gmm-5.0/include/Makefile.am @@ -1,4 +1,6 @@ nobase_include_HEADERS=\ + gmm/gmm.h\ + gmm/gmm_MUMPS_interface.h\ gmm/gmm_algobase.h\ gmm/gmm_blas.h\ gmm/gmm_blas_interface.h\ @@ -7,14 +9,14 @@ nobase_include_HEADERS=\ gmm/gmm_def.h\ gmm/gmm_dense_Householder.h\ gmm/gmm_dense_lu.h\ + gmm/gmm_dense_matrix_functions.h\ gmm/gmm_dense_qr.h\ gmm/gmm_dense_sylvester.h\ gmm/gmm_domain_decomp.h\ gmm/gmm_except.h\ - gmm/gmm.h\ gmm/gmm_inoutput.h\ - gmm/gmm_interface_bgeot.h\ gmm/gmm_interface.h\ + gmm/gmm_interface_bgeot.h\ gmm/gmm_iter.h\ gmm/gmm_iter_solvers.h\ gmm/gmm_kernel.h\ @@ -22,10 +24,9 @@ nobase_include_HEADERS=\ gmm/gmm_least_squares_cg.h\ gmm/gmm_matrix.h\ gmm/gmm_modified_gram_schmidt.h\ - gmm/gmm_MUMPS_interface.h\ gmm/gmm_opt.h\ - gmm/gmm_precond_diagonal.h\ gmm/gmm_precond.h\ + gmm/gmm_precond_diagonal.h\ gmm/gmm_precond_ildlt.h\ gmm/gmm_precond_ildltt.h\ gmm/gmm_precond_ilu.h\ @@ -36,6 +37,7 @@ nobase_include_HEADERS=\ gmm/gmm_real_part.h\ gmm/gmm_ref.h\ gmm/gmm_scaled.h\ + gmm/gmm_solver_Schwarz_additive.h\ gmm/gmm_solver_bfgs.h\ gmm/gmm_solver_bicgstab.h\ gmm/gmm_solver_cg.h\ @@ -43,7 +45,6 @@ nobase_include_HEADERS=\ gmm/gmm_solver_gmres.h\ gmm/gmm_solver_idgmres.h\ gmm/gmm_solver_qmr.h\ - gmm/gmm_solver_Schwarz_additive.h\ gmm/gmm_std.h\ gmm/gmm_sub_index.h\ gmm/gmm_sub_matrix.h\ diff --git a/resources/3rdparty/gmm-4.2/include/Makefile.in b/resources/3rdparty/gmm-5.0/include/Makefile.in similarity index 74% rename from resources/3rdparty/gmm-4.2/include/Makefile.in rename to resources/3rdparty/gmm-5.0/include/Makefile.in index 9f1a385cf..a7a0ed4ed 100644 --- a/resources/3rdparty/gmm-4.2/include/Makefile.in +++ b/resources/3rdparty/gmm-5.0/include/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2013 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. @@ -16,6 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,21 +79,38 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include -DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(nobase_include_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(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.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -79,11 +140,29 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(nobase_include_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` 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@ @@ -207,6 +286,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ nobase_include_HEADERS = \ + gmm/gmm.h\ + gmm/gmm_MUMPS_interface.h\ gmm/gmm_algobase.h\ gmm/gmm_blas.h\ gmm/gmm_blas_interface.h\ @@ -215,14 +296,14 @@ nobase_include_HEADERS = \ gmm/gmm_def.h\ gmm/gmm_dense_Householder.h\ gmm/gmm_dense_lu.h\ + gmm/gmm_dense_matrix_functions.h\ gmm/gmm_dense_qr.h\ gmm/gmm_dense_sylvester.h\ gmm/gmm_domain_decomp.h\ gmm/gmm_except.h\ - gmm/gmm.h\ gmm/gmm_inoutput.h\ - gmm/gmm_interface_bgeot.h\ gmm/gmm_interface.h\ + gmm/gmm_interface_bgeot.h\ gmm/gmm_iter.h\ gmm/gmm_iter_solvers.h\ gmm/gmm_kernel.h\ @@ -230,10 +311,9 @@ nobase_include_HEADERS = \ gmm/gmm_least_squares_cg.h\ gmm/gmm_matrix.h\ gmm/gmm_modified_gram_schmidt.h\ - gmm/gmm_MUMPS_interface.h\ gmm/gmm_opt.h\ - gmm/gmm_precond_diagonal.h\ gmm/gmm_precond.h\ + gmm/gmm_precond_diagonal.h\ gmm/gmm_precond_ildlt.h\ gmm/gmm_precond_ildltt.h\ gmm/gmm_precond_ilu.h\ @@ -244,6 +324,7 @@ nobase_include_HEADERS = \ gmm/gmm_real_part.h\ gmm/gmm_ref.h\ gmm/gmm_scaled.h\ + gmm/gmm_solver_Schwarz_additive.h\ gmm/gmm_solver_bfgs.h\ gmm/gmm_solver_bicgstab.h\ gmm/gmm_solver_cg.h\ @@ -251,7 +332,6 @@ nobase_include_HEADERS = \ gmm/gmm_solver_gmres.h\ gmm/gmm_solver_idgmres.h\ gmm/gmm_solver_qmr.h\ - gmm/gmm_solver_Schwarz_additive.h\ gmm/gmm_std.h\ gmm/gmm_sub_index.h\ gmm/gmm_sub_matrix.h\ @@ -303,15 +383,18 @@ clean-libtool: -rm -rf .libs _libs install-nobase_includeHEADERS: $(nobase_include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ - echo "$(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ @@ -323,26 +406,15 @@ uninstall-nobase_includeHEADERS: $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) -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) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -354,15 +426,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$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; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -371,6 +439,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -510,18 +593,19 @@ uninstall-am: uninstall-nobase_includeHEADERS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool ctags 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-nobase_includeHEADERS \ - 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 \ - tags uninstall uninstall-am uninstall-nobase_includeHEADERS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool cscopelist-am ctags ctags-am 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-nobase_includeHEADERS 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 tags tags-am uninstall \ + uninstall-am uninstall-nobase_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm.h similarity index 98% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm.h index b6f50a575..8554d0342 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_MUMPS_interface.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_MUMPS_interface.h similarity index 70% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_MUMPS_interface.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_MUMPS_interface.h index 71a9b44b3..45cc771e5 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_MUMPS_interface.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_MUMPS_interface.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard, Julien Pommier + Copyright (C) 2003-2015 Yves Renard, Julien Pommier This file is a part of GETFEM++ @@ -66,16 +66,25 @@ extern "C" { namespace gmm { +#define ICNTL(I) icntl[(I)-1] +#define INFO(I) info[(I)-1] +#define INFOG(I) infog[(I)-1] +#define RINFOG(I) rinfog[(I)-1] + template struct ij_sparse_matrix { std::vector irn; std::vector jcn; - std::vector a; + std::vector a; + bool sym; template void store(const L& l, size_type i) { typename linalg_traits::const_iterator it = vect_const_begin(l), ite = vect_const_end(l); - for (; it != ite; ++it) - { irn.push_back((int)i + 1); jcn.push_back((int)it.index() + 1); a.push_back(*it); } + for (; it != ite; ++it) { + int ir = (int)i + 1, jc = (int)it.index() + 1; + if (*it != T(0) && (!sym || ir >= jc)) + { irn.push_back(ir); jcn.push_back(jc); a.push_back(*it); } + } } template void build_from(const L& l, row_major) { @@ -89,11 +98,12 @@ namespace gmm { irn.swap(jcn); } - template ij_sparse_matrix(const L& A) { + template ij_sparse_matrix(const L& A, bool sym_) { size_type nz = nnz(A); + sym = sym_; irn.reserve(nz); jcn.reserve(nz); a.reserve(nz); build_from(A, typename principal_orientation_type::sub_orientation>::potype()); + linalg_traits::sub_orientation>::potype()); } }; @@ -101,7 +111,6 @@ namespace gmm { /* MUMPS solve interface */ /* ********************************************************************* */ - template struct mumps_interf {}; template <> struct mumps_interf { @@ -130,20 +139,45 @@ namespace gmm { }; + template + static inline bool mumps_error_check(MUMPS_STRUCT &id) { + if (id.INFO(1) < 0) { + switch (id.INFO(1)) { + case -2: + GMM_ASSERT1(false, "Solve with MUMPS failed: NZ = " << id.INFO(2) + << " is out of range"); + case -6 : case -10 : + GMM_WARNING1("Solve with MUMPS failed: matrix is singular"); + return false; + case -9: + GMM_ASSERT1(false, "Solve with MUMPS failed: error " + << id.INFO(1) << ", increase ICNTL(14)"); + case -13 : + GMM_ASSERT1(false, "Solve with MUMPS failed: not enough memory"); + default : + GMM_ASSERT1(false, "Solve with MUMPS failed with error " + << id.INFO(1)); + } + } + return true; + } + + /** MUMPS solve interface * Works only with sparse or skyline matrices */ template - bool MUMPS_solve(const MAT &A, const VECTX &X_, const VECTB &B) { + bool MUMPS_solve(const MAT &A, const VECTX &X_, const VECTB &B, + bool sym = false, bool distributed = false) { VECTX &X = const_cast(X_); typedef typename linalg_traits::value_type T; typedef typename mumps_interf::value_type MUMPS_T; - GMM_ASSERT2(gmm::mat_nrows(A) == gmm::mat_ncols(A), "Non square matrix"); + GMM_ASSERT2(gmm::mat_nrows(A) == gmm::mat_ncols(A), "Non-square matrix"); std::vector rhs(gmm::vect_size(B)); gmm::copy(B, rhs); - - ij_sparse_matrix AA(A); + + ij_sparse_matrix AA(A, sym); const int JOB_INIT = -1; const int JOB_END = -2; @@ -151,42 +185,51 @@ namespace gmm { typename mumps_interf::MUMPS_STRUC_C id; + int rank(0); #ifdef GMM_USES_MPI - int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); #endif id.job = JOB_INIT; id.par = 1; - id.sym = 0; + id.sym = sym ? 2 : 0; id.comm_fortran = USE_COMM_WORLD; mumps_interf::mumps_c(id); -#ifdef GMM_USES_MPI - if (rank == 0) { -#endif - id.n = (int)gmm::mat_nrows(A); - id.nz = (int)AA.irn.size(); - id.irn = &(AA.irn[0]); - id.jcn = &(AA.jcn[0]); - id.a = (MUMPS_T*)(&(AA.a[0])); - id.rhs = (MUMPS_T*)(&(rhs[0])); -#ifdef GMM_USES_MPI + if (rank == 0 || distributed) { + id.n = int(gmm::mat_nrows(A)); + if (distributed) { + id.nz_loc = int(AA.irn.size()); + id.irn_loc = &(AA.irn[0]); + id.jcn_loc = &(AA.jcn[0]); + id.a_loc = (MUMPS_T*)(&(AA.a[0])); + } else { + id.nz = int(AA.irn.size()); + id.irn = &(AA.irn[0]); + id.jcn = &(AA.jcn[0]); + id.a = (MUMPS_T*)(&(AA.a[0])); + } + if (rank == 0) + id.rhs = (MUMPS_T*)(&(rhs[0])); } -#endif -#define ICNTL(I) icntl[(I)-1] id.ICNTL(1) = -1; // output stream for error messages id.ICNTL(2) = -1; // output stream for other messages id.ICNTL(3) = -1; // output stream for global information id.ICNTL(4) = 0; // verbosity level - + + if (distributed) + id.ICNTL(5) = 0; // assembled input matrix (default) + id.ICNTL(14) += 80; /* small boost to the workspace size as we have encountered some problem who did not fit in the default settings of mumps.. by default, ICNTL(14) = 15 or 20 - */ + */ //cout << "ICNTL(14): " << id.ICNTL(14) << "\n"; + if (distributed) + id.ICNTL(18) = 3; // strategy for distributed input matrix + // id.ICNTL(22) = 1; /* enables out-of-core support */ id.job = 6; @@ -196,12 +239,14 @@ namespace gmm { id.job = JOB_END; mumps_interf::mumps_c(id); +#ifdef GMM_USES_MPI + MPI_Bcast(&(rhs[0]),id.n,gmm::mpi_type(T()),0,MPI_COMM_WORLD); +#endif + gmm::copy(rhs, X); return ok; -#undef ICNTL - } @@ -211,16 +256,30 @@ namespace gmm { */ template bool MUMPS_distributed_matrix_solve(const MAT &A, const VECTX &X_, - const VECTB &B) { - VECTX &X = const_cast(X_); + const VECTB &B, bool sym = false) { + return MUMPS_solve(A, X_, B, sym, true); + } - typedef typename linalg_traits::value_type T; + + + template + inline T real_or_complex(std::complex a) { return a.real(); } + template + inline T real_or_complex(T &a) { return a; } + + + /** Evaluate matrix determinant with MUMPS + * Works only with sparse or skyline matrices + */ + template ::value_type> + T MUMPS_determinant(const MAT &A, int &exponent, + bool sym = false, bool distributed = false) { + exponent = 0; typedef typename mumps_interf::value_type MUMPS_T; + typedef typename number_traits::magnitude_type R; GMM_ASSERT2(gmm::mat_nrows(A) == gmm::mat_ncols(A), "Non-square matrix"); - std::vector rhs(gmm::vect_size(B)); gmm::copy(B, rhs); - - ij_sparse_matrix AA(A); + ij_sparse_matrix AA(A, sym); const int JOB_INIT = -1; const int JOB_END = -2; @@ -228,83 +287,65 @@ namespace gmm { typename mumps_interf::MUMPS_STRUC_C id; + int rank(0); #ifdef GMM_USES_MPI - int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); #endif id.job = JOB_INIT; id.par = 1; - id.sym = 0; + id.sym = sym ? 2 : 0; id.comm_fortran = USE_COMM_WORLD; mumps_interf::mumps_c(id); - id.n = gmm::mat_nrows(A); - id.nz_loc = AA.irn.size(); - id.irn_loc = &(AA.irn[0]); - id.jcn_loc = &(AA.jcn[0]); - id.a_loc = (MUMPS_T*)(&(AA.a[0])); - -#ifdef GMM_USES_MPI - if (rank == 0) { -#endif - id.rhs = (MUMPS_T*)(&(rhs[0])); -#ifdef GMM_USES_MPI + if (rank == 0 || distributed) { + id.n = int(gmm::mat_nrows(A)); + if (distributed) { + id.nz_loc = int(AA.irn.size()); + id.irn_loc = &(AA.irn[0]); + id.jcn_loc = &(AA.jcn[0]); + id.a_loc = (MUMPS_T*)(&(AA.a[0])); + } else { + id.nz = int(AA.irn.size()); + id.irn = &(AA.irn[0]); + id.jcn = &(AA.jcn[0]); + id.a = (MUMPS_T*)(&(AA.a[0])); + } } -#endif -#define ICNTL(I) icntl[(I)-1] id.ICNTL(1) = -1; // output stream for error messages - id.ICNTL(2) = 6; // id.ICNTL(2) = -1; // output stream for other messages - id.ICNTL(3) = 6; // id.ICNTL(3) = -1; // output stream for global information - id.ICNTL(4) = 2; // verbosity level + id.ICNTL(2) = -1; // output stream for other messages + id.ICNTL(3) = -1; // output stream for global information + id.ICNTL(4) = 0; // verbosity level - id.ICNTL(5) = 0; // assembled input matrix (default) - id.ICNTL(18) = 3; // strategy for distributed input matrix + if (distributed) + id.ICNTL(5) = 0; // assembled input matrix (default) - id.job = 6; - mumps_interf::mumps_c(id); - bool ok = mumps_error_check(id); +// id.ICNTL(14) += 80; // small boost to the workspace size - id.job = JOB_END; - mumps_interf::mumps_c(id); -#ifdef GMM_USES_MPI - MPI_Bcast(&(rhs[0]),id.n,gmm::mpi_type(T()),0,MPI_COMM_WORLD); -#endif - gmm::copy(rhs, X); + if (distributed) + id.ICNTL(18) = 3; // strategy for distributed input matrix - return ok; + id.ICNTL(31) = 1; // only factorization, no solution to follow + id.ICNTL(33) = 1; // request determinant calculation -#undef ICNTL + id.job = 4; // abalysis (job=1) + factorization (job=2) + mumps_interf::mumps_c(id); + mumps_error_check(id); - } + T det = real_or_complex(std::complex(id.RINFOG(12),id.RINFOG(13))); + exponent = id.INFOG(34); + id.job = JOB_END; + mumps_interf::mumps_c(id); - template - static inline bool mumps_error_check(MUMPS_STRUCT &id) { -#define INFO(I) info[(I)-1] - if (id.INFO(1) < 0) { - switch (id.INFO(1)) { - case -2: - GMM_ASSERT1(false, "Solve with MUMPS failed: NZ = " << id.INFO(2) - << " is out of range"); - case -6 : case -10 : - GMM_WARNING1("Solve with MUMPS failed: matrix is singular"); - return false; - case -9: - GMM_ASSERT1(false, "Solve with MUMPS failed: error " - << id.INFO(1) << ", increase ICNTL(14)"); - case -13 : - GMM_ASSERT1(false, "Solve with MUMPS failed: not enough memory"); - default : - GMM_ASSERT1(false, "Solve with MUMPS failed with error " - << id.INFO(1)); - } - } - return true; -#undef INFO + return det; } +#undef ICNTL +#undef INFO +#undef INFOG +#undef RINFOG } diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_algobase.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_algobase.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_algobase.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_algobase.h index 700c8b234..3040665d7 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_algobase.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_algobase.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2000-2012 Yves Renard + Copyright (C) 2000-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_blas.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_blas.h similarity index 96% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_blas.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_blas.h index 032976c42..e8008ac05 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_blas.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_blas.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ @@ -38,17 +38,6 @@ #ifndef GMM_BLAS_H__ #define GMM_BLAS_H__ -// This Version of GMM was modified for StoRM. -// To detect whether the usage of TBB is possible, this include is neccessary -#include "storm-config.h" - -#ifdef STORM_HAVE_INTELTBB -# include // This fixes a potential dependency ordering problem between GMM and TBB -# include "tbb/tbb.h" -# include -#endif - - #include "gmm_scaled.h" #include "gmm_transposed.h" #include "gmm_conjugated.h" @@ -273,7 +262,8 @@ namespace gmm { template inline typename strongest_value_type::value_type vect_sp(const V1 &v1, const V2 &v2) { - GMM_ASSERT2(vect_size(v1) == vect_size(v2), "dimensions mismatch"); + GMM_ASSERT2(vect_size(v1) == vect_size(v2), "dimensions mismatch, " + << vect_size(v1) << " !=" << vect_size(v2)); return vect_sp(v1, v2, typename linalg_traits::storage_type(), typename linalg_traits::storage_type()); @@ -304,7 +294,7 @@ namespace gmm { vect_sp_with_matr(const MATSP &ps, const V1 &v1, const V2 &v2, abstract_sparse) { GMM_ASSERT2(vect_size(v1) == mat_ncols(ps) && - vect_size(v2) == mat_nrows(ps), "dimensions mismatch"); + vect_size(v2) == mat_nrows(ps), "dimensions mismatch"); size_type nr = mat_nrows(ps); typename linalg_traits::const_iterator it = vect_const_begin(v2), ite = vect_const_end(v2); @@ -325,7 +315,7 @@ namespace gmm { vect_sp_with_matr(const MATSP &ps, const V1 &v1, const V2 &v2, abstract_dense) { GMM_ASSERT2(vect_size(v1) == mat_ncols(ps) && - vect_size(v2) == mat_nrows(ps), "dimensions mismatch"); + vect_size(v2) == mat_nrows(ps), "dimensions mismatch"); typename linalg_traits::const_iterator it = vect_const_begin(v2), ite = vect_const_end(v2); typename strongest_value_type3::value_type res(0); @@ -351,7 +341,7 @@ namespace gmm { vect_sp_with_matc(const MATSP &ps, const V1 &v1, const V2 &v2, abstract_sparse) { GMM_ASSERT2(vect_size(v1) == mat_ncols(ps) && - vect_size(v2) == mat_nrows(ps),"dimensions mismatch"); + vect_size(v2) == mat_nrows(ps), "dimensions mismatch"); typename linalg_traits::const_iterator it = vect_const_begin(v1), ite = vect_const_end(v1); typename strongest_value_type3::value_type res(0); @@ -371,7 +361,7 @@ namespace gmm { vect_sp_with_matc(const MATSP &ps, const V1 &v1, const V2 &v2, abstract_dense) { GMM_ASSERT2(vect_size(v1) == mat_ncols(ps) && - vect_size(v2) == mat_nrows(ps), "dimensions mismatch"); + vect_size(v2) == mat_nrows(ps), "dimensions mismatch"); typename linalg_traits::const_iterator it = vect_const_begin(v1), ite = vect_const_end(v1); typename strongest_value_type3::value_type res(0); @@ -404,7 +394,7 @@ namespace gmm { for (; it != ite; ++it, ++it2) res += (*it) * (*it2); return res; } - + template inline typename strongest_numeric_type::value_type, typename linalg_traits::value_type>::T @@ -550,7 +540,7 @@ namespace gmm { /* Euclidean norm */ /* ******************************************************************** */ - /** Euclidean norm of a vector. */ + /** squared Euclidean norm of a vector. */ template typename number_traits::value_type> ::magnitude_type @@ -564,7 +554,7 @@ namespace gmm { return res; } - /** squared Euclidean norm of a vector. */ + /** Euclidean norm of a vector. */ template inline typename number_traits::value_type> ::magnitude_type @@ -885,8 +875,8 @@ namespace gmm { bool r = (gmm::abs((*it).real()) < T(threshold)); bool i = (gmm::abs((*it).imag()) < T(threshold)); if (r && i) ind.push_back(it.index()); - else if (r) (*it).real() = T(0); - else if (i) (*it).imag() = T(0); + else if (r) *it = std::complex(T(0), (*it).imag()); + else if (i) *it = std::complex((*it).real(), T(0)); } for (size_type i = 0; i < ind.size(); ++i) l[ind[i]] = std::complex(T(0),T(0)); @@ -948,7 +938,8 @@ namespace gmm { template inline void copy(const L1& l1, L2& l2, abstract_vector, abstract_vector) { - GMM_ASSERT2(vect_size(l1) == vect_size(l2), "dimensions mismatch"); + GMM_ASSERT2(vect_size(l1) == vect_size(l2), "dimensions mismatch, " + << vect_size(l1) << " !=" << vect_size(l2)); copy_vect(l1, l2, typename linalg_traits::storage_type(), typename linalg_traits::storage_type()); } @@ -1227,8 +1218,8 @@ namespace gmm { } /* ******************************************************************** */ - /* Matrix and vector addition */ - /* algorithms are built in order to avoid some conflicts whith */ + /* Matrix and vector addition */ + /* algorithms are built in order to avoid some conflicts with */ /* repeated arguments or with overlapping part of a same object. */ /* In the latter case, conflicts are still possible. */ /* ******************************************************************** */ @@ -1248,15 +1239,16 @@ namespace gmm { template inline void add_spec(const L1& l1, L2& l2, abstract_vector) { - GMM_ASSERT2(vect_size(l1) == vect_size(l2), "dimensions mismatch"); + GMM_ASSERT2(vect_size(l1) == vect_size(l2), "dimensions mismatch, " + << vect_size(l1) << " !=" << vect_size(l2)); add(l1, l2, typename linalg_traits::storage_type(), typename linalg_traits::storage_type()); } template inline void add_spec(const L1& l1, L2& l2, abstract_matrix) { - size_type m = mat_nrows(l1), n = mat_ncols(l1); - GMM_ASSERT2(m==mat_nrows(l2) && n==mat_ncols(l2), "dimensions mismatch"); + GMM_ASSERT2(mat_nrows(l1)==mat_nrows(l2) && mat_ncols(l1)==mat_ncols(l2), + "dimensions mismatch"); add(l1, l2, typename linalg_traits::sub_orientation(), typename linalg_traits::sub_orientation()); } @@ -1417,7 +1409,7 @@ namespace gmm { template inline void add_spec(const L1& l1, const L2& l2, L3& l3, abstract_vector) { GMM_ASSERT2(vect_size(l1) == vect_size(l2) && - vect_size(l1) == vect_size(l3), "dimensions mismatch"); + vect_size(l1) == vect_size(l3), "dimensions mismatch"); if ((const void *)(&l1) == (const void *)(&l3)) add(l2, l3); else if ((const void *)(&l2) == (const void *)(&l3)) @@ -1689,85 +1681,15 @@ namespace gmm { } } -#ifdef STORM_HAVE_INTELTBB - /* Official Intel Hint on blocked_range vs. linear iterators: http://software.intel.com/en-us/forums/topic/289505 - - */ - template -class forward_range_mult { - IT1 my_begin; - IT1 my_end; - IT2 my_begin_row; - size_t my_size; -public: - IT1 begin() const {return my_begin;} - IT2 begin_row() const {return my_begin_row;} - IT1 end() const {return my_end;} - bool empty() const {return my_begin==my_end;} - bool is_divisible() const {return my_size>1;} - forward_range_mult( IT1 first, IT1 last, IT2 row_first, size_t size ) : my_begin(first), my_end(last), my_begin_row(row_first), my_size(size) { - assert( size==size_t(std::distance( first,last ))); - } - forward_range_mult( IT1 first, IT1 last, IT2 row_first) : my_begin(first), my_end(last), my_begin_row(row_first) { - my_size = std::distance( first,last ); - } - forward_range_mult( forward_range_mult& r, tbb::split ) { - size_t h = r.my_size/2; - my_end = r.my_end; - my_begin = r.my_begin; - my_begin_row = r.my_begin_row; - std::advance( my_begin, h ); // Might be scaling issue - std::advance( my_begin_row, h ); - my_size = r.my_size-h; - r.my_end = my_begin; - r.my_size = h; - } -}; - - - template - class tbbHelper_mult_by_row { - L2 const* my_l2; - - // Typedefs for Iterator Types - typedef typename linalg_traits::iterator frm_IT1; - typedef typename linalg_traits::const_row_iterator frm_IT2; - - public: - void operator()( const forward_range_mult& r ) const { - L2 const& l2 = *my_l2; - - frm_IT1 it = r.begin(); - frm_IT1 ite = r.end(); - frm_IT2 itr = r.begin_row(); - - for (; it != ite; ++it, ++itr) { - *it = vect_sp(linalg_traits::row(itr), l2, - typename linalg_traits::storage_type(), - typename linalg_traits::storage_type()); - } - } - - tbbHelper_mult_by_row(L2 const* l2) : - my_l2(l2) - {} - }; -#endif - - template void mult_by_row(const L1& l1, const L2& l2, L3& l3, abstract_dense) { typename linalg_traits::iterator it=vect_begin(l3), ite=vect_end(l3); typename linalg_traits::const_row_iterator itr = mat_row_const_begin(l1); -#ifdef STORM_HAVE_INTELTBB - tbb::parallel_for(forward_range_mult::iterator, typename linalg_traits::const_row_iterator>(it, ite, itr), tbbHelper_mult_by_row(&l2)); -#else - for (; it != ite; ++it, ++itr) + for (; it != ite; ++it, ++itr) *it = vect_sp(linalg_traits::row(itr), l2, typename linalg_traits::storage_type(), typename linalg_traits::storage_type()); -#endif } template @@ -2016,10 +1938,10 @@ public: template void mult_dispatch(const L1& l1, const L2& l2, L3& l3, abstract_matrix) { typedef typename temporary_matrix::matrix_type temp_mat_type; - size_type m = mat_nrows(l1), n = mat_ncols(l1), k = mat_ncols(l2); + size_type n = mat_ncols(l1); if (n == 0) { gmm::clear(l3); return; } - GMM_ASSERT2(n == mat_nrows(l2) && m == mat_nrows(l3) && k == mat_ncols(l3), - "dimensions mismatch"); + GMM_ASSERT2(n == mat_nrows(l2) && mat_nrows(l1) == mat_nrows(l3) && + mat_ncols(l2) == mat_ncols(l3), "dimensions mismatch"); if (same_origin(l2, l3) || same_origin(l1, l3)) { GMM_WARNING2("A temporary is used for mult"); diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_blas_interface.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_blas_interface.h similarity index 98% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_blas_interface.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_blas_interface.h index 32ae2fda4..563c39d1a 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_blas_interface.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_blas_interface.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ @@ -148,9 +148,15 @@ namespace gmm { /* ********************************************************************* */ /* BLAS functions used. */ /* ********************************************************************* */ - extern "C" void daxpy_(const int *n, const double *alpha, const double *x, const int *incx, double *y, const int *incy); extern "C" { - void sgemm_(...); void dgemm_(...); void cgemm_(...); void zgemm_(...); + void daxpy_(const int *n, const double *alpha, const double *x, + const int *incx, double *y, const int *incy); + void dgemm_(const char *tA, const char *tB, const int *m, + const int *n, const int *k, const double *alpha, + const double *A, const int *ldA, const double *B, + const int *ldB, const double *beta, double *C, + const int *ldC); + void sgemm_(...); void cgemm_(...); void zgemm_(...); void sgemv_(...); void dgemv_(...); void cgemv_(...); void zgemv_(...); void strsv_(...); void dtrsv_(...); void ctrsv_(...); void ztrsv_(...); void saxpy_(...); /*void daxpy_(...); */void caxpy_(...); void zaxpy_(...); diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_condition_number.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_condition_number.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_condition_number.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_condition_number.h index fa40ddbd4..a9e25f568 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_condition_number.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_condition_number.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard, Julien Pommier + Copyright (C) 2003-2015 Yves Renard, Julien Pommier This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_conjugated.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_conjugated.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_conjugated.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_conjugated.h index 3be660894..35948f0c8 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_conjugated.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_conjugated.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_def.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_def.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_def.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_def.h index 84f5e9ec6..b5471e1a1 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_def.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_def.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ @@ -961,7 +961,7 @@ namespace gmm { if (numeric_limits::is_specialized) tol = numeric_limits::epsilon(); else { - int i=sizeof(T)/4; while(i-- > 0) tol*=T(1E-8); + int i=int(sizeof(T)/4); while(i-- > 0) tol*=T(1E-8); GMM_WARNING1("The numeric type " << typeid(T).name() << " has no numeric_limits defined !!\n" << "Taking " << tol << " as default tolerance"); @@ -1051,7 +1051,7 @@ namespace gmm { typename linalg_traits::const_iterator it = vect_const_begin(l), ite = vect_const_end(l); for (; it != ite; ++it) - o << " (r" << it.index() << "," << cast_char(*it) << ")"; + o << " (r" << it.index() << ", " << cast_char(*it) << ")"; } template void write(std::ostream &o, const L &l, diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_dense_Householder.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_dense_Householder.h similarity index 86% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_dense_Householder.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_dense_Householder.h index 6f2ff521a..c662bc96c 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_dense_Householder.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_dense_Householder.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard, Caroline Lecalvez + Copyright (C) 2003-2015 Yves Renard, Caroline Lecalvez This file is a part of GETFEM++ @@ -50,17 +50,17 @@ namespace gmm { template inline void rank_one_update(Matrix &A, const VecX& x, - const VecY& y, row_major) { + const VecY& y, row_major) { typedef typename linalg_traits::value_type T; size_type N = mat_nrows(A); GMM_ASSERT2(N <= vect_size(x) && mat_ncols(A) <= vect_size(y), - "dimensions mismatch"); + "dimensions mismatch"); typename linalg_traits::const_iterator itx = vect_const_begin(x); for (size_type i = 0; i < N; ++i, ++itx) { typedef typename linalg_traits::sub_row_type row_type; row_type row = mat_row(A, i); typename linalg_traits::iterator - it = vect_begin(row), ite = vect_end(row); + it = vect_begin(row), ite = vect_end(row); typename linalg_traits::const_iterator ity = vect_const_begin(y); T tx = *itx; for (; it != ite; ++it, ++ity) *it += conj_product(*ity, tx); @@ -69,30 +69,30 @@ namespace gmm { template inline void rank_one_update(Matrix &A, const VecX& x, - const VecY& y, col_major) { + const VecY& y, col_major) { typedef typename linalg_traits::value_type T; size_type M = mat_ncols(A); GMM_ASSERT2(mat_nrows(A) <= vect_size(x) && M <= vect_size(y), - "dimensions mismatch"); + "dimensions mismatch"); typename linalg_traits::const_iterator ity = vect_const_begin(y); for (size_type i = 0; i < M; ++i, ++ity) { typedef typename linalg_traits::sub_col_type col_type; col_type col = mat_col(A, i); typename linalg_traits::iterator - it = vect_begin(col), ite = vect_end(col); + it = vect_begin(col), ite = vect_end(col); typename linalg_traits::const_iterator itx = vect_const_begin(x); T ty = *ity; for (; it != ite; ++it, ++itx) *it += conj_product(ty, *itx); } } - + ///@endcond template inline void rank_one_update(const Matrix &AA, const VecX& x, - const VecY& y) { + const VecY& y) { Matrix& A = const_cast(AA); rank_one_update(A, x, y, typename principal_orientation_type::sub_orientation>::potype()); + linalg_traits::sub_orientation>::potype()); } ///@cond DOXY_SHOW_ALL_FUNCTIONS @@ -102,55 +102,55 @@ namespace gmm { template inline void rank_two_update(Matrix &A, const VecX& x, - const VecY& y, row_major) { + const VecY& y, row_major) { typedef typename linalg_traits::value_type value_type; size_type N = mat_nrows(A); GMM_ASSERT2(N <= vect_size(x) && mat_ncols(A) <= vect_size(y), - "dimensions mismatch"); + "dimensions mismatch"); typename linalg_traits::const_iterator itx1 = vect_const_begin(x); typename linalg_traits::const_iterator ity2 = vect_const_begin(y); for (size_type i = 0; i < N; ++i, ++itx1, ++ity2) { typedef typename linalg_traits::sub_row_type row_type; row_type row = mat_row(A, i); typename linalg_traits::iterator - it = vect_begin(row), ite = vect_end(row); + it = vect_begin(row), ite = vect_end(row); typename linalg_traits::const_iterator itx2 = vect_const_begin(x); typename linalg_traits::const_iterator ity1 = vect_const_begin(y); value_type tx = *itx1, ty = *ity2; for (; it != ite; ++it, ++ity1, ++itx2) - *it += conj_product(*ity1, tx) + conj_product(*itx2, ty); + *it += conj_product(*ity1, tx) + conj_product(*itx2, ty); } } template inline void rank_two_update(Matrix &A, const VecX& x, - const VecY& y, col_major) { + const VecY& y, col_major) { typedef typename linalg_traits::value_type value_type; size_type M = mat_ncols(A); GMM_ASSERT2(mat_nrows(A) <= vect_size(x) && M <= vect_size(y), - "dimensions mismatch"); + "dimensions mismatch"); typename linalg_traits::const_iterator itx2 = vect_const_begin(x); typename linalg_traits::const_iterator ity1 = vect_const_begin(y); for (size_type i = 0; i < M; ++i, ++ity1, ++itx2) { typedef typename linalg_traits::sub_col_type col_type; col_type col = mat_col(A, i); typename linalg_traits::iterator - it = vect_begin(col), ite = vect_end(col); + it = vect_begin(col), ite = vect_end(col); typename linalg_traits::const_iterator itx1 = vect_const_begin(x); typename linalg_traits::const_iterator ity2 = vect_const_begin(y); value_type ty = *ity1, tx = *itx2; for (; it != ite; ++it, ++itx1, ++ity2) - *it += conj_product(ty, *itx1) + conj_product(tx, *ity2); + *it += conj_product(ty, *itx1) + conj_product(tx, *ity2); } } - + ///@endcond template inline void rank_two_update(const Matrix &AA, const VecX& x, - const VecY& y) { + const VecY& y) { Matrix& A = const_cast(AA); rank_two_update(A, x, y, typename principal_orientation_type::sub_orientation>::potype()); + linalg_traits::sub_orientation>::potype()); } ///@cond DOXY_SHOW_ALL_FUNCTIONS @@ -162,11 +162,11 @@ namespace gmm { VECT &V = const_cast(VV); typedef typename linalg_traits::value_type T; typedef typename number_traits::magnitude_type R; - + R mu = vect_norm2(V), abs_v0 = gmm::abs(V[0]); if (mu != R(0)) gmm::scale(V, (abs_v0 == R(0)) ? T(R(1) / mu) - : (safe_divide(T(abs_v0), V[0]) / (abs_v0 + mu))); + : (safe_divide(T(abs_v0), V[0]) / (abs_v0 + mu))); if (gmm::real(V[vect_size(V)-1]) * R(0) != R(0)) gmm::clear(V); V[0] = T(1); } @@ -180,47 +180,47 @@ namespace gmm { R mu = vect_norm2(V), abs_v0 = gmm::abs(V[m-1]); if (mu != R(0)) gmm::scale(V, (abs_v0 == R(0)) ? T(R(1) / mu) - : ((abs_v0 / V[m-1]) / (abs_v0 + mu))); + : ((abs_v0 / V[m-1]) / (abs_v0 + mu))); if (gmm::real(V[0]) * R(0) != R(0)) gmm::clear(V); V[m-1] = T(1); } - + /* ********************************************************************* */ /* Householder updates (complex and real version) */ /* ********************************************************************* */ // multiply A to the left by the reflector stored in V. W is a temporary. template inline - void row_house_update(const MAT &AA, const VECT1 &V, const VECT2 &WW) { + void row_house_update(const MAT &AA, const VECT1 &V, const VECT2 &WW) { VECT2 &W = const_cast(WW); MAT &A = const_cast(AA); typedef typename linalg_traits::value_type value_type; typedef typename number_traits::magnitude_type magnitude_type; gmm::mult(conjugated(A), - scaled(V, value_type(magnitude_type(-2)/vect_norm2_sqr(V))), W); + scaled(V, value_type(magnitude_type(-2)/vect_norm2_sqr(V))), W); rank_one_update(A, V, W); } // multiply A to the right by the reflector stored in V. W is a temporary. template inline - void col_house_update(const MAT &AA, const VECT1 &V, const VECT2 &WW) { + void col_house_update(const MAT &AA, const VECT1 &V, const VECT2 &WW) { VECT2 &W = const_cast(WW); MAT &A = const_cast(AA); typedef typename linalg_traits::value_type value_type; typedef typename number_traits::magnitude_type magnitude_type; - + gmm::mult(A, - scaled(V, value_type(magnitude_type(-2)/vect_norm2_sqr(V))), W); + scaled(V, value_type(magnitude_type(-2)/vect_norm2_sqr(V))), W); rank_one_update(A, W, V); } ///@endcond /* ********************************************************************* */ - /* Hessemberg reduction with Householder. */ + /* Hessenberg reduction with Householder. */ /* ********************************************************************* */ template - void Hessenberg_reduction(const MAT1& AA, const MAT2 &QQ, bool compute_Q){ + void Hessenberg_reduction(const MAT1& AA, const MAT2 &QQ, bool compute_Q){ MAT1& A = const_cast(AA); MAT2& Q = const_cast(QQ); typedef typename linalg_traits::value_type value_type; if (compute_Q) gmm::copy(identity_matrix(), Q); @@ -243,9 +243,9 @@ namespace gmm { /* Householder tridiagonalization for symmetric matrices */ /* ********************************************************************* */ - template + template void Householder_tridiagonalization(const MAT1 &AA, const MAT2 &QQ, - bool compute_q) { + bool compute_q) { MAT1 &A = const_cast(AA); MAT2 &Q = const_cast(QQ); typedef typename linalg_traits::value_type T; typedef typename number_traits::magnitude_type R; @@ -256,9 +256,9 @@ namespace gmm { for (size_type k = 1; k+1 < n; ++k) { // not optimized ... sub_interval SUBI(k, n-k); - v.resize(n-k); p.resize(n-k); w.resize(n-k); - for (size_type l = k; l < n; ++l) - { v[l-k] = w[l-k] = A(l, k-1); A(l, k-1) = A(k-1, l) = T(0); } + v.resize(n-k); p.resize(n-k); w.resize(n-k); + for (size_type l = k; l < n; ++l) + { v[l-k] = w[l-k] = A(l, k-1); A(l, k-1) = A(k-1, l) = T(0); } house_vector(v); R norm = vect_norm2_sqr(v); A(k-1, k) = gmm::conj(A(k, k-1) = w[0] - T(2)*v[0]*vect_hp(w, v)/norm); @@ -310,7 +310,7 @@ namespace gmm { for (size_type j = 0; j < mat_nrows(A); ++j) Apply_Givens_rotation_right(A(j,i), A(j,k), c, s); } - + } #endif diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_dense_lu.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_dense_lu.h similarity index 98% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_dense_lu.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_dense_lu.h index c803af356..88db4d215 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_dense_lu.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_dense_lu.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ @@ -208,15 +208,15 @@ namespace gmm { return the determinant */ template typename linalg_traits::value_type - lu_inverse(const DenseMatrix& A_) { + lu_inverse(const DenseMatrix& A_, bool doassert = true) { typedef typename linalg_traits::value_type T; DenseMatrix& A = const_cast(A_); dense_matrix B(mat_nrows(A), mat_ncols(A)); std::vector ipvt(mat_nrows(A)); gmm::copy(A, B); size_type info = lu_factor(B, ipvt); - GMM_ASSERT1(!info, "Non invertible matrix, pivot = " << info); - lu_inverse(B, ipvt, A); + if (doassert) GMM_ASSERT1(!info, "Non invertible matrix, pivot = "< + @date December 10, 2014. + @brief Common matrix functions for dense matrices. +*/ +#ifndef GMM_DENSE_MATRIX_FUNCTIONS_H +#define GMM_DENSE_MATRIX_FUNCTIONS_H + + +namespace gmm { + + + /** + Matrix square root for upper triangular matrices (from GNU Octave). + */ + template + void sqrtm_utri_inplace(dense_matrix& A) + { + typedef typename number_traits::magnitude_type R; + bool singular = false; + + // The following code is equivalent to this triple loop: + // + // n = rows (A); + // for j = 1:n + // A(j,j) = sqrt (A(j,j)); + // for i = j-1:-1:1 + // A(i,j) /= (A(i,i) + A(j,j)); + // k = 1:i-1; + // t storing a A(k,j) -= A(k,i) * A(i,j); + // endfor + // endfor + + R tol = R(0); // default_tol(R()) * gmm::mat_maxnorm(A); + + const size_type n = mat_nrows(A); + for (int j=0; j < int(n); j++) { + typename dense_matrix::iterator colj = A.begin() + j*n; + if (gmm::abs(colj[j]) > tol) + colj[j] = gmm::sqrt(colj[j]); + else + singular = true; + + for (int i=j-1; i >= 0; i--) { + typename dense_matrix::const_iterator coli = A.begin() + i*n; + T colji = colj[i] = safe_divide(colj[i], (coli[i] + colj[j])); + for (int k = 0; k < i; k++) + colj[k] -= coli[k] * colji; + } + } + + if (singular) + GMM_WARNING1("Matrix is singular, may not have a square root"); + } + + + template + void sqrtm(const dense_matrix >& A, + dense_matrix >& SQRTMA) + { + GMM_ASSERT1(gmm::mat_nrows(A) == gmm::mat_ncols(A), + "Matrix square root requires a square matrix"); + gmm::resize(SQRTMA, gmm::mat_nrows(A), gmm::mat_ncols(A)); + dense_matrix > S(A), Q(A), TMP(A); + #if defined(GMM_USES_LAPACK) + schur(TMP, S, Q); + #else + GMM_ASSERT1(false, "Please recompile with lapack and blas librairies " + "to use sqrtm matrix function."); + #endif + sqrtm_utri_inplace(S); + gmm::mult(Q, S, TMP); + gmm::mult(TMP, gmm::transposed(Q), SQRTMA); + } + + template + void sqrtm(const dense_matrix& A, + dense_matrix >& SQRTMA) + { + dense_matrix > cA(mat_nrows(A), mat_ncols(A)); + gmm::copy(A, gmm::real_part(cA)); + sqrtm(cA, SQRTMA); + } + + template + void sqrtm(const dense_matrix& A, dense_matrix& SQRTMA) + { + dense_matrix > cA(mat_nrows(A), mat_ncols(A)); + gmm::copy(A, gmm::real_part(cA)); + dense_matrix > cSQRTMA(cA); + sqrtm(cA, cSQRTMA); + gmm::resize(SQRTMA, gmm::mat_nrows(A), gmm::mat_ncols(A)); + gmm::copy(gmm::real_part(cSQRTMA), SQRTMA); +// dense_matrix >::const_reference +// it = cSQRTMA.begin(), ite = cSQRTMA.end(); +// dense_matrix >::reference +// rit = SQRTMA.begin(); +// for (; it != ite; ++it, ++rit) *rit = it->real(); + } + + + /** + Matrix logarithm for upper triangular matrices (from GNU/Octave) + */ + template + void logm_utri_inplace(dense_matrix& S) + { + typedef typename number_traits::magnitude_type R; + + size_type n = gmm::mat_nrows(S); + GMM_ASSERT1(n == gmm::mat_ncols(S), + "Matrix logarithm is not defined for non-square matrices"); + for (size_type i=0; i < n-1; ++i) + if (gmm::abs(S(i+1,i)) > default_tol(T())) { + GMM_ASSERT1(false, "An upper triangular matrix is expected"); + break; + } + for (size_type i=0; i < n-1; ++i) + if (gmm::real(S(i,i)) <= -default_tol(R()) && + gmm::abs(gmm::imag(S(i,i))) <= default_tol(R())) { + GMM_ASSERT1(false, "Principal matrix logarithm is not defined " + "for matrices with negative eigenvalues"); + break; + } + + // Algorithm 11.9 in "Function of matrices", by N. Higham + R theta[] = { R(0),R(0),R(1.61e-2),R(5.38e-2),R(1.13e-1),R(1.86e-1),R(2.6429608311114350e-1) }; + + R scaling(1); + size_type p(0), m(6), opt_iters(100); + for (size_type k=0; k < opt_iters; ++k, scaling *= R(2)) { + dense_matrix auxS(S); + for (size_type i = 0; i < n; ++i) auxS(i,i) -= R(1); + R tau = gmm::mat_norm1(auxS); + if (tau <= theta[6]) { + ++p; + size_type j1(6), j2(6); + for (size_type j=0; j < 6; ++j) + if (tau <= theta[j]) { j1 = j; break; } + for (size_type j=0; j < j1; ++j) + if (tau <= 2*theta[j]) { j2 = j; break; } + if (j1 - j2 <= 1 || p == 2) { m = j1; break; } + } + sqrtm_utri_inplace(S); + if (k == opt_iters-1) + GMM_WARNING1 ("Maximum number of square roots exceeded; " + "the calculated matrix logarithm may still be accurate"); + } + + for (size_type i = 0; i < n; ++i) S(i,i) -= R(1); + + if (m > 0) { + + std::vector nodes, wts; + switch(m) { + case 0: { + R nodes_[] = { R(0.5) }; + R wts_[] = { R(1) }; + nodes.assign(nodes_, nodes_+m+1); + wts.assign(wts_, wts_+m+1); + } break; + case 1: { + R nodes_[] = { R(0.211324865405187),R(0.788675134594813) }; + R wts_[] = { R(0.5),R(0.5) }; + nodes.assign(nodes_, nodes_+m+1); + wts.assign(wts_, wts_+m+1); + } break; + case 2: { + R nodes_[] = { R(0.112701665379258),R(0.500000000000000),R(0.887298334620742) }; + R wts_[] = { R(0.277777777777778),R(0.444444444444444),R(0.277777777777778) }; + nodes.assign(nodes_, nodes_+m+1); + wts.assign(wts_, wts_+m+1); + } break; + case 3: { + R nodes_[] = { R(0.0694318442029737),R(0.3300094782075718),R(0.6699905217924281),R(0.9305681557970263) }; + R wts_[] = { R(0.173927422568727),R(0.326072577431273),R(0.326072577431273),R(0.173927422568727) }; + nodes.assign(nodes_, nodes_+m+1); + wts.assign(wts_, wts_+m+1); + } break; + case 4: { + R nodes_[] = { R(0.0469100770306681),R(0.2307653449471584),R(0.5000000000000000),R(0.7692346550528415),R(0.9530899229693319) }; + R wts_[] = { R(0.118463442528095),R(0.239314335249683),R(0.284444444444444),R(0.239314335249683),R(0.118463442528094) }; + nodes.assign(nodes_, nodes_+m+1); + wts.assign(wts_, wts_+m+1); + } break; + case 5: { + R nodes_[] = { R(0.0337652428984240),R(0.1693953067668678),R(0.3806904069584015),R(0.6193095930415985),R(0.8306046932331322),R(0.9662347571015761) }; + R wts_[] = { R(0.0856622461895853),R(0.1803807865240693),R(0.2339569672863452),R(0.2339569672863459),R(0.1803807865240693),R(0.0856622461895852) }; + nodes.assign(nodes_, nodes_+m+1); + wts.assign(wts_, wts_+m+1); + } break; + case 6: { + R nodes_[] = { R(0.0254460438286208),R(0.1292344072003028),R(0.2970774243113015),R(0.4999999999999999),R(0.7029225756886985),R(0.8707655927996973),R(0.9745539561713792) }; + R wts_[] = { R(0.0647424830844348),R(0.1398526957446384),R(0.1909150252525594),R(0.2089795918367343),R(0.1909150252525595),R(0.1398526957446383),R(0.0647424830844349) }; + nodes.assign(nodes_, nodes_+m+1); + wts.assign(wts_, wts_+m+1); + } break; + } + + dense_matrix auxS1(S), auxS2(S); + std::vector auxvec(n); + gmm::clear(S); + for (size_type j=0; j <= m; ++j) { + gmm::copy(gmm::scaled(auxS1, nodes[j]), auxS2); + gmm::add(gmm::identity_matrix(), auxS2); + // S += wts[i] * auxS1 * inv(auxS2) + for (size_type i=0; i < n; ++i) { + gmm::copy(gmm::mat_row(auxS1, i), auxvec); + gmm::lower_tri_solve(gmm::transposed(auxS2), auxvec, false); + gmm::add(gmm::scaled(auxvec, wts[j]), gmm::mat_row(S, i)); + } + } + } + gmm::scale(S, scaling); + } + + /** + Matrix logarithm (from GNU/Octave) + */ + template + void logm(const dense_matrix& A, dense_matrix& LOGMA) + { + typedef typename number_traits::magnitude_type R; + size_type n = gmm::mat_nrows(A); + GMM_ASSERT1(n == gmm::mat_ncols(A), + "Matrix logarithm is not defined for non-square matrices"); + dense_matrix S(A), Q(A); + #if defined(GMM_USES_LAPACK) + schur(A, S, Q); // A = Q * S * Q^T + #else + GMM_ASSERT1(false, "Please recompile with lapack and blas librairies " + "to use logm matrix function."); + #endif + + bool convert_to_complex(false); + if (!is_complex(T())) + for (size_type i=0; i < n-1; ++i) + if (gmm::abs(S(i+1,i)) > default_tol(T())) { + convert_to_complex = true; + break; + } + + gmm::resize(LOGMA, n, n); + if (convert_to_complex) { + dense_matrix > cS(n,n), cQ(n,n), auxmat(n,n); + gmm::copy(gmm::real_part(S), gmm::real_part(cS)); + gmm::copy(gmm::real_part(Q), gmm::real_part(cQ)); + block2x2_reduction(cS, cQ, default_tol(R())*R(3)); + for (size_type j=0; j < n-1; ++j) + for (size_type i=j+1; i < n; ++i) + cS(i,j) = T(0); + logm_utri_inplace(cS); + gmm::mult(cQ, cS, auxmat); + gmm::mult(auxmat, gmm::transposed(cQ), cS); + // Remove small complex values which may have entered calculation + gmm::copy(gmm::real_part(cS), LOGMA); +// GMM_ASSERT1(gmm::mat_norm1(gmm::imag_part(cS)) < n*default_tol(T()), +// "Internal error, imag part should be zero"); + } else { + dense_matrix auxmat(n,n); + logm_utri_inplace(S); + gmm::mult(Q, S, auxmat); + gmm::mult(auxmat, gmm::transposed(Q), LOGMA); + } + + } + +} + +#endif + diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_dense_qr.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_dense_qr.h similarity index 76% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_dense_qr.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_dense_qr.h index b0827917d..299f90c9b 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_dense_qr.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_dense_qr.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ @@ -46,7 +46,7 @@ namespace gmm { QR factorization using Householder method (complex and real version). */ template - void qr_factor(const MAT1 &A_) { + void qr_factor(const MAT1 &A_) { MAT1 &A = const_cast(A_); typedef typename linalg_traits::value_type value_type; @@ -67,12 +67,12 @@ namespace gmm { } } - + // QR comes from QR_factor(QR) where the upper triangular part stands for R // and the lower part contains the Householder reflectors. // A <- AQ template - void apply_house_right(const MAT1 &QR, const MAT2 &A_) { + void apply_house_right(const MAT1 &QR, const MAT2 &A_) { MAT2 &A = const_cast(A_); typedef typename linalg_traits::value_type T; size_type m = mat_nrows(QR), n = mat_ncols(QR); @@ -84,7 +84,7 @@ namespace gmm { V.resize(m-j); for (size_type i = j+1; i < m; ++i) V[i-j] = QR(i, j); col_house_update(sub_matrix(A, sub_interval(0, mat_nrows(A)), - sub_interval(j, m-j)), V, W); + sub_interval(j, m-j)), V, W); } } @@ -92,7 +92,7 @@ namespace gmm { // and the lower part contains the Householder reflectors. // A <- Q*A template - void apply_house_left(const MAT1 &QR, const MAT2 &A_) { + void apply_house_left(const MAT1 &QR, const MAT2 &A_) { MAT2 &A = const_cast(A_); typedef typename linalg_traits::value_type T; size_type m = mat_nrows(QR), n = mat_ncols(QR); @@ -104,20 +104,20 @@ namespace gmm { V.resize(m-j); for (size_type i = j+1; i < m; ++i) V[i-j] = QR(i, j); row_house_update(sub_matrix(A, sub_interval(j, m-j), - sub_interval(0, mat_ncols(A))), V, W); + sub_interval(0, mat_ncols(A))), V, W); } - } + } /** Compute the QR factorization, where Q is assembled. */ template - void qr_factor(const MAT1 &A, const MAT2 &QQ, const MAT3 &RR) { - MAT2 &Q = const_cast(QQ); MAT3 &R = const_cast(RR); + void qr_factor(const MAT1 &A, const MAT2 &QQ, const MAT3 &RR) { + MAT2 &Q = const_cast(QQ); MAT3 &R = const_cast(RR); typedef typename linalg_traits::value_type value_type; size_type m = mat_nrows(A), n = mat_ncols(A); GMM_ASSERT2(m >= n, "dimensions mismatch"); gmm::copy(A, Q); - + std::vector W(m); dense_matrix VV(m, n); @@ -128,22 +128,22 @@ namespace gmm { house_vector(sub_vector(mat_col(VV,j), SUBI)); row_house_update(sub_matrix(Q, SUBI, SUBJ), - sub_vector(mat_col(VV,j), SUBI), sub_vector(W, SUBJ)); + sub_vector(mat_col(VV,j), SUBI), sub_vector(W, SUBJ)); } gmm::copy(sub_matrix(Q, sub_interval(0, n), sub_interval(0, n)), R); gmm::copy(identity_matrix(), Q); - + for (size_type j = n-1; j != size_type(-1); --j) { sub_interval SUBI(j, m-j), SUBJ(j, n-j); - row_house_update(sub_matrix(Q, SUBI, SUBJ), - sub_vector(mat_col(VV,j), SUBI), sub_vector(W, SUBJ)); + row_house_update(sub_matrix(Q, SUBI, SUBJ), + sub_vector(mat_col(VV,j), SUBI), sub_vector(W, SUBJ)); } } ///@cond DOXY_SHOW_ALL_FUNCTIONS - template + template void extract_eig(const MAT &A, VECT &V, Ttol tol, TA, TV) { size_type n = mat_nrows(A); if (n == 0) return; @@ -151,57 +151,57 @@ namespace gmm { Ttol tol_i = tol * gmm::abs(A(0,0)), tol_cplx = tol_i; for (size_type i = 0; i < n; ++i) { if (i < n-1) { - tol_i = (gmm::abs(A(i,i))+gmm::abs(A(i+1,i+1)))*tol; - tol_cplx = std::max(tol_cplx, tol_i); + tol_i = (gmm::abs(A(i,i))+gmm::abs(A(i+1,i+1)))*tol; + tol_cplx = std::max(tol_cplx, tol_i); } if ((i < n-1) && gmm::abs(A(i+1,i)) >= tol_i) { - TA tr = A(i,i) + A(i+1, i+1); - TA det = A(i,i)*A(i+1, i+1) - A(i,i+1)*A(i+1, i); - TA delta = tr*tr - TA(4) * det; - if (delta < -tol_cplx) { - GMM_WARNING1("A complex eigenvalue has been detected : " - << std::complex(tr/TA(2), gmm::sqrt(-delta)/TA(2))); - V[i] = V[i+1] = tr / TA(2); - } - else { - delta = std::max(TA(0), delta); - V[i ] = TA(tr + gmm::sqrt(delta))/ TA(2); - V[i+1] = TA(tr - gmm::sqrt(delta))/ TA(2); - } - ++i; + TA tr = A(i,i) + A(i+1, i+1); + TA det = A(i,i)*A(i+1, i+1) - A(i,i+1)*A(i+1, i); + TA delta = tr*tr - TA(4) * det; + if (delta < -tol_cplx) { + GMM_WARNING1("A complex eigenvalue has been detected : " + << std::complex(tr/TA(2), gmm::sqrt(-delta)/TA(2))); + V[i] = V[i+1] = tr / TA(2); + } + else { + delta = std::max(TA(0), delta); + V[i ] = TA(tr + gmm::sqrt(delta))/ TA(2); + V[i+1] = TA(tr - gmm::sqrt(delta))/ TA(2); + } + ++i; } else - V[i] = TV(A(i,i)); + V[i] = TV(A(i,i)); } } - template + template void extract_eig(const MAT &A, VECT &V, Ttol tol, TA, std::complex) { size_type n = mat_nrows(A); tol *= Ttol(2); for (size_type i = 0; i < n; ++i) if ((i == n-1) || - gmm::abs(A(i+1,i)) < (gmm::abs(A(i,i))+gmm::abs(A(i+1,i+1)))*tol) - V[i] = std::complex(A(i,i)); + gmm::abs(A(i+1,i)) < (gmm::abs(A(i,i))+gmm::abs(A(i+1,i+1)))*tol) + V[i] = std::complex(A(i,i)); else { - TA tr = A(i,i) + A(i+1, i+1); - TA det = A(i,i)*A(i+1, i+1) - A(i,i+1)*A(i+1, i); - TA delta = tr*tr - TA(4) * det; - if (delta < TA(0)) { - V[i] = std::complex(tr / TA(2), gmm::sqrt(-delta) / TA(2)); - V[i+1] = std::complex(tr / TA(2), -gmm::sqrt(-delta)/ TA(2)); - } - else { - V[i ] = TA(tr + gmm::sqrt(delta)) / TA(2); - V[i+1] = TA(tr - gmm::sqrt(delta)) / TA(2); - } - ++i; + TA tr = A(i,i) + A(i+1, i+1); + TA det = A(i,i)*A(i+1, i+1) - A(i,i+1)*A(i+1, i); + TA delta = tr*tr - TA(4) * det; + if (delta < TA(0)) { + V[i] = std::complex(tr / TA(2), gmm::sqrt(-delta) / TA(2)); + V[i+1] = std::complex(tr / TA(2), -gmm::sqrt(-delta)/ TA(2)); + } + else { + V[i ] = TA(tr + gmm::sqrt(delta)) / TA(2); + V[i+1] = TA(tr - gmm::sqrt(delta)) / TA(2); + } + ++i; } } template + typename MAT, typename VECT> void extract_eig(const MAT &A, VECT &V, Ttol tol, std::complex, TV) { typedef std::complex T; size_type n = mat_nrows(A); @@ -210,50 +210,50 @@ namespace gmm { Ttol tol_i = tol * gmm::abs(A(0,0)), tol_cplx = tol_i; for (size_type i = 0; i < n; ++i) { if (i < n-1) { - tol_i = (gmm::abs(A(i,i))+gmm::abs(A(i+1,i+1)))*tol; - tol_cplx = std::max(tol_cplx, tol_i); + tol_i = (gmm::abs(A(i,i))+gmm::abs(A(i+1,i+1)))*tol; + tol_cplx = std::max(tol_cplx, tol_i); } if ((i == n-1) || gmm::abs(A(i+1,i)) < tol_i) { - if (gmm::abs(std::imag(A(i,i))) > tol_cplx) - GMM_WARNING1("A complex eigenvalue has been detected : " - << T(A(i,i)) << " : " << gmm::abs(std::imag(A(i,i))) - / gmm::abs(std::real(A(i,i))) << " : " << tol_cplx); - V[i] = std::real(A(i,i)); + if (gmm::abs(std::imag(A(i,i))) > tol_cplx) + GMM_WARNING1("A complex eigenvalue has been detected : " + << T(A(i,i)) << " : " << gmm::abs(std::imag(A(i,i))) + / gmm::abs(std::real(A(i,i))) << " : " << tol_cplx); + V[i] = std::real(A(i,i)); } else { - T tr = A(i,i) + A(i+1, i+1); - T det = A(i,i)*A(i+1, i+1) - A(i,i+1)*A(i+1, i); - T delta = tr*tr - TA(4) * det; - T a1 = (tr + gmm::sqrt(delta)) / TA(2); - T a2 = (tr - gmm::sqrt(delta)) / TA(2); - if (gmm::abs(std::imag(a1)) > tol_cplx) - GMM_WARNING1("A complex eigenvalue has been detected : " << a1); - if (gmm::abs(std::imag(a2)) > tol_cplx) - GMM_WARNING1("A complex eigenvalue has been detected : " << a2); - - V[i] = std::real(a1); V[i+1] = std::real(a2); - ++i; + T tr = A(i,i) + A(i+1, i+1); + T det = A(i,i)*A(i+1, i+1) - A(i,i+1)*A(i+1, i); + T delta = tr*tr - TA(4) * det; + T a1 = (tr + gmm::sqrt(delta)) / TA(2); + T a2 = (tr - gmm::sqrt(delta)) / TA(2); + if (gmm::abs(std::imag(a1)) > tol_cplx) + GMM_WARNING1("A complex eigenvalue has been detected : " << a1); + if (gmm::abs(std::imag(a2)) > tol_cplx) + GMM_WARNING1("A complex eigenvalue has been detected : " << a2); + + V[i] = std::real(a1); V[i+1] = std::real(a2); + ++i; } } } template + typename MAT, typename VECT> void extract_eig(const MAT &A, VECT &V, Ttol tol, - std::complex, std::complex) { + std::complex, std::complex) { size_type n = mat_nrows(A); tol *= Ttol(2); for (size_type i = 0; i < n; ++i) if ((i == n-1) || - gmm::abs(A(i+1,i)) < (gmm::abs(A(i,i))+gmm::abs(A(i+1,i+1)))*tol) - V[i] = std::complex(A(i,i)); + gmm::abs(A(i+1,i)) < (gmm::abs(A(i,i))+gmm::abs(A(i+1,i+1)))*tol) + V[i] = std::complex(A(i,i)); else { - std::complex tr = A(i,i) + A(i+1, i+1); - std::complex det = A(i,i)*A(i+1, i+1) - A(i,i+1)*A(i+1, i); - std::complex delta = tr*tr - TA(4) * det; - V[i] = (tr + gmm::sqrt(delta)) / TA(2); - V[i+1] = (tr - gmm::sqrt(delta)) / TA(2); - ++i; + std::complex tr = A(i,i) + A(i+1, i+1); + std::complex det = A(i,i)*A(i+1, i+1) - A(i,i+1)*A(i+1, i); + std::complex delta = tr*tr - TA(4) * det; + V[i] = (tr + gmm::sqrt(delta)) / TA(2); + V[i+1] = (tr - gmm::sqrt(delta)) / TA(2); + ++i; } } @@ -264,8 +264,8 @@ namespace gmm { template inline void extract_eig(const MAT &A, const VECT &V, Ttol tol) { extract_eig(A, const_cast(V), tol, - typename linalg_traits::value_type(), - typename linalg_traits::value_type()); + typename linalg_traits::value_type(), + typename linalg_traits::value_type()); } /* ********************************************************************* */ @@ -281,21 +281,21 @@ namespace gmm { if (n <= 2) { q = n; p = 0; } else { for (size_type i = 1; i < n-q; ++i) - if (gmm::abs(A(i,i-1)) < (gmm::abs(A(i,i))+ gmm::abs(A(i-1,i-1)))*tol - || gmm::abs(A(i,i-1)) < rmin) - A(i,i-1) = T(0); - + if (gmm::abs(A(i,i-1)) < (gmm::abs(A(i,i))+ gmm::abs(A(i-1,i-1)))*tol + || gmm::abs(A(i,i-1)) < rmin) + A(i,i-1) = T(0); + while ((q < n-1 && A(n-1-q, n-2-q) == T(0)) || - (q < n-2 && A(n-2-q, n-3-q) == T(0))) ++q; + (q < n-2 && A(n-2-q, n-3-q) == T(0))) ++q; if (q >= n-2) q = n; p = n-q; if (p) --p; if (p) --p; while (p > 0 && A(p,p-1) != T(0)) --p; } } - + template inline void symmetric_qr_stop_criterion(const MAT &AA, size_type &p, size_type &q, - Ttol tol) { + Ttol tol) { typedef typename linalg_traits::value_type T; typedef typename number_traits::magnitude_type R; R rmin = default_min(R()) * R(2); @@ -304,10 +304,10 @@ namespace gmm { if (n <= 1) { q = n; p = 0; } else { for (size_type i = 1; i < n-q; ++i) - if (gmm::abs(A(i,i-1)) < (gmm::abs(A(i,i))+ gmm::abs(A(i-1,i-1)))*tol - || gmm::abs(A(i,i-1)) < rmin) - A(i,i-1) = T(0); - + if (gmm::abs(A(i,i-1)) < (gmm::abs(A(i,i))+ gmm::abs(A(i-1,i-1)))*tol + || gmm::abs(A(i,i-1)) < rmin) + A(i,i-1) = T(0); + while (q < n-1 && A(n-1-q, n-2-q) == T(0)) ++q; if (q >= n-1) q = n; p = n-q; if (p) --p; if (p) --p; @@ -317,7 +317,7 @@ namespace gmm { template inline void symmetric_qr_stop_criterion(const VECT1 &diag, const VECT2 &sdiag_, - size_type &p, size_type &q, Ttol tol) { + size_type &p, size_type &q, Ttol tol) { typedef typename linalg_traits::value_type T; typedef typename number_traits::magnitude_type R; R rmin = default_min(R()) * R(2); @@ -326,8 +326,8 @@ namespace gmm { if (n <= 1) { q = n; p = 0; return; } for (size_type i = 1; i < n-q; ++i) if (gmm::abs(sdiag[i-1]) < (gmm::abs(diag[i])+ gmm::abs(diag[i-1]))*tol - || gmm::abs(sdiag[i-1]) < rmin) - sdiag[i-1] = T(0); + || gmm::abs(sdiag[i-1]) < rmin) + sdiag[i-1] = T(0); while (q < n-1 && sdiag[n-2-q] == T(0)) ++q; if (q >= n-1) q = n; p = n-q; if (p) --p; if (p) --p; @@ -344,30 +344,30 @@ namespace gmm { typedef typename number_traits::magnitude_type R; size_type n = mat_nrows(H), nq = mat_nrows(Q); + if (n < 2) return; sub_interval SUBQ(0, nq), SUBL(0, 2); std::vector v(2), w(std::max(n, nq)); v[0] = T(1); - if (n < 2) return; tol *= Ttol(2); Ttol tol_i = tol * gmm::abs(H(0,0)), tol_cplx = tol_i; for (size_type i = 0; i < n-1; ++i) { tol_i = (gmm::abs(H(i,i))+gmm::abs(H(i+1,i+1)))*tol; tol_cplx = std::max(tol_cplx, tol_i); - + if (gmm::abs(H(i+1,i)) > tol_i) { // 2x2 block detected - T tr = (H(i+1, i+1) - H(i,i)) / T(2); - T delta = tr*tr + H(i,i+1)*H(i+1, i); - - if (is_complex(T()) || gmm::real(delta) >= R(0)) { - sub_interval SUBI(i, 2); - T theta = (tr - gmm::sqrt(delta)) / H(i+1,i); - R a = gmm::abs(theta); - v[1] = (a == R(0)) ? T(-1) - : gmm::conj(theta) * (R(1) - gmm::sqrt(a*a + R(1)) / a); - row_house_update(sub_matrix(H, SUBI), v, sub_vector(w, SUBL)); - col_house_update(sub_matrix(H, SUBI), v, sub_vector(w, SUBL)); - col_house_update(sub_matrix(Q, SUBQ, SUBI), v, sub_vector(w, SUBQ)); - } - ++i; + T tr = (H(i+1, i+1) - H(i,i)) / T(2); + T delta = tr*tr + H(i,i+1)*H(i+1, i); + + if (is_complex(T()) || gmm::real(delta) >= R(0)) { + sub_interval SUBI(i, 2); + T theta = (tr - gmm::sqrt(delta)) / H(i+1,i); + R a = gmm::abs(theta); + v[1] = (a == R(0)) ? T(-1) + : gmm::conj(theta) * (R(1) - gmm::sqrt(a*a + R(1)) / a); + row_house_update(sub_matrix(H, SUBI), v, sub_vector(w, SUBL)); + col_house_update(sub_matrix(H, SUBI), v, sub_vector(w, SUBL)); + col_house_update(sub_matrix(Q, SUBQ, SUBI), v, sub_vector(w, SUBQ)); + } + ++i; } } } @@ -386,16 +386,16 @@ namespace gmm { // Very slow method. Use implicit_qr_method instead. template void rudimentary_qr_algorithm(const MAT1 &A, const VECT &eigval_, - const MAT2 &eigvect_, - tol_type_for_qr tol = default_tol_for_qr, - bool compvect = true) { + const MAT2 &eigvect_, + tol_type_for_qr tol = default_tol_for_qr, + bool compvect = true) { VECT &eigval = const_cast(eigval_); MAT2 &eigvect = const_cast(eigvect_); typedef typename linalg_traits::value_type value_type; size_type n = mat_nrows(A), p, q = 0, ite = 0; - dense_matrix Q(n, n), R(n,n), A1(n,n); + dense_matrix Q(n, n), R(n,n), A1(n,n); gmm::copy(A, A1); Hessenberg_reduction(A1, eigvect, compvect); @@ -405,20 +405,20 @@ namespace gmm { qr_factor(A1, Q, R); gmm::mult(R, Q, A1); if (compvect) { gmm::mult(eigvect, Q, R); gmm::copy(R, eigvect); } - + qr_stop_criterion(A1, p, q, tol); ++ite; GMM_ASSERT1(ite < n*1000, "QR algorithm failed"); } if (compvect) block2x2_reduction(A1, Q, tol); - extract_eig(A1, eigval, tol); + extract_eig(A1, eigval, tol); } template void rudimentary_qr_algorithm(const MAT1 &a, VECT &eigval, - tol_type_for_qr tol = default_tol_for_qr) { + tol_type_for_qr tol = default_tol_for_qr) { dense_matrix::value_type> m(0,0); - rudimentary_qr_algorithm(a, eigval, m, tol, false); + rudimentary_qr_algorithm(a, eigval, m, tol, false); } /* ********************************************************************* */ @@ -429,8 +429,8 @@ namespace gmm { void Francis_qr_step(const MAT1& HH, const MAT2 &QQ, bool compute_Q) { MAT1& H = const_cast(HH); MAT2& Q = const_cast(QQ); typedef typename linalg_traits::value_type value_type; - size_type n = mat_nrows(H), nq = mat_nrows(Q); - + size_type n = mat_nrows(H), nq = mat_nrows(Q); + std::vector v(3), w(std::max(n, nq)); value_type s = H(n-2, n-2) + H(n-1, n-1); @@ -446,12 +446,12 @@ namespace gmm { house_vector(v); size_type r = std::min(k+4, n), q = (k==0) ? 0 : k-1; sub_interval SUBI(k, 3), SUBJ(0, r), SUBK(q, n-q); - + row_house_update(sub_matrix(H, SUBI, SUBK), v, sub_vector(w, SUBK)); col_house_update(sub_matrix(H, SUBJ, SUBI), v, sub_vector(w, SUBJ)); - + if (compute_Q) - col_house_update(sub_matrix(Q, SUBQ, SUBI), v, sub_vector(w, SUBQ)); + col_house_update(sub_matrix(Q, SUBQ, SUBI), v, sub_vector(w, SUBQ)); x = H(k+1, k); y = H(k+2, k); if (k < n-3) z = H(k+3, k); @@ -472,7 +472,7 @@ namespace gmm { template void Wilkinson_double_shift_qr_step(const MAT1& HH, const MAT2 &QQ, - Ttol tol, bool exc, bool compute_Q) { + Ttol tol, bool exc, bool compute_Q) { MAT1& H = const_cast(HH); MAT2& Q = const_cast(QQ); typedef typename linalg_traits::value_type T; typedef typename number_traits::magnitude_type R; @@ -481,7 +481,7 @@ namespace gmm { std::vector v(3), w(std::max(n, nq)); const R dat1(0.75), dat2(-0.4375); T h33, h44, h43h34, v1(0), v2(0), v3(0); - + if (exc) { /* Exceptional shift. */ R s = gmm::abs(H(n-1, n-2)) + gmm::abs(H(n-2, n-3)); h33 = h44 = dat1 * s; @@ -518,13 +518,13 @@ namespace gmm { house_vector(v); size_type r = std::min(k+4, n), q = (k==0) ? 0 : k-1; sub_interval SUBI(k, 3), SUBJ(0, r), SUBK(q, n-q); - + row_house_update(sub_matrix(H, SUBI, SUBK), v, sub_vector(w, SUBK)); col_house_update(sub_matrix(H, SUBJ, SUBI), v, sub_vector(w, SUBJ)); if (k > m-1) { H(k+1, k-1) = T(0); if (k < n-3) H(k+2, k-1) = T(0); } - + if (compute_Q) - col_house_update(sub_matrix(Q, SUBQ, SUBI), v, sub_vector(w, SUBQ)); + col_house_update(sub_matrix(Q, SUBQ, SUBI), v, sub_vector(w, SUBQ)); v1 = H(k+1, k); v2 = H(k+2, k); if (k < n-3) v3 = H(k+3, k); @@ -544,13 +544,13 @@ namespace gmm { // QR method for real or complex square matrices based on an // implicit QR factorisation. eigval has to be a complex vector - // if A has complex eigeinvalues. complexity about 10n^3, 25n^3 if + // if A has complex eigenvalues. Complexity about 10n^3, 25n^3 if // eigenvectors are computed template void implicit_qr_algorithm(const MAT1 &A, const VECT &eigval_, - const MAT2 &Q_, - tol_type_for_qr tol = default_tol_for_qr, - bool compvect = true) { + const MAT2 &Q_, + tol_type_for_qr tol = default_tol_for_qr, + bool compvect = true) { VECT &eigval = const_cast(eigval_); MAT2 &Q = const_cast(Q_); typedef typename linalg_traits::value_type value_type; @@ -562,15 +562,15 @@ namespace gmm { gmm::copy(A, H); Hessenberg_reduction(H, Q, compvect); qr_stop_criterion(H, p, q, tol); - + while (q < n) { sub_interval SUBI(p, n-p-q), SUBJ(0, mat_ncols(Q)); if (compvect) SUBK = SUBI; // Francis_qr_step(sub_matrix(H, SUBI), -// sub_matrix(Q, SUBJ, SUBK), compvect); - Wilkinson_double_shift_qr_step(sub_matrix(H, SUBI), - sub_matrix(Q, SUBJ, SUBK), - tol, (its == 10 || its == 20), compvect); +// sub_matrix(Q, SUBJ, SUBK), compvect); + Wilkinson_double_shift_qr_step(sub_matrix(H, SUBI), + sub_matrix(Q, SUBJ, SUBK), + tol, (its == 10 || its == 20), compvect); q_old = q; qr_stop_criterion(H, p, q, tol*2); if (q != q_old) its = 0; @@ -584,18 +584,18 @@ namespace gmm { template void implicit_qr_algorithm(const MAT1 &a, VECT &eigval, - tol_type_for_qr tol = default_tol_for_qr) { + tol_type_for_qr tol = default_tol_for_qr) { dense_matrix::value_type> m(1,1); - implicit_qr_algorithm(a, eigval, m, tol, false); + implicit_qr_algorithm(a, eigval, m, tol, false); } /* ********************************************************************* */ /* Implicit symmetric QR step with Wilkinson Shift. */ /* ********************************************************************* */ - template + template void symmetric_Wilkinson_qr_step(const MAT1& MM, const MAT2 &ZZ, - bool compute_z) { + bool compute_z) { MAT1& M = const_cast(MM); MAT2& Z = const_cast(ZZ); typedef typename linalg_traits::value_type T; typedef typename number_traits::magnitude_type R; @@ -604,8 +604,8 @@ namespace gmm { for (size_type i = 0; i < n; ++i) { M(i, i) = T(gmm::real(M(i, i))); if (i > 0) { - T a = (M(i, i-1) + gmm::conj(M(i-1, i)))/R(2); - M(i, i-1) = a; M(i-1, i) = gmm::conj(a); + T a = (M(i, i-1) + gmm::conj(M(i-1, i)))/R(2); + M(i, i-1) = a; M(i-1, i) = gmm::conj(a); } } @@ -634,9 +634,9 @@ namespace gmm { } - template + template void symmetric_Wilkinson_qr_step(const VECT1& diag_, const VECT2& sdiag_, - const MAT &ZZ, bool compute_z) { + const MAT &ZZ, bool compute_z) { VECT1& diag = const_cast(diag_); VECT2& sdiag = const_cast(sdiag_); MAT& Z = const_cast(ZZ); @@ -683,8 +683,8 @@ namespace gmm { a20 = a31; a21 = a32; a31 = T(0); if (k < n-1) { - sdiag[k] = (gmm::conj(a23) + a32) / R(2); - a22 = T(diag[k+1]); a32 = sdiag[k+1]; a23 = gmm::conj(a32); + sdiag[k] = (gmm::conj(a23) + a32) / R(2); + a22 = T(diag[k+1]); a32 = sdiag[k+1]; a23 = gmm::conj(a32); } } } @@ -699,9 +699,9 @@ namespace gmm { // complexity about 4n^3/3, 9n^3 if eigenvectors are computed template void symmetric_qr_algorithm_old(const MAT1 &A, const VECT &eigval_, - const MAT2 &eigvect_, - tol_type_for_qr tol = default_tol_for_qr, - bool compvect = true) { + const MAT2 &eigvect_, + tol_type_for_qr tol = default_tol_for_qr, + bool compvect = true) { VECT &eigval = const_cast(eigval_); MAT2 &eigvect = const_cast(eigvect_); typedef typename linalg_traits::value_type T; @@ -713,30 +713,30 @@ namespace gmm { gmm::copy(A, Tri); Householder_tridiagonalization(Tri, eigvect, compvect); - + symmetric_qr_stop_criterion(Tri, p, q, tol); - + while (q < n) { sub_interval SUBI(p, n-p-q), SUBJ(0, mat_ncols(eigvect)), SUBK(p, n-p-q); if (!compvect) SUBK = sub_interval(0,0); - symmetric_Wilkinson_qr_step(sub_matrix(Tri, SUBI), - sub_matrix(eigvect, SUBJ, SUBK), compvect); - + symmetric_Wilkinson_qr_step(sub_matrix(Tri, SUBI), + sub_matrix(eigvect, SUBJ, SUBK), compvect); + symmetric_qr_stop_criterion(Tri, p, q, tol*R(2)); ++ite; GMM_ASSERT1(ite < n*100, "QR algorithm failed. Probably, your matrix" - " is not real symmetric or complex hermitian"); + " is not real symmetric or complex hermitian"); } - + extract_eig(Tri, eigval, tol); } template void symmetric_qr_algorithm(const MAT1 &A, const VECT &eigval_, - const MAT2 &eigvect_, - tol_type_for_qr tol = default_tol_for_qr, - bool compvect = true) { + const MAT2 &eigvect_, + tol_type_for_qr tol = default_tol_for_qr, + bool compvect = true) { VECT &eigval = const_cast(eigval_); MAT2 &eigvect = const_cast(eigvect_); typedef typename linalg_traits::value_type T; @@ -755,29 +755,29 @@ namespace gmm { std::vector sdiag(n); for (size_type i = 0; i < n; ++i) { diag[i] = gmm::real(Tri(i, i)); if (i+1 < n) sdiag[i] = Tri(i+1, i); } - + symmetric_qr_stop_criterion(diag, sdiag, p, q, tol); - + while (q < n) { sub_interval SUBI(p, n-p-q), SUBJ(0, mat_ncols(eigvect)), SUBK(p, n-p-q); if (!compvect) SUBK = sub_interval(0,0); - + symmetric_Wilkinson_qr_step(sub_vector(diag, SUBI), - sub_vector(sdiag, SUBI), - sub_matrix(eigvect, SUBJ, SUBK), compvect); + sub_vector(sdiag, SUBI), + sub_matrix(eigvect, SUBJ, SUBK), compvect); symmetric_qr_stop_criterion(diag, sdiag, p, q, tol*R(3)); ++ite; GMM_ASSERT1(ite < n*100, "QR algorithm failed."); } - + gmm::copy(diag, eigval); } template void symmetric_qr_algorithm(const MAT1 &a, VECT &eigval, - tol_type_for_qr tol = default_tol_for_qr) { + tol_type_for_qr tol = default_tol_for_qr) { dense_matrix::value_type> m(0,0); symmetric_qr_algorithm(a, eigval, m, tol, false); } diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_dense_sylvester.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_dense_sylvester.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_dense_sylvester.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_dense_sylvester.h index fbb487137..5d65d9986 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_dense_sylvester.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_dense_sylvester.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_domain_decomp.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_domain_decomp.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_domain_decomp.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_domain_decomp.h index aa1ecf3a2..82108dfaa 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_domain_decomp.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_domain_decomp.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2004-2012 Yves Renard + Copyright (C) 2004-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_except.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_except.h similarity index 85% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_except.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_except.h index f02e13667..3848657d5 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_except.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_except.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ @@ -39,6 +39,9 @@ #ifndef GMM_EXCEPT_H__ #define GMM_EXCEPT_H__ +//provides external implementation of gmm_exception and logging. +#ifndef EXTERNAL_EXCEPT_ + #include "gmm_std.h" namespace gmm { @@ -70,17 +73,17 @@ namespace gmm { #if defined(__EXCEPTIONS) || defined(_CPPUNWIND) inline void short_error_throw(const char *file, int line, const char *func, const char *errormsg) { - std::stringstream msg; - msg << "Error in " << file << ", line " << line << " " << func - << ": \n" << errormsg << std::ends; - throw gmm::gmm_error(msg.str()); + std::stringstream msg__; + msg__ << "Error in " << file << ", line " << line << " " << func + << ": \n" << errormsg << std::ends; + throw gmm::gmm_error(msg__.str()); } # define GMM_THROW_(type, errormsg) { \ - std::stringstream msg; \ - msg << "Error in " << __FILE__ << ", line " \ - << __LINE__ << " " << GMM_PRETTY_FUNCTION << ": \n" \ - << errormsg << std::ends; \ - throw (type)(msg.str()); \ + std::stringstream msg__; \ + msg__ << "Error in " << __FILE__ << ", line " \ + << __LINE__ << " " << GMM_PRETTY_FUNCTION << ": \n" \ + << errormsg << std::ends; \ + throw (type)(msg__.str()); \ } #else #ifndef _MSC_VER @@ -92,19 +95,19 @@ namespace gmm { inline void short_error_throw(const char *file, int line, const char *func, const char *errormsg) { - std::stringstream msg; - msg << "Error in " << file << ", line " << line << " " << func - << ": \n" << errormsg << std::ends; - std::cerr << msg.str() << std::endl; + std::stringstream msg__; + msg__ << "Error in " << file << ", line " << line << " " << func + << ": \n" << errormsg << std::ends; + std::cerr << msg__.str() << std::endl; abort_no_return(); } # define GMM_THROW_(type, errormsg) { \ - std::stringstream msg; \ - msg << "Error in " << __FILE__ << ", line " \ - << __LINE__ << " " << GMM_PRETTY_FUNCTION << ": \n" \ - << errormsg; \ - std::cerr << msg.str() << std::endl; \ + std::stringstream msg__; \ + msg__ << "Error in " << __FILE__ << ", line " \ + << __LINE__ << " " << GMM_PRETTY_FUNCTION << ": \n" \ + << errormsg; \ + std::cerr << msg__.str() << std::endl; \ abort_no_return(); \ } #endif @@ -121,15 +124,12 @@ namespace gmm { # define GMM_ASSERT3(test, errormsg) {} #elif !defined(GMM_FULL_NDEBUG) # define GMM_ASSERT2(test, errormsg) \ - { if (!(test)) gmm::short_error_throw(__FILE__, __LINE__, \ - GMM_PRETTY_FUNCTION, errormsg); } + { if (!(test)) GMM_THROW_(gmm::gmm_error, errormsg); } # define GMM_ASSERT3(test, errormsg) \ - { if (!(test)) gmm::short_error_throw(__FILE__, __LINE__, \ - GMM_PRETTY_FUNCTION, errormsg); } + { if (!(test)) GMM_THROW_(gmm::gmm_error, errormsg); } #else # define GMM_ASSERT2(test, errormsg) \ - { if (!(test)) gmm::short_error_throw(__FILE__, __LINE__, \ - GMM_PRETTY_FUNCTION, errormsg); } + { if (!(test)) GMM_THROW_(gmm::gmm_error, errormsg); } # define GMM_ASSERT3(test, errormsg) #endif @@ -146,7 +146,7 @@ namespace gmm { inline void set_warning_level(int l) { warning_level::level(std::max(0,l)); } inline int get_warning_level(void) { return warning_level::level(-2); } - // This allow not too compile some Warnings + // This allows not to compile some Warnings #ifndef GMM_WARNING_LEVEL # define GMM_WARNING_LEVEL 4 #endif @@ -157,11 +157,11 @@ namespace gmm { // 3 remark // 4 ignored by default. -#define GMM_WARNING_MSG(level_, thestr) { \ - std::stringstream msg; \ - msg << "Level " << level_ << " Warning in " << __FILE__ << ", line " \ - << __LINE__ << ": " << thestr; \ - std::cerr << msg.str() << std::endl; \ +#define GMM_WARNING_MSG(level_, thestr) { \ + std::stringstream msg__; \ + msg__ << "Level " << level_ << " Warning in " << __FILE__ << ", line " \ + << __LINE__ << ": " << thestr; \ + std::cerr << msg__.str() << std::endl; \ } #define GMM_WARNING0(thestr) GMM_WARNING_MSG(0, thestr) @@ -177,21 +177,21 @@ namespace gmm { # define GMM_WARNING2(thestr) \ { if (2 <= gmm::warning_level::level()) GMM_WARNING_MSG(2, thestr) } #else -# define GMM_WARNING1(thestr) {} +# define GMM_WARNING2(thestr) {} #endif #if GMM_WARNING_LEVEL > 2 # define GMM_WARNING3(thestr) \ { if (3 <= gmm::warning_level::level()) GMM_WARNING_MSG(3, thestr) } #else -# define GMM_WARNING1(thestr) {} +# define GMM_WARNING3(thestr) {} #endif #if GMM_WARNING_LEVEL > 3 # define GMM_WARNING4(thestr) \ { if (4 <= gmm::warning_level::level()) GMM_WARNING_MSG(4, thestr) } #else -# define GMM_WARNING1(thestr) {} +# define GMM_WARNING4(thestr) {} #endif /* *********************************************************************** */ @@ -208,7 +208,7 @@ namespace gmm { // This allow not too compile some Warnings #ifndef GMM_TRACES_LEVEL -# define GMM_TRACES_LEVEL 3 +# define GMM_TRACES_LEVEL 4 #endif // Traces levels : 0 always printed @@ -220,10 +220,10 @@ namespace gmm { #define GMM_TRACE_MSG_MPI // for Parallelized version #define GMM_TRACE_MSG(level_, thestr) { \ GMM_TRACE_MSG_MPI { \ - std::stringstream msg; \ - msg << "Trace " << level_ << " in " << __FILE__ << ", line " \ - << __LINE__ << ": " << thestr; \ - std::cout << msg.str() << std::endl; \ + std::stringstream msg__; \ + msg__ << "Trace " << level_ << " in " << __FILE__ << ", line " \ + << __LINE__ << ": " << thestr; \ + std::cout << msg__.str() << std::endl; \ } \ } @@ -338,6 +338,7 @@ namespace gmm { #endif } - - +#else +#include +#endif /* EXTERNAL_EXCEPT_*/ #endif /* GMM_EXCEPT_H__ */ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_inoutput.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_inoutput.h similarity index 95% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_inoutput.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_inoutput.h index f7fc6b45f..56aaed741 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_inoutput.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_inoutput.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard, Julien Pommier + Copyright (C) 2003-2015 Yves Renard, Julien Pommier This file is a part of GETFEM++ @@ -327,7 +327,7 @@ namespace gmm { template void HarwellBoeing_IO::read(csc_matrix& A) { - typedef typename csc_matrix::IND_TYPE IND_TYPE; + // typedef typename csc_matrix::IND_TYPE IND_TYPE; GMM_ASSERT1(f, "no file opened!"); GMM_ASSERT1(Type[0] != 'P', @@ -927,25 +927,25 @@ namespace gmm { } - inline int mm_read_mtx_crd_data(FILE *f, int, int, int nz, int I[], + inline int mm_read_mtx_crd_data(FILE *f, int, int, int nz, int II[], int J[], double val[], MM_typecode matcode) { int i; if (mm_is_complex(matcode)) { for (i=0; i I(nz), J(nz); + std::vector II(nz), J(nz); std::vector PR(nz); - mm_read_mtx_crd_data(f, row, col, nz, &I[0], &J[0], + mm_read_mtx_crd_data(f, row, col, nz, &II[0], &J[0], (double*)&PR[0], matcode); for (size_type i = 0; i < size_type(nz); ++i) { - A(I[i]-1, J[i]-1) = PR[i]; + A(II[i]-1, J[i]-1) = PR[i]; // FIXED MM Format - if (mm_is_hermitian(matcode) && (I[i] != J[i]) ) { - A(J[i]-1, I[i]-1) = gmm::conj(PR[i]); + if (mm_is_hermitian(matcode) && (II[i] != J[i]) ) { + A(J[i]-1, II[i]-1) = gmm::conj(PR[i]); } - if (mm_is_symmetric(matcode) && (I[i] != J[i]) ) { - A(J[i]-1, I[i]-1) = PR[i]; + if (mm_is_symmetric(matcode) && (II[i] != J[i]) ) { + A(J[i]-1, II[i]-1) = PR[i]; } - if (mm_is_skew(matcode) && (I[i] != J[i]) ) { - A(J[i]-1, I[i]-1) = -PR[i]; + if (mm_is_skew(matcode) && (II[i] != J[i]) ) { + A(J[i]-1, II[i]-1) = -PR[i]; } } } @@ -1124,15 +1124,15 @@ namespace gmm { if (is_complex_double__(T())) std::copy(&(t2[0]), &(t2[0])+4, &(t[0])); else std::copy(&(t1[0]), &(t1[0])+4, &(t[0])); size_type nz = A.jc[mat_ncols(A)]; - std::vector I(nz), J(nz); + std::vector II(nz), J(nz); for (size_type j=0; j < mat_ncols(A); ++j) { for (size_type i = A.jc[j]; i < A.jc[j+1]; ++i) { - I[i] = A.ir[i] + 1 - shift; + II[i] = A.ir[i] + 1 - shift; J[i] = int(j + 1); } } mm_write_mtx_crd(filename, int(mat_nrows(A)), int(mat_ncols(A)), - int(nz), &I[0], &J[0], (const double *)A.pr, t); + int(nz), &II[0], &J[0], (const double *)A.pr, t); } @@ -1144,16 +1144,31 @@ namespace gmm { MatrixMarket_IO::write(filename, tmp); } - template static void vecsave(std::string fname, const VEC& V) { - std::ofstream f(fname.c_str()); f.precision(16); f.imbue(std::locale("C")); - for (size_type i=0; i < gmm::vect_size(V); ++i) f << V[i] << "\n"; + template static void vecsave(std::string fname, const VEC& V, + bool binary=false) { + if (binary) { + std::ofstream f(fname.c_str(), std::ofstream::binary); + for (size_type i=0; i < gmm::vect_size(V); ++i) + f.write(reinterpret_cast(&V[i]), sizeof(V[i])); + } + else { + std::ofstream f(fname.c_str()); f.precision(16); f.imbue(std::locale("C")); + for (size_type i=0; i < gmm::vect_size(V); ++i) f << V[i] << "\n"; + } } - template static void vecload(std::string fname, - const VEC& V_) { + template static void vecload(std::string fname, const VEC& V_, + bool binary=false) { VEC &V(const_cast(V_)); - std::ifstream f(fname.c_str()); f.imbue(std::locale("C")); - for (size_type i=0; i < gmm::vect_size(V); ++i) f >> V[i]; + if (binary) { + std::ifstream f(fname.c_str(), std::ifstream::binary); + for (size_type i=0; i < gmm::vect_size(V); ++i) + f.read(reinterpret_cast(&V[i]), sizeof(V[i])); + } + else { + std::ifstream f(fname.c_str()); f.imbue(std::locale("C")); + for (size_type i=0; i < gmm::vect_size(V); ++i) f >> V[i]; + } } } diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_interface.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_interface.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_interface.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_interface.h index 8101f4bae..b1492a8f0 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_interface.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_interface.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_interface_bgeot.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_interface_bgeot.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_interface_bgeot.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_interface_bgeot.h index d7a3bef65..20a5c8de6 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_interface_bgeot.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_interface_bgeot.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_iter.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_iter.h similarity index 91% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_iter.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_iter.h index 5a3a9de62..3ce187507 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_iter.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_iter.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ @@ -39,6 +39,7 @@ #define GMM_ITER_H__ #include "gmm_kernel.h" +#include namespace gmm { @@ -72,7 +73,7 @@ namespace gmm { } iteration(double r = 1.0E-8, int noi = 0, size_type mit = size_type(-1), - double div_res = 1E200) + double div_res = 1E200) : rhsn(1.0), maxiter(mit), noise(noi), resmax(r), diverged_res(div_res) { init(); } @@ -127,17 +128,17 @@ namespace gmm { bool finished(double nr) { if (callback) callback(*this); if (noise > 0 && !written) { - double a = (rhsn == 0) ? 1.0 : rhsn; - converged(nr); - cout << name << " iter " << nit << " residual " - << gmm::abs(nr) / a; -// if (nit % 100 == 0 && nit > 0) { -// cout << " (residual min " << resminreach / a << " mean val " -// << resadd / (100.0 * a) << " )"; -// resadd = 0.0; -// } - cout << endl; - written = true; + double a = (rhsn == 0) ? 1.0 : rhsn; + converged(nr); + cout << name << " iter " << std::setw(3) << nit << " residual " + << std::setw(12) << gmm::abs(nr) / a; +// if (nit % 100 == 0 && nit > 0) { +// cout << " (residual min " << resminreach / a << " mean val " +// << resadd / (100.0 * a) << " )"; +// resadd = 0.0; +// } + cout << endl; + written = true; } return (converged(nr) || diverged(nr)); } diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_iter_solvers.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_iter_solvers.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_iter_solvers.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_iter_solvers.h index f7a1ad310..aabc2fdd0 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_iter_solvers.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_iter_solvers.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_kernel.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_kernel.h similarity index 98% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_kernel.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_kernel.h index a52a5cdde..046dad0bc 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_kernel.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_kernel.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_lapack_interface.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_lapack_interface.h similarity index 64% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_lapack_interface.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_lapack_interface.h index ac694a610..d146dc7af 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_lapack_interface.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_lapack_interface.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ @@ -35,8 +35,6 @@ @brief gmm interface for LAPACK */ -#if defined(GMM_USES_LAPACK) - #ifndef GMM_LAPACK_INTERFACE_H #define GMM_LAPACK_INTERFACE_H @@ -45,6 +43,8 @@ #include "gmm_dense_qr.h" +#if defined(GMM_USES_LAPACK) + namespace gmm { /* ********************************************************************* */ @@ -69,6 +69,15 @@ namespace gmm { /* implicit_qr_algorithm(dense_matrix, std::vector >, */ /* dense_matrix) */ /* */ + /* geev_interface_right */ + /* geev_interface_left */ + /* */ + /* schur(dense_matrix, dense_matrix, dense_matrix) */ + /* */ + /* svd(dense_matrix, dense_matrix, dense_matrix, std::vector)*/ + /* svd(dense_matrix, dense_matrix, dense_matrix, */ + /* std::vector >) */ + /* */ /* ********************************************************************* */ /* ********************************************************************* */ @@ -84,6 +93,7 @@ namespace gmm { void sormqr_(...); void dormqr_(...); void cunmqr_(...); void zunmqr_(...); void sgees_ (...); void dgees_ (...); void cgees_ (...); void zgees_ (...); void sgeev_ (...); void dgeev_ (...); void cgeev_ (...); void zgeev_ (...); + void sgeesx_(...); void dgeesx_(...); void cgeesx_(...); void zgeesx_(...); void sgesvd_(...); void dgesvd_(...); void cgesvd_(...); void zgesvd_(...); } @@ -110,8 +120,8 @@ namespace gmm { # define getrs_interface(f_name, trans1, lapack_name, base_type) inline \ void f_name(const dense_matrix &A, \ - const std::vector &ipvt, std::vector &x, \ - const std::vector &b) { \ + const std::vector &ipvt, std::vector &x, \ + const std::vector &b) { \ GMMLAPACK_TRACE("getrs_interface"); \ int n = int(mat_nrows(A)), info, nrhs(1); \ gmm::copy(b, x); trans1; \ @@ -161,19 +171,19 @@ namespace gmm { /* QR factorization. */ /* ********************************************************************* */ -# define geqrf_interface(lapack_name1, base_type) inline \ - void qr_factor(dense_matrix &A){ \ - GMMLAPACK_TRACE("geqrf_interface"); \ +# define geqrf_interface(lapack_name1, base_type) inline \ + void qr_factor(dense_matrix &A){ \ + GMMLAPACK_TRACE("geqrf_interface"); \ int m = int(mat_nrows(A)), n = int(mat_ncols(A)), info, lwork(-1); \ base_type work1; \ - if (m && n) { \ - std::vector tau(n); \ + if (m && n) { \ + std::vector tau(n); \ lapack_name1(&m, &n, &A(0,0), &m, &tau[0], &work1 , &lwork, &info); \ - lwork = int(gmm::real(work1)); \ - std::vector work(lwork); \ + lwork = int(gmm::real(work1)); \ + std::vector work(lwork); \ lapack_name1(&m, &n, &A(0,0), &m, &tau[0], &work[0], &lwork, &info); \ - GMM_ASSERT1(!info, "QR factorization failed"); \ - } \ + GMM_ASSERT1(!info, "QR factorization failed"); \ + } \ } geqrf_interface(sgeqrf_, BLAS_S) @@ -188,7 +198,7 @@ namespace gmm { dense_matrix &Q, dense_matrix &R) { \ GMMLAPACK_TRACE("geqrf_interface2"); \ int m = int(mat_nrows(A)), n = int(mat_ncols(A)), info, lwork(-1); \ - base_type work1; \ + base_type work1; \ if (m && n) { \ gmm::copy(A, Q); \ std::vector tau(n); \ @@ -232,7 +242,7 @@ namespace gmm { lwork = int(gmm::real(work1)); \ std::vector work(lwork); \ lapack_name(&jobvs, &sort, p, &n, &H(0,0), &n, &sdim, &eigv1[0], \ - &eigv2[0], &Q(0,0), &n, &work[0], &lwork, &rwork[0],&info);\ + &eigv2[0], &Q(0,0), &n, &work[0], &lwork, &rwork[0],&info);\ GMM_ASSERT1(!info, "QR algorithm failed"); \ extract_eig(H, const_cast(eigval_), tol); \ } @@ -264,100 +274,124 @@ namespace gmm { gees_interface2(cgees_, BLAS_C) gees_interface2(zgees_, BLAS_Z) -# define geev_int_right(lapack_name, base_type) \ - template inline void geev_interface_right( \ + +# define jobv_right char jobvl = 'N', jobvr = 'V'; +# define jobv_left char jobvl = 'V', jobvr = 'N'; + +# define geev_interface(lapack_name, base_type, side) \ + template inline void geev_interface_ ## side( \ const dense_matrix &A, const VECT &eigval_, \ - dense_matrix &Q) { \ + dense_matrix &Q) { \ GMMLAPACK_TRACE("geev_interface"); \ int n = int(mat_nrows(A)), info, lwork(-1); base_type work1; \ if (!n) return; \ dense_matrix H(n,n); gmm::copy(A, H); \ - char jobvl = 'N', jobvr = 'V'; \ + jobv_ ## side \ std::vector eigvr(n), eigvi(n); \ lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigvr[0], &eigvi[0], \ - &Q(0,0), &n, &Q(0,0), &n, &work1, &lwork, &info); \ + &Q(0,0), &n, &Q(0,0), &n, &work1, &lwork, &info); \ lwork = int(gmm::real(work1)); \ std::vector work(lwork); \ lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigvr[0], &eigvi[0], \ - &Q(0,0), &n, &Q(0,0), &n, &work[0], &lwork, &info); \ + &Q(0,0), &n, &Q(0,0), &n, &work[0], &lwork, &info); \ GMM_ASSERT1(!info, "QR algorithm failed"); \ - gmm::copy(eigvr, gmm::real_part(const_cast(eigval_))); \ - gmm::copy(eigvi, gmm::imag_part(const_cast(eigval_))); \ + gmm::copy(eigvr, gmm::real_part(const_cast(eigval_))); \ + gmm::copy(eigvi, gmm::imag_part(const_cast(eigval_))); \ } -# define geev_int_rightc(lapack_name, base_type) \ - template inline void geev_interface_right( \ +# define geev_interface2(lapack_name, base_type, side) \ + template inline void geev_interface_ ## side( \ const dense_matrix &A, const VECT &eigval_, \ - dense_matrix &Q) { \ + dense_matrix &Q) { \ GMMLAPACK_TRACE("geev_interface"); \ int n = int(mat_nrows(A)), info, lwork(-1); base_type work1; \ if (!n) return; \ dense_matrix H(n,n); gmm::copy(A, H); \ - char jobvl = 'N', jobvr = 'V'; \ - std::vector rwork(2*n); \ + jobv_ ## side \ + std::vector rwork(2*n); \ std::vector eigv(n); \ lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigv[0], &Q(0,0), &n, \ - &Q(0,0), &n, &work1, &lwork, &rwork[0], &info); \ + &Q(0,0), &n, &work1, &lwork, &rwork[0], &info); \ lwork = int(gmm::real(work1)); \ std::vector work(lwork); \ lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigv[0], &Q(0,0), &n, \ - &Q(0,0), &n, &work[0], &lwork, &rwork[0], &info); \ + &Q(0,0), &n, &work[0], &lwork, &rwork[0], &info); \ GMM_ASSERT1(!info, "QR algorithm failed"); \ - gmm::copy(eigv, const_cast(eigval_)); \ + gmm::copy(eigv, const_cast(eigval_)); \ } - geev_int_right(sgeev_, BLAS_S) - geev_int_right(dgeev_, BLAS_D) - geev_int_rightc(cgeev_, BLAS_C) - geev_int_rightc(zgeev_, BLAS_Z) + geev_interface(sgeev_, BLAS_S, right) + geev_interface(dgeev_, BLAS_D, right) + geev_interface2(cgeev_, BLAS_C, right) + geev_interface2(zgeev_, BLAS_Z, right) -# define geev_int_left(lapack_name, base_type) \ - template inline void geev_interface_left( \ - const dense_matrix &A, const VECT &eigval_, \ - dense_matrix &Q) { \ - GMMLAPACK_TRACE("geev_interface"); \ - int n = int(mat_nrows(A)), info, lwork(-1); base_type work1; \ - if (!n) return; \ - dense_matrix H(n,n); gmm::copy(A, H); \ - char jobvl = 'V', jobvr = 'N'; \ - std::vector eigvr(n), eigvi(n); \ - lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigvr[0], &eigvi[0], \ - &Q(0,0), &n, &Q(0,0), &n, &work1, &lwork, &info); \ - lwork = int(gmm::real(work1)); \ - std::vector work(lwork); \ - lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigvr[0], &eigvi[0], \ - &Q(0,0), &n, &Q(0,0), &n, &work[0], &lwork, &info); \ - GMM_ASSERT1(!info, "QR algorithm failed"); \ - gmm::copy(eigvr, gmm::real_part(const_cast(eigval_))); \ - gmm::copy(eigvi, gmm::imag_part(const_cast(eigval_))); \ + geev_interface(sgeev_, BLAS_S, left) + geev_interface(dgeev_, BLAS_D, left) + geev_interface2(cgeev_, BLAS_C, left) + geev_interface2(zgeev_, BLAS_Z, left) + + + /* ********************************************************************* */ + /* SCHUR algorithm: */ + /* A = Q*S*(Q^T), with Q orthogonal and S upper quasi-triangula */ + /* ********************************************************************* */ + +# define geesx_interface(lapack_name, base_type) inline \ + void schur(dense_matrix &A, \ + dense_matrix &S, \ + dense_matrix &Q) { \ + GMMLAPACK_TRACE("geesx_interface"); \ + int m = int(mat_nrows(A)), n = int(mat_ncols(A)); \ + GMM_ASSERT1(m == n, "Schur decomposition requires square matrix"); \ + char jobvs = 'V', sort = 'N', sense = 'N'; \ + bool select = false; \ + int lwork = 8*n, sdim = 0, liwork = 1; \ + std::vector work(lwork), wr(n), wi(n); \ + std::vector iwork(liwork); \ + std::vector bwork(1); \ + resize(S, n, n); copy(A, S); \ + resize(Q, n, n); \ + base_type rconde(0), rcondv(0); \ + int info = -1; \ + lapack_name(&jobvs, &sort, &select, &sense, &n, &S(0,0), &n, \ + &sdim, &wr[0], &wi[0], &Q(0,0), &n, &rconde, &rcondv, \ + &work[0], &lwork, &iwork[0], &liwork, &bwork[0], &info);\ + GMM_ASSERT1(!info, "SCHUR algorithm failed"); \ } -# define geev_int_leftc(lapack_name, base_type) \ - template inline void geev_interface_left( \ - const dense_matrix &A, const VECT &eigval_, \ - dense_matrix &Q) { \ - GMMLAPACK_TRACE("geev_interface"); \ - int n = int(mat_nrows(A)), info, lwork(-1); base_type work1; \ - if (!n) return; \ - dense_matrix H(n,n); gmm::copy(A, H); \ - char jobvl = 'V', jobvr = 'N'; \ - std::vector rwork(2*n); \ - std::vector eigv(n); \ - lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigv[0], &Q(0,0), &n, \ - &Q(0,0), &n, &work1, &lwork, &rwork[0], &info); \ - lwork = int(gmm::real(work1)); \ - std::vector work(lwork); \ - lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigv[0], &Q(0,0), &n, \ - &Q(0,0), &n, &work[0], &lwork, &rwork[0], &info); \ - GMM_ASSERT1(!info, "QR algorithm failed"); \ - gmm::copy(eigv, const_cast(eigval_)); \ +# define geesx_interface2(lapack_name, base_type) inline \ + void schur(dense_matrix &A, \ + dense_matrix &S, \ + dense_matrix &Q) { \ + GMMLAPACK_TRACE("geesx_interface"); \ + int m = int(mat_nrows(A)), n = int(mat_ncols(A)); \ + GMM_ASSERT1(m == n, "Schur decomposition requires square matrix"); \ + char jobvs = 'V', sort = 'N', sense = 'N'; \ + bool select = false; \ + int lwork = 8*n, sdim = 0; \ + std::vector rwork(lwork); \ + std::vector work(lwork), w(n); \ + std::vector bwork(1); \ + resize(S, n, n); copy(A, S); \ + resize(Q, n, n); \ + base_type rconde(0), rcondv(0); \ + int info = -1; \ + lapack_name(&jobvs, &sort, &select, &sense, &n, &S(0,0), &n, \ + &sdim, &w[0], &Q(0,0), &n, &rconde, &rcondv, \ + &work[0], &lwork, &rwork[0], &bwork[0], &info); \ + GMM_ASSERT1(!info, "SCHUR algorithm failed"); \ } - geev_int_left(sgeev_, BLAS_S) - geev_int_left(dgeev_, BLAS_D) - geev_int_leftc(cgeev_, BLAS_C) - geev_int_leftc(zgeev_, BLAS_Z) - + geesx_interface(sgeesx_, BLAS_S) + geesx_interface(dgeesx_, BLAS_D) + geesx_interface2(cgeesx_, BLAS_C) + geesx_interface2(zgeesx_, BLAS_Z) + + template + void schur(const MAT &A_, MAT &S, MAT &Q) { + MAT A(A_); + schur(A, S, Q); + } /* ********************************************************************* */ @@ -366,56 +400,74 @@ namespace gmm { /* ********************************************************************* */ # define gesvd_interface(lapack_name, base_type) inline \ - void svd(dense_matrix &X, \ - dense_matrix &U, \ - dense_matrix &Vtransposed, \ - std::vector &sigma) { \ - GMMLAPACK_TRACE("gesvd_interface"); \ - int m = int(mat_nrows(X)), n = int(mat_ncols(X)); \ - int mn_min = m < n ? m : n; \ - sigma.resize(mn_min); \ - std::vector work(15 * mn_min); \ - int lwork = int(work.size()); \ - resize(U, m, n); \ - resize(Vtransposed, n, n); \ - char job = 'A'; \ - int info = -1; \ - lapack_name(&job, &job, &m, &n, &X(0,0), &m, &sigma[0], &U(0,0), \ - &m, &Vtransposed(0,0), &n, &work[0], &lwork, &info); \ + void svd(dense_matrix &X, \ + dense_matrix &U, \ + dense_matrix &Vtransposed, \ + std::vector &sigma) { \ + GMMLAPACK_TRACE("gesvd_interface"); \ + int m = int(mat_nrows(X)), n = int(mat_ncols(X)); \ + int mn_min = m < n ? m : n; \ + sigma.resize(mn_min); \ + std::vector work(15 * mn_min); \ + int lwork = int(work.size()); \ + resize(U, m, m); \ + resize(Vtransposed, n, n); \ + char job = 'A'; \ + int info = -1; \ + lapack_name(&job, &job, &m, &n, &X(0,0), &m, &sigma[0], &U(0,0), \ + &m, &Vtransposed(0,0), &n, &work[0], &lwork, &info); \ } # define cgesvd_interface(lapack_name, base_type, base_type2) inline \ - void svd(dense_matrix &X, \ - dense_matrix &U, \ - dense_matrix &Vtransposed, \ - std::vector &sigma) { \ - GMMLAPACK_TRACE("gesvd_interface"); \ - int m = int(mat_nrows(X)), n = int(mat_ncols(X)); \ - int mn_min = m < n ? m : n; \ - sigma.resize(mn_min); \ - std::vector work(15 * mn_min); \ - std::vector rwork(5 * mn_min); \ - int lwork = int(work.size()); \ - resize(U, m, n); \ - resize(Vtransposed, n, n); \ - char job = 'A'; \ - int info = -1; \ - lapack_name(&job, &job, &m, &n, &X(0,0), &m, &sigma[0], &U(0,0), \ - &m, &Vtransposed(0,0), &n, &work[0], &lwork, \ - &rwork[0], &info); \ + void svd(dense_matrix &X, \ + dense_matrix &U, \ + dense_matrix &Vtransposed, \ + std::vector &sigma) { \ + GMMLAPACK_TRACE("gesvd_interface"); \ + int m = int(mat_nrows(X)), n = int(mat_ncols(X)); \ + int mn_min = m < n ? m : n; \ + sigma.resize(mn_min); \ + std::vector work(15 * mn_min); \ + std::vector rwork(5 * mn_min); \ + int lwork = int(work.size()); \ + resize(U, m, m); \ + resize(Vtransposed, n, n); \ + char job = 'A'; \ + int info = -1; \ + lapack_name(&job, &job, &m, &n, &X(0,0), &m, &sigma[0], &U(0,0), \ + &m, &Vtransposed(0,0), &n, &work[0], &lwork, \ + &rwork[0], &info); \ } gesvd_interface(sgesvd_, BLAS_S) gesvd_interface(dgesvd_, BLAS_D) cgesvd_interface(cgesvd_, BLAS_C, BLAS_S) cgesvd_interface(zgesvd_, BLAS_Z, BLAS_D) - + + template + void svd(const MAT &X_, MAT &U, MAT &Vtransposed, VEC &sigma) { + MAT X(X_); + svd(X, U, Vtransposed, sigma); + } } -#endif // GMM_LAPACK_INTERFACE_H +#else + +namespace gmm +{ +template +void schur(const MAT &A_, MAT &S, MAT &Q) +{ + GMM_ASSERT1(false, "Use of function schur(A,S,Q) requires GetFEM++ " + "to be built with Lapack"); +} + +}// namespace gmm #endif // GMM_USES_LAPACK + +#endif // GMM_LAPACK_INTERFACE_H diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_least_squares_cg.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_least_squares_cg.h similarity index 98% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_least_squares_cg.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_least_squares_cg.h index 442d4d336..09e061526 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_least_squares_cg.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_least_squares_cg.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard, Benjamin Schleimer + Copyright (C) 2002-2015 Yves Renard, Benjamin Schleimer This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_matrix.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_matrix.h similarity index 98% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_matrix.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_matrix.h index 2504786d5..54cc024cd 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_matrix.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_matrix.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ @@ -64,8 +64,8 @@ namespace gmm v1(i,i) += typename linalg_traits::value_type(1); } template inline - void add(const identity_matrix &I, const M &v1) - { add(I, linalg_const_cast(v1)); } + void add(const identity_matrix &II, const M &v1) + { add(II, linalg_const_cast(v1)); } template inline void mult(const identity_matrix&, const V1 &v1, V2 &v2) @@ -365,6 +365,9 @@ namespace gmm return *(this->begin() + c*nbl+l); } + std::vector &as_vector(void) { return *this; } + const std::vector &as_vector(void) const { return *this; } + void resize(size_type, size_type); void reshape(size_type, size_type); @@ -491,7 +494,7 @@ namespace gmm template struct csc_matrix { - typedef unsigned long long IND_TYPE; + typedef unsigned int IND_TYPE; std::vector pr; std::vector ir; @@ -639,7 +642,7 @@ namespace gmm template struct csr_matrix { - typedef unsigned long long IND_TYPE; + typedef unsigned int IND_TYPE; std::vector pr; // values. std::vector ir; // col indices. @@ -943,17 +946,7 @@ namespace gmm /* ******************************************************************** */ #ifdef GMM_USES_MPI - -// Problem : GETFEM_HAVE_MPI_H not defined in gmm : NOT SATIFACTORY !! -#include - -# if defined(GETFEM_HAVE_MPI_H) -# include -# elif defined(GETFEM_HAVE_MPI_MPI_H) -# include -# elif defined(GETFEM_HAVE_MPICH2_MPI_H) -# include -# endif +# include namespace gmm { diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_modified_gram_schmidt.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_modified_gram_schmidt.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_modified_gram_schmidt.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_modified_gram_schmidt.h index f49a1d233..86c18360f 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_modified_gram_schmidt.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_modified_gram_schmidt.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_opt.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_opt.h similarity index 93% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_opt.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_opt.h index c62a13017..7a3cb2e2f 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_opt.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_opt.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ @@ -69,7 +69,7 @@ namespace gmm { } - template T lu_inverse(const dense_matrix &A_) { + template T lu_inverse(const dense_matrix &A_, bool doassert = true) { dense_matrix& A = const_cast &>(A_); size_type N = mat_nrows(A); T det(1); @@ -79,12 +79,14 @@ namespace gmm { switch (N) { case 1 : { det = *p; - GMM_ASSERT1(det!=T(0), "non invertible matrix"); + if (doassert) GMM_ASSERT1(det!=T(0), "non invertible matrix"); + if (det == T(0)) break; *p = T(1) / det; } break; case 2 : { det = (*p) * (*(p+3)) - (*(p+1)) * (*(p+2)); - GMM_ASSERT1(det!=T(0), "non invertible matrix"); + if (doassert) GMM_ASSERT1(det!=T(0), "non invertible matrix"); + if (det == T(0)) break; std::swap(*p, *(p+3)); *p++ /= det; *p++ /= -det; *p++ /= -det; *p++ /= det; } break; diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond.h similarity index 98% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_precond.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_precond.h index bd76606b5..3e5fb20c6 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2004-2012 Yves Renard + Copyright (C) 2004-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_diagonal.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_diagonal.h similarity index 98% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_diagonal.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_diagonal.h index b0ad0754a..91dff1d55 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_diagonal.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_diagonal.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ @@ -113,7 +113,7 @@ namespace gmm { template inline void right_mult(const diagonal_precond& P, const V1 &v1, V2 &v2) { - typedef typename linalg_traits::value_type T; + // typedef typename linalg_traits::value_type T; GMM_ASSERT2(P.diag.size() == vect_size(v2), "dimensions mismatch"); copy(v1, v2); # ifdef DIAG_LEFT_MULT_SQRT diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ildlt.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ildlt.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ildlt.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ildlt.h index bce1fb0cb..060c99c88 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ildlt.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ildlt.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ildltt.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ildltt.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ildltt.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ildltt.h index ca73c5b31..f0fac0a5c 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ildltt.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ildltt.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ilu.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ilu.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ilu.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ilu.h index 71f24d0b5..b529aa0cd 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ilu.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ilu.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ilut.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ilut.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ilut.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ilut.h index 7273532dc..a57612633 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ilut.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ilut.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ilutp.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ilutp.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ilutp.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ilutp.h index 41a21473f..98eae3724 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_ilutp.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_ilutp.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2004-2012 Yves Renard + Copyright (C) 2004-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_mr_approx_inverse.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_mr_approx_inverse.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_mr_approx_inverse.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_mr_approx_inverse.h index 80733cf35..41d9da3d7 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_precond_mr_approx_inverse.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_precond_mr_approx_inverse.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_range_basis.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_range_basis.h similarity index 98% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_range_basis.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_range_basis.h index 9422d7697..68eafd5ee 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_range_basis.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_range_basis.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2009-2012 Yves Renard + Copyright (C) 2009-2015 Yves Renard This file is a part of GETFEM++ @@ -437,7 +437,7 @@ namespace gmm { c1.clear(); } } - if (c1.size() > 10) + if (c1.size() > 1) range_basis_eff_Gram_Schmidt_dense(B, c1, c_ortho, EPS); for (std::set::iterator it = c1.begin(); it != c1.end(); ++it) cres.insert(*it); @@ -446,7 +446,6 @@ namespace gmm { if (columns.size() == nc_r) break; if (sizesm[k] >= 350 && columns.size() > (nc_r*19)/20) break; } - // cout << "size of columns " << columns.size() << endl; if (columns.size() > std::max(size_type(10), actsize)) range_basis_eff_Lanczos(B, columns, EPS); else @@ -484,7 +483,7 @@ namespace gmm { The LU decomposition has been tested for local elimination but gives bad results : the algorithm is unstable and do not permit to give the right number of vector at the end of the process. Moreover, the number of final - vector depend greatly on the number of vectors in a block of the local + vectors depends greatly on the number of vectors in a block of the local analysis. */ template diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_real_part.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_real_part.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_real_part.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_real_part.h index 31439d6be..089bdc35c 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_real_part.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_real_part.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_ref.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_ref.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_ref.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_ref.h index e2dbcbec9..ce17513c8 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_ref.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_ref.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2000-2012 Yves Renard + Copyright (C) 2000-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_scaled.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_scaled.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_scaled.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_scaled.h index 5a0e5adf8..ff05094cc 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_scaled.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_scaled.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_Schwarz_additive.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_Schwarz_additive.h similarity index 96% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_Schwarz_additive.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_Schwarz_additive.h index 21b094ca9..a842f497f 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_Schwarz_additive.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_Schwarz_additive.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ @@ -212,23 +212,22 @@ namespace gmm { #ifdef GMM_USES_MPI } if (nproc != size - 1) { - MPI_Sendrecv(Acsr.jc, sizeA+1, MPI_INT, next, tag2, - Acsrtemp.jc, sizeA+1,MPI_INT,previous,tag2, - MPI_COMM_WORLD,&status); - if (Acsrtemp.jc[sizeA] > size_type(sizepr)) { - sizepr = Acsrtemp.jc[sizeA]; - delete[] Acsrtemp.pr; delete[] Acsrtemp.ir; - Acsrtemp.pr = new value_type[sizepr]; - Acsrtemp.ir = new unsigned int[sizepr]; - } - MPI_Sendrecv(Acsr.ir, Acsr.jc[sizeA], MPI_INT, next, tag1, - Acsrtemp.ir, Acsrtemp.jc[sizeA],MPI_INT,previous,tag1, - MPI_COMM_WORLD,&status); - - MPI_Sendrecv(Acsr.pr, Acsr.jc[sizeA], mpi_type(value_type()), next, tag3, - Acsrtemp.pr, Acsrtemp.jc[sizeA],mpi_type(value_type()),previous,tag3, - MPI_COMM_WORLD,&status); - gmm::copy(Acsrtemp, Acsr); + MPI_Sendrecv(&(Acsr.jc[0]), sizeA+1, MPI_INT, next, tag2, + &(Acsrtemp.jc[0]), sizeA+1, MPI_INT, previous, tag2, + MPI_COMM_WORLD, &status); + if (Acsrtemp.jc[sizeA] > size_type(sizepr)) { + sizepr = Acsrtemp.jc[sizeA]; + gmm::resize(Acsrtemp.pr, sizepr); + gmm::resize(Acsrtemp.ir, sizepr); + } + MPI_Sendrecv(&(Acsr.ir[0]), Acsr.jc[sizeA], MPI_INT, next, tag1, + &(Acsrtemp.ir[0]), Acsrtemp.jc[sizeA], MPI_INT, previous, tag1, + MPI_COMM_WORLD, &status); + + MPI_Sendrecv(&(Acsr.pr[0]), Acsr.jc[sizeA], mpi_type(value_type()), next, tag3, + &(Acsrtemp.pr[0]), Acsrtemp.jc[sizeA], mpi_type(value_type()), previous, tag3, + MPI_COMM_WORLD, &status); + gmm::copy(Acsrtemp, Acsr); } } t_final=MPI_Wtime(); @@ -645,7 +644,7 @@ namespace gmm { if (conv_r < first_res) ++count; if (r < first_res * alpha_min_ratio) - { count_pat = 0.; return true; } + { count_pat = 0; return true; } if (count >= 5 || (alpha < alpha_min && max_ratio_reached)) { if (conv_r < first_res * 0.99) count_pat = 0; if (/*gmm::random() * 50. < -log(conv_alpha)-4.0 ||*/ count_pat >= 3) diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_bfgs.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_bfgs.h similarity index 95% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_bfgs.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_bfgs.h index 80d7c2e8a..7d34c5239 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_bfgs.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_bfgs.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2004-2012 Yves Renard + Copyright (C) 2004-2015 Yves Renard This file is a part of GETFEM++ @@ -93,6 +93,8 @@ namespace gmm { template void update(const VECT1 &deltak, const VECT2 &gammak) { + T vsp = vect_sp(deltak, gammak); + if (vsp == T(0)) return; size_type N = vect_size(deltak), k = delta.size(); VECTOR Y(N); hmult(gammak, Y); @@ -101,7 +103,7 @@ namespace gmm { resize(delta[k], N); resize(gamma[k], N); resize(zeta[k], N); gmm::copy(deltak, delta[k]); gmm::copy(gammak, gamma[k]); - rho[k] = R(1) / vect_sp(deltak, gammak); + rho[k] = R(1) / vsp; if (version == 0) add(delta[k], scaled(Y, -1), zeta[k]); else @@ -114,7 +116,7 @@ namespace gmm { template - void bfgs(FUNCTION f, DERIVATIVE grad, VECTOR &x, + void bfgs(const FUNCTION &f, const DERIVATIVE &grad, VECTOR &x, int restart, iteration& iter, int version = 0, double lambda_init=0.001, double print_norm=1.0) { @@ -174,7 +176,7 @@ namespace gmm { ++iter; if (!grad_computed) grad(y, r2); gmm::add(scaled(r2, -1), r); - if (iter.get_iteration() % restart == 0 || blocked) { + if ((iter.get_iteration() % restart) == 0 || blocked) { if (iter.get_noisy() >= 1) cout << "Restart\n"; invhessian.restart(); if (++nb_restart > 10) { @@ -195,7 +197,7 @@ namespace gmm { template - inline void dfp(FUNCTION f, DERIVATIVE grad, VECTOR &x, + inline void dfp(const FUNCTION &f, const DERIVATIVE &grad, VECTOR &x, int restart, iteration& iter, int version = 1) { bfgs(f, grad, x, restart, iter, version); diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_bicgstab.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_bicgstab.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_bicgstab.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_bicgstab.h index 43ac687e4..5a176fe01 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_bicgstab.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_bicgstab.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_cg.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_cg.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_cg.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_cg.h index 8a70730e2..8c34bb249 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_cg.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_cg.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_constrained_cg.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_constrained_cg.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_constrained_cg.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_constrained_cg.h index 7d6e5b72b..a9463cf13 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_constrained_cg.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_constrained_cg.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_gmres.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_gmres.h similarity index 90% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_gmres.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_gmres.h index 282974f4d..006dad41e 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_gmres.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_gmres.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ @@ -74,7 +74,6 @@ #include "gmm_kernel.h" #include "gmm_iter.h" #include "gmm_modified_gram_schmidt.h" -#include "gmm_dense_Householder.h" namespace gmm { @@ -126,20 +125,20 @@ t_ref = MPI_Wtime(); size_type i = 0; inner.init(); do { - mult(A, KS[i], u); - mult(M, u, KS[i+1]); - orthogonalize(KS, mat_col(H, i), i); - R a = gmm::vect_norm2(KS[i+1]); - H(i+1, i) = T(a); - gmm::scale(KS[i+1], T(1) / a); - for (size_type k = 0; k < i; ++k) - Apply_Givens_rotation_left(H(k,i), H(k+1,i), c_rot[k], s_rot[k]); + mult(A, KS[i], u); + mult(M, u, KS[i+1]); + orthogonalize(KS, mat_col(H, i), i); + R a = gmm::vect_norm2(KS[i+1]); + H(i+1, i) = T(a); + gmm::scale(KS[i+1], T(1) / a); + for (size_type k = 0; k < i; ++k) + Apply_Givens_rotation_left(H(k,i), H(k+1,i), c_rot[k], s_rot[k]); - Givens_rotation(H(i,i), H(i+1,i), c_rot[i], s_rot[i]); - Apply_Givens_rotation_left(H(i,i), H(i+1,i), c_rot[i], s_rot[i]); - Apply_Givens_rotation_left(s[i], s[i+1], c_rot[i], s_rot[i]); + Givens_rotation(H(i,i), H(i+1,i), c_rot[i], s_rot[i]); + Apply_Givens_rotation_left(H(i,i), H(i+1,i), c_rot[i], s_rot[i]); + Apply_Givens_rotation_left(s[i], s[i+1], c_rot[i], s_rot[i]); - ++inner, ++outer, ++i; + ++inner, ++outer, ++i; } while (! inner.finished(gmm::abs(s[i]))); upper_tri_solve(H, s, i, false); diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_idgmres.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_idgmres.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_idgmres.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_idgmres.h index 1f69d8a12..140da877c 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_idgmres.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_idgmres.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard, Caroline Lecalvez + Copyright (C) 2003-2015 Yves Renard, Caroline Lecalvez This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_qmr.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_qmr.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_qmr.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_qmr.h index 5257d70fa..8aaea6813 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_solver_qmr.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_solver_qmr.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_std.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_std.h similarity index 68% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_std.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_std.h index cc1d7e05b..b496b6925 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_std.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_std.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ @@ -30,10 +30,10 @@ ===========================================================================*/ /**@file gmm_std.h - @author Yves Renard , - @author Julien Pommier - @date June 01, 1995. - @brief basic setup for gmm (includes, typedefs etc.) +@author Yves Renard , +@author Julien Pommier +@date June 01, 1995. +@brief basic setup for gmm (includes, typedefs etc.) */ #ifndef GMM_STD_H__ #define GMM_STD_H__ @@ -74,10 +74,7 @@ # define SECURE_STRDUP(s) strdup(s) #endif - -#if !defined(GMM_USES_MPI) && GETFEM_PARA_LEVEL > 0 -# define GMM_USES_MPI -#endif +#define GMM_NOPERATION(a) { abs(&(a) != &(a)); } /* ********************************************************************** */ /* Compilers detection. */ @@ -91,9 +88,9 @@ #endif */ /* for VISUAL C++ ... - #if defined(_MSC_VER) // && !defined(__MWERKS__) - #define _GETFEM_MSVCPP_ _MSC_VER - #endif +#if defined(_MSC_VER) // && !defined(__MWERKS__) +#define _GETFEM_MSVCPP_ _MSC_VER +#endif */ #if defined(__GNUC__) @@ -129,17 +126,68 @@ #include #include #include +#include -namespace gmm { +#ifdef GETFEM_HAVE_OPENMP +#include + /**number of OpenMP threads*/ + inline size_t num_threads(){return omp_get_max_threads();} + /**index of the current thread*/ + inline size_t this_thread() {return omp_get_thread_num();} + /**is the program running in the parallel section*/ + inline bool me_is_multithreaded_now(){return static_cast(omp_in_parallel());} +#else + inline size_t num_threads(){return size_t(1);} + inline size_t this_thread() {return size_t(0);} + inline bool me_is_multithreaded_now(){return false;} +#endif - using std::endl; using std::cout; using std::cerr; - using std::ends; using std::cin; +namespace gmm { + using std::endl; using std::cout; using std::cerr; + using std::ends; using std::cin; + +#ifdef _WIN32 + + class standard_locale { + std::string cloc; + std::locale cinloc; + public : + inline standard_locale(void) : cinloc(cin.getloc()) + { + if (!me_is_multithreaded_now()){ + cloc=setlocale(LC_NUMERIC, 0); + setlocale(LC_NUMERIC,"C"); + } + } + + inline ~standard_locale() { + if (!me_is_multithreaded_now()) + setlocale(LC_NUMERIC, cloc.c_str()); + + } + }; +#else + /**this is the above solutions for linux, but I still needs to be tested.*/ + //class standard_locale { + // locale_t oldloc; + // locale_t temploc; + + //public : + // inline standard_locale(void) : oldloc(uselocale((locale_t)0)) + // { + // temploc = newlocale(LC_NUMERIC, "C", NULL); + // uselocale(temploc); + // } + + // inline ~standard_locale() + // { + // uselocale(oldloc); + // freelocale(temploc); + // } + //}; - /* ********************************************************************* */ - /* Change locale temporarily. */ - /* ********************************************************************* */ class standard_locale { std::string cloc; @@ -153,6 +201,9 @@ namespace gmm { { setlocale(LC_NUMERIC, cloc.c_str()); cin.imbue(cinloc); } }; + +#endif + class stream_standard_locale { std::locale cloc; std::ios &io; @@ -162,10 +213,10 @@ namespace gmm { : cloc(i.getloc()), io(i) { io.imbue(std::locale("C")); } inline ~stream_standard_locale() { io.imbue(cloc); } }; - - - - + + + + /* ******************************************************************* */ /* Clock functions. */ /* ******************************************************************* */ @@ -186,49 +237,49 @@ namespace gmm { /* ******************************************************************** */ // Remark : the test program dynamic_array tests the lenght of // resulting integers - + template struct fixed_size_integer_generator { typedef void int_base_type; typedef void uint_base_type; }; - + template <> struct fixed_size_integer_generator { typedef signed char int_base_type; typedef unsigned char uint_base_type; }; - + template <> struct fixed_size_integer_generator { - typedef signed short int int_base_type; - typedef unsigned short int uint_base_type; - }; + typedef signed short int int_base_type; + typedef unsigned short int uint_base_type; +}; - template <> struct fixed_size_integer_generator { +template <> struct fixed_size_integer_generator { typedef signed int int_base_type; typedef unsigned int uint_base_type; }; - - template <> struct fixed_size_integer_generator { + +template <> struct fixed_size_integer_generator { typedef signed long int_base_type; typedef unsigned long uint_base_type; }; - template <> struct fixed_size_integer_generator { +template <> struct fixed_size_integer_generator { typedef signed long long int_base_type; typedef unsigned long long uint_base_type; }; - - typedef fixed_size_integer_generator<1>::int_base_type int8_type; - typedef fixed_size_integer_generator<1>::uint_base_type uint8_type; - typedef fixed_size_integer_generator<2>::int_base_type int16_type; - typedef fixed_size_integer_generator<2>::uint_base_type uint16_type; - typedef fixed_size_integer_generator<4>::int_base_type int32_type; - typedef fixed_size_integer_generator<4>::uint_base_type uint32_type; - typedef fixed_size_integer_generator<8>::int_base_type int64_type; - typedef fixed_size_integer_generator<8>::uint_base_type uint64_type; + +typedef fixed_size_integer_generator<1>::int_base_type int8_type; +typedef fixed_size_integer_generator<1>::uint_base_type uint8_type; +typedef fixed_size_integer_generator<2>::int_base_type int16_type; +typedef fixed_size_integer_generator<2>::uint_base_type uint16_type; +typedef fixed_size_integer_generator<4>::int_base_type int32_type; +typedef fixed_size_integer_generator<4>::uint_base_type uint32_type; +typedef fixed_size_integer_generator<8>::int_base_type int64_type; +typedef fixed_size_integer_generator<8>::uint_base_type uint64_type; // #if INT_MAX == 32767 // typedef signed int int16_type; @@ -273,15 +324,49 @@ namespace gmm { */ # define IS_DEPRECATED __attribute__ ((__deprecated__)) /* - the specified function is inlined at any optimization level + the specified function is inlined at any optimization level */ # define ALWAYS_INLINE __attribute__((always_inline)) #else # define IS_DEPRECATED # define ALWAYS_INLINE #endif - + } + /* ******************************************************************** */ + /* Import/export classes and interfaces from a shared library */ + /* ******************************************************************** */ + +#if defined(EXPORTED_TO_SHARED_LIB) +# if defined(_MSC_VER) || defined(__INTEL_COMPILER) +# define APIDECL __declspec(dllexport) +# elif defined(__GNUC__) +# define __attribute__((visibility("default"))) +# else +# define APIDECL +# endif +# if defined(IMPORTED_FROM_SHARED_LIB) +# error INTENTIONAL COMPILCATION ERROR, DLL IMPORT AND EXPORT ARE INCOMPITABLE +# endif +#endif + +#if defined(IMPORTED_FROM_SHARED_LIB) +# if defined(_MSC_VER) || defined(__INTEL_COMPILER) +# define APIDECL __declspec(dllimport) +# else +# define APIDECL +# endif +# if defined(EXPORTED_TO_SHARED_LIB) +# error INTENTIONAL COMPILCATION ERROR, DLL IMPORT AND EXPORT ARE INCOMPITABLE +# endif +#endif + +#ifndef EXPORTED_TO_SHARED_LIB +# ifndef IMPORTED_FROM_SHARED_LIB +# define APIDECL //empty, used during static linking +# endif +#endif + #endif /* GMM_STD_H__ */ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_sub_index.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_sub_index.h similarity index 90% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_sub_index.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_sub_index.h index 690078bbf..a35fe580c 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_sub_index.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_sub_index.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ @@ -106,38 +106,41 @@ namespace gmm { { first_ = std::min(first_, *it); last_ = std::max(last_, *it); } } - // inline void test_rind(void) const - // { if (!rind) rind = index_generator::create_rindex(ind); } + inline void test_rind(void) const + { if (!rind) rind = index_generator::create_rindex(ind); } size_type size(void) const { return ind->size(); } size_type first(void) const { return first_; } size_type last(void) const { return last_; } size_type index(size_type i) const { return (*ind)[i]; } size_type rindex(size_type i) const { - // test_rind(); + test_rind(); if (i < rind->size()) return (*rind)[i]; else return size_type(-1); } const_iterator begin(void) const { return ind->begin(); } const_iterator end(void) const { return ind->end(); } - const_iterator rbegin(void) const {/*test_rind();*/ return rind->begin(); } - const_iterator rend(void) const {/*test_rind();*/ return rind->end(); } + const_iterator rbegin(void) const { test_rind(); return rind->begin(); } + const_iterator rend(void) const { test_rind(); return rind->end(); } sub_index() : ind(0), rind(0) {} template sub_index(IT it, IT ite) : ind(index_generator::create_index(it, ite)), - rind(index_generator::create_rindex(ind)) { comp_extr(); } + rind(0) { comp_extr(); } template sub_index(const CONT &c) : ind(index_generator::create_index(c.begin(), c.end())), - rind(index_generator::create_rindex(ind)) - { comp_extr(); } - ~sub_index() - { index_generator::unattach(rind); index_generator::unattach(ind); } + rind(0) { comp_extr(); } + ~sub_index() { + index_generator::unattach(rind); + index_generator::unattach(ind); + } sub_index(const sub_index &si) : first_(si.first_), last_(si.last_), ind(si.ind), rind(si.rind) - { index_generator::attach(rind); index_generator::attach(ind); } + { index_generator::attach(rind); index_generator::attach(ind); } sub_index &operator =(const sub_index &si) { - index_generator::unattach(rind); index_generator::unattach(ind); - ind = si.ind; rind = si.rind; index_generator::attach(rind); + index_generator::unattach(rind); + index_generator::unattach(ind); + ind = si.ind; rind = si.rind; + index_generator::attach(rind); index_generator::attach(ind); first_ = si.first_; last_ = si.last_; return *this; @@ -153,7 +156,7 @@ namespace gmm { template unsorted_sub_index(const CONT &c) : sub_index(c) {} unsorted_sub_index() {} - unsorted_sub_index(const unsorted_sub_index &si) : sub_index((sub_index &)(si)) { } + unsorted_sub_index(const unsorted_sub_index &si) : sub_index((const sub_index &)(si)) { } unsorted_sub_index &operator =(const unsorted_sub_index &si) { sub_index::operator =(si); return *this; } void swap(size_type i, size_type j) { diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_sub_matrix.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_sub_matrix.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_sub_matrix.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_sub_matrix.h index 443902046..930e44015 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_sub_matrix.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_sub_matrix.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_sub_vector.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_sub_vector.h similarity index 98% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_sub_vector.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_sub_vector.h index 9b74091cf..62ba8f132 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_sub_vector.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_sub_vector.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ @@ -534,7 +534,8 @@ namespace gmm { typename sub_vector_type::vector_type, typename sub_vector_type::vector_type, const V *>::return_type sub_vector(const V &v, const SUBI &si) { - GMM_ASSERT2(si.last() <= vect_size(v), "sub vector too large"); + GMM_ASSERT2(si.last() <= vect_size(v), + "sub vector too large, " << si.last() << " > " << vect_size(v)); return typename select_return< typename sub_vector_type::vector_type, typename sub_vector_type::vector_type, const V *>::return_type @@ -546,7 +547,8 @@ namespace gmm { typename sub_vector_type::vector_type, typename sub_vector_type::vector_type, V *>::return_type sub_vector(V &v, const SUBI &si) { - GMM_ASSERT2(si.last() <= vect_size(v), "sub vector too large"); + GMM_ASSERT2(si.last() <= vect_size(v), + "sub vector too large, " << si.last() << " > " << vect_size(v)); return typename select_return< typename sub_vector_type::vector_type, typename sub_vector_type::vector_type, V *>::return_type diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_superlu_interface.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_superlu_interface.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_superlu_interface.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_superlu_interface.h index c3761bc84..94f064569 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_superlu_interface.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_superlu_interface.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_transposed.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_transposed.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_transposed.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_transposed.h index dbdada0d1..fc5b824d8 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_transposed.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_transposed.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_tri_solve.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_tri_solve.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_tri_solve.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_tri_solve.h index 4ece1d959..583b83ec8 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_tri_solve.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_tri_solve.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_vector.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_vector.h similarity index 98% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_vector.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_vector.h index 2d2a5ca2e..5d75d3dd4 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_vector.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_vector.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2002-2012 Yves Renard + Copyright (C) 2002-2015 Yves Renard This file is a part of GETFEM++ @@ -207,7 +207,7 @@ namespace gmm { inline void w(size_type c, const T &e) { GMM_ASSERT2(c < nbl, "out of range"); - if (e == T(0)) { base_type::erase(c); } + if (e == T(0)) { this->erase(c); } else base_type::operator [](c) = e; } @@ -236,7 +236,7 @@ namespace gmm { template void wsvector::clean(double eps) { iterator it = this->begin(), itf = it, ite = this->end(); while (it != ite) { - ++itf; if (gmm::abs(it->second) <= eps) erase(it); it = itf; + ++itf; if (gmm::abs(it->second) <= eps) this->erase(it); it = itf; } } @@ -514,8 +514,11 @@ namespace gmm { if (it != this->end() && it->c == c) it->e = e; else { size_type ind = it - this->begin(); + if (this->nb_stored() - ind > 800) + GMM_WARNING2("Inefficient addition of element in rsvector with " + << this->nb_stored() - ind << " non-zero entries"); base_type_::resize(nb_stored()+1, ev); - if (ind != nb_stored() - 1) { + if (ind != this->nb_stored() - 1) { it = this->begin() + ind; for (iterator ite = this->end() - 1; ite != it; --ite) *ite = *(ite-1); @@ -527,7 +530,7 @@ namespace gmm { } template T rsvector::r(size_type c) const { - GMM_ASSERT2(c < nbl, "out of range"); + GMM_ASSERT2(c < nbl, "out of range. Index " << c << " for a length of " << nbl); if (nb_stored() != 0) { elt_rsvector_ ev(c); const_iterator it = std::lower_bound(this->begin(), this->end(), ev); diff --git a/resources/3rdparty/gmm-4.2/include/gmm/gmm_vector_to_matrix.h b/resources/3rdparty/gmm-5.0/include/gmm/gmm_vector_to_matrix.h similarity index 99% rename from resources/3rdparty/gmm-4.2/include/gmm/gmm_vector_to_matrix.h rename to resources/3rdparty/gmm-5.0/include/gmm/gmm_vector_to_matrix.h index 42baf3fef..01813ccc9 100644 --- a/resources/3rdparty/gmm-4.2/include/gmm/gmm_vector_to_matrix.h +++ b/resources/3rdparty/gmm-5.0/include/gmm/gmm_vector_to_matrix.h @@ -1,7 +1,7 @@ /* -*- c++ -*- (enables emacs c++ mode) */ /*=========================================================================== - Copyright (C) 2003-2012 Yves Renard + Copyright (C) 2003-2015 Yves Renard This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/install-sh b/resources/3rdparty/gmm-5.0/install-sh similarity index 97% rename from resources/3rdparty/gmm-4.2/install-sh rename to resources/3rdparty/gmm-5.0/install-sh index a9244eb07..377bb8687 100755 --- a/resources/3rdparty/gmm-4.2/install-sh +++ b/resources/3rdparty/gmm-5.0/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-01-19.21; # UTC +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,7 +35,7 @@ scriptversion=2011-01-19.21; # UTC # 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 +# '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 @@ -156,7 +156,7 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -202,7 +202,7 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi @@ -240,7 +240,7 @@ fi for src do - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac @@ -354,7 +354,7 @@ do 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. + # other-writable 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 diff --git a/resources/3rdparty/gmm-4.2/ltmain.sh b/resources/3rdparty/gmm-5.0/ltmain.sh similarity index 99% rename from resources/3rdparty/gmm-4.2/ltmain.sh rename to resources/3rdparty/gmm-5.0/ltmain.sh index c2852d856..a356acafa 100644 --- a/resources/3rdparty/gmm-4.2/ltmain.sh +++ b/resources/3rdparty/gmm-5.0/ltmain.sh @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1" TIMESTAMP="" package_revision=1.3337 diff --git a/resources/3rdparty/gmm-4.2/m4/ax_check_cxx_flag.m4 b/resources/3rdparty/gmm-5.0/m4/ax_check_cxx_flag.m4 old mode 100755 new mode 100644 similarity index 98% rename from resources/3rdparty/gmm-4.2/m4/ax_check_cxx_flag.m4 rename to resources/3rdparty/gmm-5.0/m4/ax_check_cxx_flag.m4 index 6a426b1ce..e0f8d65ba --- a/resources/3rdparty/gmm-4.2/m4/ax_check_cxx_flag.m4 +++ b/resources/3rdparty/gmm-5.0/m4/ax_check_cxx_flag.m4 @@ -9,6 +9,7 @@ if test -z "`${CXX} $1 -o conftest conftest.c 2>&1`"; then echo "yes" else echo "no" + $3 fi dnl echo "$2=${$2}" rm -f conftest* diff --git a/resources/3rdparty/gmm-4.2/m4/ax_prefix_config_h.m4 b/resources/3rdparty/gmm-5.0/m4/ax_prefix_config_h.m4 similarity index 100% rename from resources/3rdparty/gmm-4.2/m4/ax_prefix_config_h.m4 rename to resources/3rdparty/gmm-5.0/m4/ax_prefix_config_h.m4 diff --git a/resources/3rdparty/gmm-4.2/m4/libtool.m4 b/resources/3rdparty/gmm-5.0/m4/libtool.m4 similarity index 99% rename from resources/3rdparty/gmm-4.2/m4/libtool.m4 rename to resources/3rdparty/gmm-5.0/m4/libtool.m4 index 828104cfd..d7c043f4f 100644 --- a/resources/3rdparty/gmm-4.2/m4/libtool.m4 +++ b/resources/3rdparty/gmm-5.0/m4/libtool.m4 @@ -1312,7 +1312,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1324,9 +1324,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1345,7 +1355,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1688,7 +1701,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$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 @@ -2512,17 +2526,6 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - 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 - ;; - haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no @@ -2639,7 +2642,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no @@ -3255,10 +3258,6 @@ freebsd* | dragonfly*) fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3297,7 +3296,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -4049,7 +4048,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4348,7 +4347,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -6241,9 +6240,6 @@ if test "$_lt_caught_CXX_error" != yes; then _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 @@ -6405,7 +6401,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler diff --git a/resources/3rdparty/gmm-4.2/m4/ltoptions.m4 b/resources/3rdparty/gmm-5.0/m4/ltoptions.m4 similarity index 100% rename from resources/3rdparty/gmm-4.2/m4/ltoptions.m4 rename to resources/3rdparty/gmm-5.0/m4/ltoptions.m4 diff --git a/resources/3rdparty/gmm-4.2/m4/ltsugar.m4 b/resources/3rdparty/gmm-5.0/m4/ltsugar.m4 similarity index 100% rename from resources/3rdparty/gmm-4.2/m4/ltsugar.m4 rename to resources/3rdparty/gmm-5.0/m4/ltsugar.m4 diff --git a/resources/3rdparty/gmm-4.2/m4/ltversion.m4 b/resources/3rdparty/gmm-5.0/m4/ltversion.m4 similarity index 100% rename from resources/3rdparty/gmm-4.2/m4/ltversion.m4 rename to resources/3rdparty/gmm-5.0/m4/ltversion.m4 diff --git a/resources/3rdparty/gmm-4.2/m4/lt~obsolete.m4 b/resources/3rdparty/gmm-5.0/m4/lt~obsolete.m4 similarity index 100% rename from resources/3rdparty/gmm-4.2/m4/lt~obsolete.m4 rename to resources/3rdparty/gmm-5.0/m4/lt~obsolete.m4 diff --git a/resources/3rdparty/gmm-5.0/missing b/resources/3rdparty/gmm-5.0/missing new file mode 100755 index 000000000..db98974ff --- /dev/null +++ b/resources/3rdparty/gmm-5.0/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2013-10-28.13; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written 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 + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +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 + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# 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/resources/3rdparty/gmm-5.0/test-driver b/resources/3rdparty/gmm-5.0/test-driver new file mode 100755 index 000000000..d30605660 --- /dev/null +++ b/resources/3rdparty/gmm-5.0/test-driver @@ -0,0 +1,139 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2013-07-13.22; # UTC + +# Copyright (C) 2011-2013 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. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# 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/resources/3rdparty/gmm-4.2/tests/Makefile.am b/resources/3rdparty/gmm-5.0/tests/Makefile.am similarity index 87% rename from resources/3rdparty/gmm-4.2/tests/Makefile.am rename to resources/3rdparty/gmm-5.0/tests/Makefile.am index fcef60c16..57d93c004 100644 --- a/resources/3rdparty/gmm-4.2/tests/Makefile.am +++ b/resources/3rdparty/gmm-5.0/tests/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = -I$(top_srcdir)/include -I../include LDADD = -lm @SUPLDFLAGS@ -TESTS = $(top_srcdir)/tests/make_gmm_test.pl +TESTS = make_gmm_test.pl EXTRA_DIST=\ make_gmm_test.pl\ @@ -22,5 +22,5 @@ EXTRA_DIST=\ CLEANFILES = toto.mat ii_files/* auto_gmm* -TESTS_ENVIRONMENT = perl +LOG_COMPILER = perl diff --git a/resources/3rdparty/gmm-5.0/tests/Makefile.in b/resources/3rdparty/gmm-5.0/tests/Makefile.in new file mode 100644 index 000000000..34464dba4 --- /dev/null +++ b/resources/3rdparty/gmm-5.0/tests/Makefile.in @@ -0,0 +1,967 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 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@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +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@ +check_PROGRAMS = dummy$(EXEEXT) +subdir = tests +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/depcomp $(top_srcdir)/test-driver +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(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)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am_dummy_OBJECTS = dummy.$(OBJEXT) +dummy_OBJECTS = $(am_dummy_OBJECTS) +dummy_LDADD = $(LDADD) +dummy_DEPENDENCIES = +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +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_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +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_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +SOURCES = $(dummy_SOURCES) +DIST_SOURCES = $(dummy_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +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__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +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@ +BUILDDATE = @BUILDDATE@ +BUILDER = @BUILDER@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFIGURE_ARGS = @CONFIGURE_ARGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +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@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LIBTOOL_VERSION_INFO = @LIBTOOL_VERSION_INFO@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +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@ +SUPLDFLAGS = @SUPLDFLAGS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +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@ +localedir = @localedir@ +localstatedir = @localstatedir@ +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@ +dummy_SOURCES = dummy.cc +INCLUDES = -I$(top_srcdir)/include -I../include +LDADD = -lm @SUPLDFLAGS@ +TESTS = make_gmm_test.pl +EXTRA_DIST = \ + make_gmm_test.pl\ + gmm_torture01_lusolve.cc\ + gmm_torture02_baseop.cc\ + gmm_torture05_mult.cc\ + gmm_torture06_mat_mult.cc\ + gmm_torture10_qr.cc\ + gmm_torture15_sub.cc\ + gmm_torture20_iterative_solvers.cc + +CLEANFILES = toto.mat ii_files/* auto_gmm* +LOG_COMPILER = perl +all: all-am + +.SUFFIXES: +.SUFFIXES: .cc .lo .log .o .obj .test .test$(EXEEXT) .trs +$(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) --gnu tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu 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-checkPROGRAMS: + @list='$(check_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 + +dummy$(EXEEXT): $(dummy_OBJECTS) $(dummy_DEPENDENCIES) $(EXTRA_dummy_DEPENDENCIES) + @rm -f dummy$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(dummy_OBJECTS) $(dummy_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.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 +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(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 +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(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 +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + 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-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + 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" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +make_gmm_test.pl.log: make_gmm_test.pl + @p='make_gmm_test.pl'; \ + b='make_gmm_test.pl'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +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_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +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: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +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-checkPROGRAMS clean-generic clean-libtool \ + 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 TAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am 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 \ + recheck tags tags-am 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/resources/3rdparty/gmm-4.2/tests/dummy.cc b/resources/3rdparty/gmm-5.0/tests/dummy.cc similarity index 100% rename from resources/3rdparty/gmm-4.2/tests/dummy.cc rename to resources/3rdparty/gmm-5.0/tests/dummy.cc diff --git a/resources/3rdparty/gmm-4.2/tests/gmm_torture01_lusolve.cc b/resources/3rdparty/gmm-5.0/tests/gmm_torture01_lusolve.cc similarity index 98% rename from resources/3rdparty/gmm-4.2/tests/gmm_torture01_lusolve.cc rename to resources/3rdparty/gmm-5.0/tests/gmm_torture01_lusolve.cc index 858a61b98..b163186d7 100644 --- a/resources/3rdparty/gmm-4.2/tests/gmm_torture01_lusolve.cc +++ b/resources/3rdparty/gmm-5.0/tests/gmm_torture01_lusolve.cc @@ -1,6 +1,6 @@ /*=========================================================================== - Copyright (C) 2007-2012 Yves Renard, Julien Pommier. + Copyright (C) 2007-2015 Yves Renard, Julien Pommier. This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/tests/gmm_torture02_baseop.cc b/resources/3rdparty/gmm-5.0/tests/gmm_torture02_baseop.cc similarity index 97% rename from resources/3rdparty/gmm-4.2/tests/gmm_torture02_baseop.cc rename to resources/3rdparty/gmm-5.0/tests/gmm_torture02_baseop.cc index 891ae1add..c9bab9a49 100644 --- a/resources/3rdparty/gmm-4.2/tests/gmm_torture02_baseop.cc +++ b/resources/3rdparty/gmm-5.0/tests/gmm_torture02_baseop.cc @@ -1,6 +1,6 @@ /*=========================================================================== - Copyright (C) 2007-2012 Yves Renard, Julien Pommier. + Copyright (C) 2007-2015 Yves Renard, Julien Pommier. This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/tests/gmm_torture05_mult.cc b/resources/3rdparty/gmm-5.0/tests/gmm_torture05_mult.cc similarity index 99% rename from resources/3rdparty/gmm-4.2/tests/gmm_torture05_mult.cc rename to resources/3rdparty/gmm-5.0/tests/gmm_torture05_mult.cc index 5df258276..b8fcce63c 100644 --- a/resources/3rdparty/gmm-4.2/tests/gmm_torture05_mult.cc +++ b/resources/3rdparty/gmm-5.0/tests/gmm_torture05_mult.cc @@ -1,6 +1,6 @@ /*=========================================================================== - Copyright (C) 2007-2012 Yves Renard, Julien Pommier. + Copyright (C) 2007-2015 Yves Renard, Julien Pommier. This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/tests/gmm_torture06_mat_mult.cc b/resources/3rdparty/gmm-5.0/tests/gmm_torture06_mat_mult.cc similarity index 97% rename from resources/3rdparty/gmm-4.2/tests/gmm_torture06_mat_mult.cc rename to resources/3rdparty/gmm-5.0/tests/gmm_torture06_mat_mult.cc index d1d7a0aa8..e716716b4 100644 --- a/resources/3rdparty/gmm-4.2/tests/gmm_torture06_mat_mult.cc +++ b/resources/3rdparty/gmm-5.0/tests/gmm_torture06_mat_mult.cc @@ -1,6 +1,6 @@ /*=========================================================================== - Copyright (C) 2007-2012 Yves Renard, Julien Pommier. + Copyright (C) 2007-2015 Yves Renard, Julien Pommier. This file is a part of GETFEM++ @@ -51,7 +51,7 @@ bool test_procedure(const MAT1 &m1_, const MAT2 &m2_, const MAT3 &m3_) { R error = mat_euclidean_norm(m4) - mat_euclidean_norm(m1) * mat_euclidean_norm(m2); if (error > prec * R(100)) - GMM_ASSERT1(false, "Inconsistence of fröbenius norm" << error); + GMM_ASSERT1(false, "Inconsistence of Frobenius norm" << error); error = mat_norm1(m4) - mat_norm1(m1) * mat_norm1(m2); if (error > prec * R(100)) diff --git a/resources/3rdparty/gmm-4.2/tests/gmm_torture10_qr.cc b/resources/3rdparty/gmm-5.0/tests/gmm_torture10_qr.cc similarity index 99% rename from resources/3rdparty/gmm-4.2/tests/gmm_torture10_qr.cc rename to resources/3rdparty/gmm-5.0/tests/gmm_torture10_qr.cc index 4928241f8..6538fd4c6 100644 --- a/resources/3rdparty/gmm-4.2/tests/gmm_torture10_qr.cc +++ b/resources/3rdparty/gmm-5.0/tests/gmm_torture10_qr.cc @@ -1,6 +1,6 @@ /*=========================================================================== - Copyright (C) 2007-2012 Yves Renard, Julien Pommier. + Copyright (C) 2007-2015 Yves Renard, Julien Pommier. This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/tests/gmm_torture15_sub.cc b/resources/3rdparty/gmm-5.0/tests/gmm_torture15_sub.cc similarity index 98% rename from resources/3rdparty/gmm-4.2/tests/gmm_torture15_sub.cc rename to resources/3rdparty/gmm-5.0/tests/gmm_torture15_sub.cc index 3b83b940c..54afb1c66 100644 --- a/resources/3rdparty/gmm-4.2/tests/gmm_torture15_sub.cc +++ b/resources/3rdparty/gmm-5.0/tests/gmm_torture15_sub.cc @@ -1,6 +1,6 @@ /*=========================================================================== - Copyright (C) 2007-2012 Yves Renard, Julien Pommier. + Copyright (C) 2007-2015 Yves Renard, Julien Pommier. This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/tests/gmm_torture20_iterative_solvers.cc b/resources/3rdparty/gmm-5.0/tests/gmm_torture20_iterative_solvers.cc similarity index 99% rename from resources/3rdparty/gmm-4.2/tests/gmm_torture20_iterative_solvers.cc rename to resources/3rdparty/gmm-5.0/tests/gmm_torture20_iterative_solvers.cc index 3fd66da47..f0cba1aa0 100644 --- a/resources/3rdparty/gmm-4.2/tests/gmm_torture20_iterative_solvers.cc +++ b/resources/3rdparty/gmm-5.0/tests/gmm_torture20_iterative_solvers.cc @@ -1,6 +1,6 @@ /*=========================================================================== - Copyright (C) 2007-2012 Yves Renard, Julien Pommier. + Copyright (C) 2007-2015 Yves Renard, Julien Pommier. This file is a part of GETFEM++ diff --git a/resources/3rdparty/gmm-4.2/tests/make_gmm_test.pl b/resources/3rdparty/gmm-5.0/tests/make_gmm_test.pl similarity index 98% rename from resources/3rdparty/gmm-4.2/tests/make_gmm_test.pl rename to resources/3rdparty/gmm-5.0/tests/make_gmm_test.pl index d4a1416be..d0c307ea1 100755 --- a/resources/3rdparty/gmm-4.2/tests/make_gmm_test.pl +++ b/resources/3rdparty/gmm-5.0/tests/make_gmm_test.pl @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2012 Yves Renard +# Copyright (C) 2001-2015 Yves Renard # # This file is a part of GETFEM++ # @@ -352,8 +352,8 @@ for ($iter = 1; $iter <= $nb_iter; ++$iter) { `rm -f $root_name`; - $compilo=`../gmm-config --cxx` || die('cannot execute ../gmm-config --cxx'); chomp($compilo); - $compile_options=`../gmm-config --build-flags`; + $compilo=`sh ../gmm-config --cxx` || die('cannot execute ../gmm-config --cxx'); chomp($compilo); + $compile_options=`sh ../gmm-config --build-flags`; chomp($compile_options); $compile_options="$compile_options -I$srcdir/../src -I$srcdir/../include -I../src -I../include"; $compile_libs="-lm";