diff --git a/externals/otf/AUTHORS b/externals/otf/AUTHORS deleted file mode 100644 index 7207644420d5f09c1d736e30184e81e69e1a78dc..0000000000000000000000000000000000000000 --- a/externals/otf/AUTHORS +++ /dev/null @@ -1,9 +0,0 @@ -Andreas Knuepfer <andreas.knuepfer AT tu-dresden.de> -Ronny Brendel <ronny.brendel AT tu-dresden.de> -Matthias Jurenz <matthias.jurenz AT tu-dresden.de> -Johannes Spazier <johannes.spazier AT tu-dresden.de> -Michael Heyde <michael.heyde AT tu-dresden.de> -Michael Kluge <michael.kluge AT tu-dresden.de> -Holger Mickler <holger.mickler AT tu-dresden.de> -Holger Brunst <holger.brunst AT tu-dresden.de> -Hartmut Mix <hartmut.mix AT tu-dresden.de> diff --git a/externals/otf/COPYING b/externals/otf/COPYING deleted file mode 100644 index 77a408fdba971fe4290641ce5e2039ccc13f9476..0000000000000000000000000000000000000000 --- a/externals/otf/COPYING +++ /dev/null @@ -1,29 +0,0 @@ -Copyright (c) 2005-2010, ZIH, Technische Universitaet Dresden, -Federal Republic of Germany - - All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -- Neither the name of ZIH, TU Dresden nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/externals/otf/ChangeLog b/externals/otf/ChangeLog deleted file mode 100644 index a769771ac8eae1dafcd0e5a681a422bf4f6776e7..0000000000000000000000000000000000000000 --- a/externals/otf/ChangeLog +++ /dev/null @@ -1,318 +0,0 @@ -1.7catfish - - added second version of each record that contains a Key-Value - list to store individual data - - two new definition records which can be used to assign - attributes to processes - - two new snapshot record types: BeginCollopSnapshot, - BeginFileOpSnapshot - - API changes in EndFileOP record and SendSnapshot record because - of a flawed design - - added MPI-parallel version of otfmerge (otfmerge-mpi) - - otfprofile has a lite mode usefuly for highly parallel traces - - added option to otf[de]compress for specifying an output directory - - try to open files with 'O_NOATIME' for reading for increased speed - - try to handle ESTALE errors on NFS gracefully - - fixed OTF long format for several records - - fixed error handling in OTF reader - - fixed bug in otfshrink: a process number can be between - 0 and 4294967296 now - -1.6.5stingray - - enforce building position independent code (PIC) for the static - version of the OTF library - (so it's possible to add these objects to 3rd-party shared libraries) - - fixed and enhanced calculation of trace file size in otfinfo - - patched libtool: - - to avoid a bug in detection of the PGI 10 C++ compiler - - to detect IBM cross compilers on BlueGene/P - -1.6.4stingray - - enhanced reading of process group definition records - -1.6.3stingray - - fixed errors while reading the long OTF format - - updated python interface - -1.6.2stingray - - fixed build errors on SUN Solaris with older GNU compilers - - fixed skewed arguments for OTF_WStream_writeEndFileOperation - - fixed progress calculation of otfprofile - - improved performance of otfprofile - especially handling of huge - tracefiles - -1.6.1stingray - - added tool 'otfinfo' which can be used to get basic information of - a trace - - fix invalid pointer dereferences in OTF_stripFilename() and - OTF_File_open_zlevel() - - fixed doxygen documentation: add OTF_Handler.h to package - -1.6stingray - - added tool 'otfshrink' which can be used to reduce a trace to - specified processes - - introduced an error variable (otf_errno, otf_strerr) that indicates - whether an error occurred or not - - fixed build dependencies of otfprofile - - added file operation types OTF_FILEOP_DUP, OTF_FILEOP_SYNC, - OTF_FILEOP_LOCK, and OTF_FILEOP_UNLOCK - - changed datatype for sent/received data volume of collective - operation begin/end records from 'uint32_t' to 'uint64_t' - - replaced usage of PATH_MAX by VT_PATH_MAX to avoid compile errors - -1.5.2dolphin - - adapted python bindings to the current API (related to new record - types) - - if possible, otfprofile creates a PS-file - - fixed VPATH issue, when using python bindings - - fixed infinite recursion in python wrappers - pyOTF_COUNTER_VARTYPE_ISSIGNED and pyOTF_COUNTER_VARTYPE_ISUNSIGNED - -1.5.1dolphin - - corrected package preparation for libtool - - build shared OTF library by default - - added version information to shared OTF library - -1.5 - - added file operation begin/end records - - added file operation types OTF_FILEOP_UNLINK, OTF_FILEOP_RENAME, - and OTF_FILEOP_OTHER - - use part of fileop for I/O flags (e.g. async, coll.) - - added collective operation begin/end records - - added remote memory access (RMA) operation records - - added marker records - -1.4.1 - - bugfix: removed included system headers inside 'extern "C" {}' - - bugfix: added configure check for functions 'fseeko()' and 'ftello()' - (these functions are not available on NEC SX platforms) - - bugfix in otfprofile: fixed infinite loop while drawing the - statistics for "top 50 of counters" - -1.4 - - added tool 'otfprofile' which can be used to generate CSV/Latex- - summaries about functions and P2P-messages of a trace - - build/install tool 'otfdump' by default - - install documentation - -1.3.10 - - added configure option '--[enable|disable]-binaries' to control - building of binaries (useful for multi-lib installations) - -1.3.9 - - fixed a portability bug: use own implementation of function - 'strdup()' - - install a symbolic link 'otfdecompress' which is a synonym for - 'otfcompress -d' - -1.3.8 - - generate OTF_inttypes.h during configuring which provides - the integer types like int64_t, int8_t,... - - shared OTF library will be linked with zlib, thus additionally - linking with zlib is not necessary - - bugfix in otf2vtf: correctly handle function leave records with id 0 - -1.3.7 - - added example for using OTF_MasterControl to the doxygen documentation - - general improvement of the documentation - - improved autoconf's m4 scripts for cross buildings - -1.3.6 - - OTF_{Keywords.h,Parse.h,Platform.h} will no longer be installed - - added a compile time assert making sure the correct sizes of the - integer types ([u]int*_T) - - OTF is now Windows Visual Studio compatible - -1.3.5 - - added doxygen html documentation (docu/doxygen/html/index.html) - - fixed issue, where newlines were forbidden in def, stats and snaps - - added missing const to OTF_WStream_writeDefProcessGroup() - -1.3.4 - - bug fix in otfmerge: missing handling of DefCollectiveOperation - - bugfix in the documentation: overview.eps was broken - -1.3.3 - - fixed configure bug when searching for zlib on mac - - fixed bug in otfmerge, where the parameter "-n 0" caused an error - - added macros for specifing the data type of the counter - (OTF_COUNTER_VARTYPE_*) - - fixed otfconfig help text - - fixed bugs when using make dist - - python bindings disabled by default - - fixed configure bug, when using python bindings - - updated python bindings to support user defined counters - -1.3.2 - - added small functions to convert various variable types to common - counter type uint64_t. By this means, other types can be transported - as uint64_t and re-casted during reading. - This requires type information as additional counter property flags! - -1.3.1 - - if an fopen() call fails an error is now printed out every time - - OTF_READ_ERROR was introduced as an error return value for all - OTF_Reader_readXXX and OTF_RStream_readXXX functions. So (uint64_t)-1 is - now a reserved value, thus cannot be used as record limit. - The record limit always has to be smaller than or equal to - OTF_READ_MAXRECORDS. - - fixed issue in otfmerge, when using many streams - -1.3 - - integrated libtool for shared and static linkage to otf - - removed the possibility to include zlib symbols into otf - - fixed warning which appeared when not using zlib - - added python bindings to the otf library - -1.2.25 - - added doxygen html documentation (docu/doxygen/html/index.html) - -1.2.24 - - minor change in otf[de|un]compress - - strictly avoid writing of unsorted time stamps. Now, there will be an - error message and the corresponding buffer/stream will be disabled for - further writing. The write routines provide an invlaid return code but - currently there is no way to "repair" the buffer/stream after an - unsorted time stamp has been issued. - -1.2.23 - - removed libtool from autoconf to make configure much faster, - libtool was not used by automake anyhow - - removed some autoconf-generated files from CVS, - you might need to re-run 'sh bootstrap' yourself - -1.2.22 - - fixed inttypes/stdint bug - -1.2.21 - - fixed "--with-zlib-symbols"-bug - -1.2.20 - - added own inttypes definitions in case there is no on the platform - (necessary on NEC SX6) - -1.2.19 - - finished otfdump - - removed debug output in OTF_Reader.c - - re-introduced DefVersion record as read only - -1.2.18 - - added fwrite check for writting less bytes than expected - - re-write of otfdump. Now, it uses OTF read lib instead of plain - scanf. It produces nicer output and numbers records in read order. - -1.2.17 - - bugfixed parser (wrong treatment of unknown records) - - added FileGroupOperationSummary record - - changed FileOperation-, OpenFileSnapshot- and FileOperationSummary- - record NOTE: these records are still experimental - - included file operation records into all tools - NOTE: some parameters were added/changed - - the byte-parameter in the FileOperation record does now contain the - new position in the file file after the seek operation - - bugfixed otfmerge - -1.2.16 - - fixed a problem with comments in otfmerge - - 2 new records introduced (NOTE: these are experimental): - - OpenFileSnapshot - - FileOperationSummary - -1.2.15 - - 3 new records introduced (NOTE: these are experimental): - - DefFile - - DefFileGroup - - FileOperation - -1.2.14 - - do not linke with '-lz' if '--with-zlibsymbols' was specified - - added zlib include line to otflib/Makefile.am - -1.2.13 - - removed intel compiler warnings - - changed OTF_FILETYPE_*-macros - - fixed issues with OTF_getFilename() - -1.2.12 - - removed intel compiler warnings in otfmerge - - removed debug output - - fixed 64bit issue - -1.2.11 - - changed OTF_RETURN*( 0=success, !0 = error ) - - added these macros to all internal functions and tools for better - consistency - - fixed various memoryleaks in otf and otfmerge - - added otfconfig to tools. otfconfig shows installationparameters - important for developers - - updated documentation - -1.2.10 - - bugfix: otfmerge does no longer accept traces with local streams - -1.2.9 - - changeable zlevel - - changeable zbuffersize - -1.2.8 - - allow suffix '.dylib' for zlib library file (from Mac OS X) - - removed configure warning - -1.2.7 - - added progress functions to OTF_RStream - - added a progress counter to otfmerge - -1.2.6 - - support shared libraries - -1.2.5 - - bugfix: correctly handle process groups with more than 1000 entries - -1.2.4 - - bugfix: zlib compression bug, wrong sanity check fixed - -1.2.3 - - bugfix: provided copy handlers returned wrong value - -1.2.2 - - important bugfix: definitionstream 0 was ignored since version 1.2 - -1.2.1 - - added progress functions using read bytes instead of timestamps - -1.2 - - introduce transparent zlib compression - -1.1.7 - - really did the bugfix for 1.1.6, was missing for some reasons - -1.1.6 - - bugfix: correctly handle process groups with more than 1000 entries - -1.1.5 - - have UnknownRecord report handle incomplete records or additional - bytes at the end of a file. - -1.1.4 - - fixed a bug in OTF_Reader which might have caused the very first - time stamp of a trace to be not properly sorted - - introduced '--snapshots' and '--statistics' switches to do only - snapshots or statistics. for statistics a selective mode is allowed - which regards only some streams. By this means statistics can be - created in parallel by calling otfaux multiple times. - -1.1.3 - - fixed a minor bug in otfaux - -1.1.2 - - inverted return value of call-back handlers: - '0' is non-error, '!= 0' is regarded as an error, now! - (this makes OTF conform with the VTF3 scheme.) - -1.1.1 - - OTF_Reader now considers the return values of the handlers - - added OTF_VERBOSE, OTF_DEBUG macro for error treatment - - introduced 'UnknownRecord' handler which allows to catch - unknown record types - -1.0 - - initial version diff --git a/externals/otf/INSTALL b/externals/otf/INSTALL deleted file mode 100644 index d46f8d71fd7ea2984f68df62f7c5fb0d267f747b..0000000000000000000000000000000000000000 --- a/externals/otf/INSTALL +++ /dev/null @@ -1,295 +0,0 @@ -(See specific OTF related information at the end of this file.) - - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software -Foundation, Inc. - - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - -These are generic installation instructions. OTF-specific options can be -found at the end of this document. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -will cause the specified gcc to be used as the C compiler (unless it is -overridden in the site shell script). - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - - -OTF specific `configure' Examples -================================= - - -The '--with-vtf3' option allows to specify VTF3 include path and library path. -By default '../vtf3' is searched for headers & library unless '--without-vtf3' -is specified. Additional options '--with-vtf3-lib-dir' and -'--with-vtf3-include-dir' allow to give headers location and library location -separately. - - -Further options '--with-debug' and '--with-verbose' make the OTF library and -tools perform stricter checks and produce more verbose output (warnings/errors) -on stderr respectively. - - -On some platforms an error like "dereferencing type-punned pointer will break -strict-aliasing rules" may occur. If that is the case add "-fno-strict-aliasing" -(thats the parameter for gcc. It may be a bit different for other compilers) -to the CFLAGS and CXXFLAGS. - - -The '--with-zlib' option (default) enables tranparent compression/decompression -by ZLib, '--without-zlib' disables this feature. If '--with-zlibsymbols' is -specified in addition, all symbols from libz.a are directly included into -libotf.a. This makes it unnecessary to append '-lz' to another programs linker -list. However, it might cause collisions if '-lz' is present with the other -program already. -Note that '--with-zlibsymbols' is not compatible with shared libraries. The option -'--disable-shared' is necessary when ZLib symbols are included into OTF library. - - -Installing 32-bit and 64-bit Libraries Concurrently -=================================================== - -Some platforms support 32-bit and 64-bit executables and libraries. Please chose -one flavor as default and set appropriate options via './configure'. Then do -'make' and 'make install'. This will have everything built and installed with -default flavor: library, header files and tools. -In order to have alternative library flavor created, re-run './configure' with -alternative options and do 'make' but NOT 'make install'. Rather, copy the -library manually to the desired location. Make sure not to overwrite the default -library. Header files and tools are not affected by this issue because always -only the default version will be necessary. - - -Example configure Command Line -============================== - -example on Linux: -%> ./configure CFLAGS="-O3 -g -Wall -Werror" CXXFLAGS="-O3 -g -Wall -Werror" - --with-vtf3=$HOME/prog/vtf/ --with-zlib --with-zlibsymbols --disable-shared - --prefix=$HOME - -example on SGI Irix: -%> ./configure CC=cc CFLAGS="-O3 -n32 -g -ansiW" --with-vtf3=$HOME/prog/vtf/ - -example on NEC SX6i front end with cross compiler -%> ./configure AR="sxar" RANLIB="sxar st" CC="sxcc -sx5" CXX="sxc++ -sx5" ---host=sx6-nec-superux14.1 --build=i686-pc-linux-gnu ---without-zlib --prefix=/home_sx6i/knuepfe/ diff --git a/externals/otf/LICENSE b/externals/otf/LICENSE deleted file mode 100644 index 77a408fdba971fe4290641ce5e2039ccc13f9476..0000000000000000000000000000000000000000 --- a/externals/otf/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -Copyright (c) 2005-2010, ZIH, Technische Universitaet Dresden, -Federal Republic of Germany - - All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -- Neither the name of ZIH, TU Dresden nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/externals/otf/Makefile.am b/externals/otf/Makefile.am deleted file mode 100644 index cf3d45101a05ab62d378836f8712441467eecb9c..0000000000000000000000000000000000000000 --- a/externals/otf/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -ACLOCAL_AMFLAGS = -I config/m4 - -if AMHAVEPYTHONSWIG -OTFLIB_PY = otflib_py -else -OTFLIB_PY = -endif - -SUBDIRS = \ - otflib \ - $(OTFLIB_PY) \ - tools \ - docu - -EXTRA_DIST= \ - otf_vc08.sln \ - config/otf_get_version.sh \ - tests/hello/Makefile \ - tests/hello/hello_otf.c \ - tests/otf_python/groups.py \ - tests/otf_python/test_read.py \ - tests/otf_python/test_read_qt.py \ - tests/otf_python/test_write.py \ - VERSION diff --git a/externals/otf/Makefile.in b/externals/otf/Makefile.in deleted file mode 100644 index 647d6cc87acd2f7ba6004e6b54c8e4d644ca89aa..0000000000000000000000000000000000000000 --- a/externals/otf/Makefile.in +++ /dev/null @@ -1,801 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - TODO config/config.guess config/config.sub config/depcomp \ - config/install-sh config/ltmain.sh config/missing \ - config/py-compile -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = otflib otflib_py tools docu -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -ACLOCAL_AMFLAGS = -I config/m4 -@AMHAVEPYTHONSWIG_FALSE@OTFLIB_PY = -@AMHAVEPYTHONSWIG_TRUE@OTFLIB_PY = otflib_py -SUBDIRS = \ - otflib \ - $(OTFLIB_PY) \ - tools \ - docu - -EXTRA_DIST = \ - otf_vc08.sln \ - config/otf_get_version.sh \ - tests/hello/Makefile \ - tests/hello/hello_otf.c \ - tests/otf_python/groups.py \ - tests/otf_python/test_read.py \ - tests/otf_python/test_read_qt.py \ - tests/otf_python/test_write.py \ - VERSION - -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) 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; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile config.h -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr \ - distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) 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-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 - - -# 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/externals/otf/NEWS b/externals/otf/NEWS deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/externals/otf/README b/externals/otf/README deleted file mode 100644 index 94d01097ffed04f06c6bd6cfe3a27fb3d9293372..0000000000000000000000000000000000000000 --- a/externals/otf/README +++ /dev/null @@ -1,17 +0,0 @@ - Open Trace Format (OTF) - -Detailed program analysis of massively parallel programs requires the recording of event based performance data during run-time and its visualisation with appropriate software tools like the Vampir framework. - -The specification of a convenient and powerful trace file format has to fulfill a large number of requirements. It must allow an efficient collection of the event based performance data on a parallel program environment. On the other hand it has to provide a very fast and convenient access to the large amount of performance data and the corresponding event definitions by the analysis software tools. - -To improve scalability for very large and massively parallel traces the Open Trace Format (OTF) has been developed at ZIH as a successor format to the Vampir Trace Format (VTF3). - -The Open Trace Format makes use of a portable ASCII encoding. It distributes single traces to multiple so called streams with one or more files each. Merging of records from multiple files is done transparently by the OTF library. The number of possible streams is not limited by the number of available file handles. - -The provided read/write library should be used as a convenient interface for third party software. The library supports efficient parallel and distributed access to trace data and offers selective reading access regarding arbitrary time intervals, process selection and record types. -Optional auxiliary information can assist this selective access. - -The software package contains additional tools for trace date conversion or preparation. -More information can be found in the provided documentation. - -OTF version is available as open source software under the BSD license, see 'COPYING'. The software comes as a source code package. It can be installed by using autoconf procedures, see 'INSTALL'. diff --git a/externals/otf/TODO b/externals/otf/TODO deleted file mode 100644 index 9970c62c95be44766b0db9c9c533e82baadefcd8..0000000000000000000000000000000000000000 --- a/externals/otf/TODO +++ /dev/null @@ -1,28 +0,0 @@ -- re-design OTF's error/success return values for handlers and functions - -- ideas for future development - - add memory allocation/deallocation record types, how? - - have more semantics - - have less semantics - - add general purpose record types like (type/owner,key,value) with no semantics, - -- can be used freely, ignored if unknown, - -- key/value are either uint64_t, array of uint64_t or text - -- add record to write wall clock time or epoch or year:month:day:hour:minute:second - with this, VT can record time at start and end of trace (request by Robert Henschel) - -- create a (graphical) tool for changing definition records: - - grouping functions - - ... - -- solve the problem that when only reading statistic records one cannot - determine the begin and end of a process !!!!! - You might introduce a new record for this. ( maybe like begin/endprocess - for events? ) - You could also write a statistics comment record when the first event appears, - (in otfaux) - -- add new statistics record type that gives the caller-callee relation - - only write this at the end of a trace run - -- use asynchronous write (aio_write) and maybe even read for performance diff --git a/externals/otf/VERSION b/externals/otf/VERSION deleted file mode 100644 index db31986a91f333eae64d92916af7df808d5bcbf2..0000000000000000000000000000000000000000 --- a/externals/otf/VERSION +++ /dev/null @@ -1,49 +0,0 @@ -# This is the VERSION file for OTF, describing the precise version of OTF in -# this distribution. The various components of the version number below are -# combined to form a single version number string. - -# major, minor, and sub are generally combined in the form -# <major>.<minor>.<sub>. If sub is zero, then it is omitted. - -major=1 -minor=7 -sub=0 - -# string is used for alpha, beta, or release tags. If it is non-empty, it will -# be appended to the version number. -# -# history of release tags: -# 0.2.* octopussy -# 0.3.*-1.1.* starfish -# 1.2.* pufferfish -# 1.3.* jellyfish -# 1.4.* shark -# 1.5.* dolphin -# 1.6.* stingray -# 1.7.* catfish -# - -string=catfish - -# library is used for the library versioning. These three numbers will be added -# to the name of the library (e.g. libotf.so.1.2.3). -# The meaning of these numbers is as follows (from left to right): -# -# current The number of the current API exported by the library. -# That must be incremented, if the API has changed. -# revision The implementation number of the most recent API -# exported by the library. A value of '0' means that this -# is the first implementation of the API. -# If any of the source for the library has changed, -# revision must be incremented. -# age The number of previous additional APIs supported by the -# library. If age is '2', the library can be linked into -# executables built with a release of the library that -# exported the current API number (current), or any of -# the preceding two APIs. -# If the new API is backward-compatible with the preceding -# release, age must be incremented. Otherwise, reset age -# to '0'. - -library=1:0:0 - diff --git a/externals/otf/acinclude.m4 b/externals/otf/acinclude.m4 deleted file mode 100644 index d283c20aa0e8d5608a4fdb385692e9b530a4393d..0000000000000000000000000000000000000000 --- a/externals/otf/acinclude.m4 +++ /dev/null @@ -1,12 +0,0 @@ -m4_include(config/m4/acinclude.debug.m4) -m4_include(config/m4/acinclude.math.m4) -m4_include(config/m4/acinclude.mpi.m4) -m4_include(config/m4/acinclude.omp.m4) -m4_include(config/m4/acinclude.pydev.m4) -m4_include(config/m4/acinclude.swig.m4) -m4_include(config/m4/acinclude.swig_python.m4) -m4_include(config/m4/acinclude.vtf3.m4) -m4_include(config/m4/acinclude.verbose.m4) -m4_include(config/m4/acinclude.zlib.m4) -m4_include(config/m4/acarchive/ax_mpi.m4) -m4_include(config/m4/acarchive/ax_openmp.m4) diff --git a/externals/otf/aclocal.m4 b/externals/otf/aclocal.m4 deleted file mode 100644 index ad20219a96263bc6ad803158a20a487d472e641e..0000000000000000000000000000000000000000 --- a/externals/otf/aclocal.m4 +++ /dev/null @@ -1,996 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar <conftest.tar]) - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([config/m4/libtool.m4]) -m4_include([config/m4/ltoptions.m4]) -m4_include([config/m4/ltsugar.m4]) -m4_include([config/m4/ltversion.m4]) -m4_include([config/m4/lt~obsolete.m4]) -m4_include([acinclude.m4]) diff --git a/externals/otf/config.h.in b/externals/otf/config.h.in deleted file mode 100644 index 05b173a5deb6f6dc256f3aa394c1c93982e965a4..0000000000000000000000000000000000000000 --- a/externals/otf/config.h.in +++ /dev/null @@ -1,126 +0,0 @@ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define to 1 if you have the `asprintf' function. */ -#undef HAVE_ASPRINTF - -/* Define to 1 if you have the declaration of `O_NOATIME', and to 0 if you - don't. */ -#undef HAVE_DECL_O_NOATIME - -/* Define to 1 if you have the <dlfcn.h> header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the <fcntl.h> header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ -#undef HAVE_FSEEKO - -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define to 1 if you have the <inttypes.h> header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `snprintf' function. */ -#undef HAVE_SNPRINTF - -/* Define to 1 if you have the <stddef.h> header file. */ -#undef HAVE_STDDEF_H - -/* Define to 1 if you have the <stdint.h> header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the <stdlib.h> header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - -/* Define to 1 if you have the <strings.h> header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the <string.h> header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the <sys/param.h> header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the <sys/time.h> header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the <sys/types.h> header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the `__va_copy' function. */ -#undef HAVE_UNDERSCORE_VA_COPY - -/* Define to 1 if you have the <unistd.h> header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `vasprintf' function. */ -#undef HAVE_VASPRINTF - -/* Define to 1 if you have the `va_copy' function. */ -#undef HAVE_VA_COPY - -/* Define to 1 if you have the `vsnprintf' function. */ -#undef HAVE_VSNPRINTF - -/* */ -#undef HAVE_VTF3 - -/* */ -#undef HAVE_ZLIB - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* */ -#undef OTF_DEBUG - -/* */ -#undef OTF_VERBOSE - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* The size of `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION - -/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ -#undef _LARGEFILE_SOURCE - -/* Define to `unsigned int' if <sys/types.h> does not define. */ -#undef size_t diff --git a/externals/otf/config/config.guess b/externals/otf/config/config.guess deleted file mode 100644 index 7b24a8728ca386d01f252f342e8720ca9f3d63cd..0000000000000000000000000000000000000000 --- a/externals/otf/config/config.guess +++ /dev/null @@ -1,1542 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. - -timestamp='2008-11-15' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner <per@bothner.com>. -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -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 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if echo '\n#ifdef __amd64\nIS_64BIT_ARCH\n#endif' | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include <stdio.h> /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <sys/systemcfg.h> - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include <stdlib.h> - #include <unistd.h> - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <unistd.h> - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd | genuineintel) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <features.h> - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo ${UNAME_MACHINE}-pc-isc$UNAME_REL - elif /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes <hewes@openmarket.com>. - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -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 <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include <sys/param.h> -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 <<EOF -$0: unable to guess system type - -This script, last modified $timestamp, has failed to recognize -the operating system you are using. It is advised that you -download the most up to date version of the config scripts from - - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -If the version you run ($0) is already up to date, please -send the following data and any information you think might be -pertinent to <config-patches@gnu.org> in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/externals/otf/config/config.sub b/externals/otf/config/config.sub deleted file mode 100644 index 053e7381fa01f7a6842ba34a1316912163712293..0000000000000000000000000000000000000000 --- a/externals/otf/config/config.sub +++ /dev/null @@ -1,1677 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. - -timestamp='2008-09-08' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/externals/otf/config/depcomp b/externals/otf/config/depcomp deleted file mode 100644 index df8eea7e4ce8862105fcd7929b20bdb45488048b..0000000000000000000000000000000000000000 --- a/externals/otf/config/depcomp +++ /dev/null @@ -1,630 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to <bug-automake@gnu.org>. -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/externals/otf/config/install-sh b/externals/otf/config/install-sh deleted file mode 100644 index 6781b987bdbcbc23efe6bbe1654a1e3637b9af07..0000000000000000000000000000000000000000 --- a/externals/otf/config/install-sh +++ /dev/null @@ -1,520 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2009-04-28.21; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/externals/otf/config/ltmain.sh b/externals/otf/config/ltmain.sh deleted file mode 100644 index a72f2fd78bfc86bb35a404d1954c4ca9bb923c06..0000000000000000000000000000000000000000 --- a/externals/otf/config/ltmain.sh +++ /dev/null @@ -1,8406 +0,0 @@ -# Generated from ltmain.m4sh. - -# ltmain.sh (GNU libtool) 2.2.6b -# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to <bug-libtool@gnu.org>. - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=2.2.6b -TIMESTAMP="" -package_revision=1.3017 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done - -$lt_unset CDPATH - - - - - -: ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="/bin/sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -# Generated shell functions inserted here. - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname${mode+: }$mode: $*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - - - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help -# Echo long help message to standard output and exit. -func_help () -{ - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - func_error "missing argument for $1" - exit_cmd=exit -} - -exit_cmd=: - - - - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<EOF -$* -EOF - exit $EXIT_SUCCESS -fi - -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" - -# Global variables. -# $mode is unset -nonopt= -execute_dlfiles= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -opt_dry_run=false -opt_duplicate_deps=false -opt_silent=false -opt_debug=: - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -# func_fatal_configuration arg... -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." -} - - -# func_config -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - -# func_features -# Display the features supported by this script. -func_features () -{ - $ECHO "host: $host" - if test "$build_libtool_libs" = yes; then - $ECHO "enable shared libraries" - else - $ECHO "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - $ECHO "enable static libraries" - else - $ECHO "disable static libraries" - fi - - exit $? -} - -# func_enable_tag tagname -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname="$1" - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - test -z "$mode" && func_fatal_error "error: you must specify a MODE." - - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} - - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" - done - case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T <<EOF -# $write_libobj - a libtool object file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object=$write_lobj - -# Name of the non-PIC object -non_pic_object=$write_oldobj - -EOF - $MV "${write_libobj}T" "${write_libobj}" - } -} - -# func_mode_compile arg... -func_mode_compile () -{ - $opt_debug - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - pie_flag="$pie_flag $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - func_quote_for_eval "$arg" - lastarg="$lastarg $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_quote_for_eval "$lastarg" - base_compile="$base_compile $func_quote_for_eval_result" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with \`-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj="$func_basename_result" - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from \`$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - removelist="$removelist $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - command="$command -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$mode'" - ;; - esac - - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? -} - - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO - - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS -} - -test "$mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 </dev/null >/dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - $ECHO >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - - -# func_emit_wrapper_part1 [arg=no] -# -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $ECHO "\ - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat <<EOF - -/* $cwrappersource - temporary wrapper executable for $objdir/$outputname - Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION - - The $output program cannot be directly executed until all the libtool - libraries that it depends on are installed. - - This wrapper executable should never be moved out of the build directory. - If it is, it will not operate correctly. - - Currently, it simply execs the wrapper *script* "$SHELL $output", - but could eventually absorb all of the scripts functionality and - exec $objdir/$outputname directly. -*/ -EOF - cat <<"EOF" -#include <stdio.h> -#include <stdlib.h> -#ifdef _MSC_VER -# include <direct.h> -# include <process.h> -# include <io.h> -# define setmode _setmode -#else -# include <unistd.h> -# include <stdint.h> -# ifdef __CYGWIN__ -# include <io.h> -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -# endif -#endif -#include <malloc.h> -#include <stdarg.h> -#include <assert.h> -#include <string.h> -#include <ctype.h> -#include <errno.h> -#include <fcntl.h> -#include <sys/stat.h> - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} -#else -# define LTWRAPPER_DEBUGPRINTF(args) -#endif - -const char *program_name = NULL; - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <<EOF - -static const char *script_text_part2 = -EOF - func_emit_wrapper_part2 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - - cat <<EOF -const char * MAGIC_EXE = "$magic_exe"; -const char * LIB_PATH_VARNAME = "$shlibpath_var"; -EOF - - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - func_to_host_pathlist "$temp_rpath" - cat <<EOF -const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result"; -EOF - else - cat <<"EOF" -const char * LIB_PATH_VALUE = ""; -EOF - fi - - if test -n "$dllsearchpath"; then - func_to_host_pathlist "$dllsearchpath:" - cat <<EOF -const char * EXE_PATH_VARNAME = "PATH"; -const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result"; -EOF - else - cat <<"EOF" -const char * EXE_PATH_VARNAME = ""; -const char * EXE_PATH_VALUE = ""; -EOF - fi - - if test "$fast_install" = yes; then - cat <<EOF -const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */ -EOF - else - cat <<EOF -const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */ -EOF - fi - - - cat <<"EOF" - -#define LTWRAPPER_OPTION_PREFIX "--lt-" -#define LTWRAPPER_OPTION_PREFIX_LENGTH 5 - -static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH; -static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX; - -static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script"; - -static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7; -static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set"; - /* argument is putenv-style "foo=bar", value of foo is set to bar */ - -static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11; -static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend"; - /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */ - -static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10; -static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append"; - /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */ - -int -main (int argc, char *argv[]) -{ - char **newargz; - int newargc; - char *tmp_pathspec; - char *actual_cwrapper_path; - char *actual_cwrapper_name; - char *target_name; - char *lt_argv_zero; - intptr_t rval = 127; - - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0])); - LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name)); - - /* very simple arg parsing; don't want to rely on getopt */ - for (i = 1; i < argc; i++) - { - if (strcmp (argv[i], dumpscript_opt) == 0) - { -EOF - case "$host" in - *mingw* | *cygwin* ) - # make stdout use "unix" line endings - echo " setmode(1,_O_BINARY);" - ;; - esac - - cat <<"EOF" - printf ("%s", script_text_part1); - printf ("%s", script_text_part2); - return 0; - } - } - - newargz = XMALLOC (char *, argc + 1); - tmp_pathspec = find_executable (argv[0]); - if (tmp_pathspec == NULL) - lt_fatal ("Couldn't find %s", argv[0]); - LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n", - tmp_pathspec)); - - actual_cwrapper_path = chase_symlinks (tmp_pathspec); - LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n", - actual_cwrapper_path)); - XFREE (tmp_pathspec); - - actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path)); - strendzap (actual_cwrapper_path, actual_cwrapper_name); - - /* wrapper name transforms */ - strendzap (actual_cwrapper_name, ".exe"); - tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1); - XFREE (actual_cwrapper_name); - actual_cwrapper_name = tmp_pathspec; - tmp_pathspec = 0; - - /* target_name transforms -- use actual target program name; might have lt- prefix */ - target_name = xstrdup (base_name (TARGET_PROGRAM_NAME)); - strendzap (target_name, ".exe"); - tmp_pathspec = lt_extend_str (target_name, ".exe", 1); - XFREE (target_name); - target_name = tmp_pathspec; - tmp_pathspec = 0; - - LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n", - target_name)); -EOF - - cat <<EOF - newargz[0] = - XMALLOC (char, (strlen (actual_cwrapper_path) + - strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1)); - strcpy (newargz[0], actual_cwrapper_path); - strcat (newargz[0], "$objdir"); - strcat (newargz[0], "/"); -EOF - - cat <<"EOF" - /* stop here, and copy so we don't have to do this twice */ - tmp_pathspec = xstrdup (newargz[0]); - - /* do NOT want the lt- prefix here, so use actual_cwrapper_name */ - strcat (newargz[0], actual_cwrapper_name); - - /* DO want the lt- prefix here if it exists, so use target_name */ - lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1); - XFREE (tmp_pathspec); - tmp_pathspec = NULL; -EOF - - case $host_os in - mingw*) - cat <<"EOF" - { - char* p; - while ((p = strchr (newargz[0], '\\')) != NULL) - { - *p = '/'; - } - while ((p = strchr (lt_argv_zero, '\\')) != NULL) - { - *p = '/'; - } - } -EOF - ;; - esac - - cat <<"EOF" - XFREE (target_name); - XFREE (actual_cwrapper_path); - XFREE (actual_cwrapper_name); - - lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */ - lt_setenv ("DUALCASE", "1"); /* for MSK sh */ - lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE); - lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE); - - newargc=0; - for (i = 1; i < argc; i++) - { - if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0) - { - if (argv[i][env_set_opt_len] == '=') - { - const char *p = argv[i] + env_set_opt_len + 1; - lt_opt_process_env_set (p); - } - else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc) - { - lt_opt_process_env_set (argv[++i]); /* don't copy */ - } - else - lt_fatal ("%s missing required argument", env_set_opt); - continue; - } - if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0) - { - if (argv[i][env_prepend_opt_len] == '=') - { - const char *p = argv[i] + env_prepend_opt_len + 1; - lt_opt_process_env_prepend (p); - } - else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc) - { - lt_opt_process_env_prepend (argv[++i]); /* don't copy */ - } - else - lt_fatal ("%s missing required argument", env_prepend_opt); - continue; - } - if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0) - { - if (argv[i][env_append_opt_len] == '=') - { - const char *p = argv[i] + env_append_opt_len + 1; - lt_opt_process_env_append (p); - } - else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc) - { - lt_opt_process_env_append (argv[++i]); /* don't copy */ - } - else - lt_fatal ("%s missing required argument", env_append_opt); - continue; - } - if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0) - { - /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX - namespace, but it is not one of the ones we know about and - have already dealt with, above (inluding dump-script), then - report an error. Otherwise, targets might begin to believe - they are allowed to use options in the LTWRAPPER_OPTION_PREFIX - namespace. The first time any user complains about this, we'll - need to make LTWRAPPER_OPTION_PREFIX a configure-time option - or a configure.ac-settable value. - */ - lt_fatal ("Unrecognized option in %s namespace: '%s'", - ltwrapper_option_prefix, argv[i]); - } - /* otherwise ... */ - newargz[++newargc] = xstrdup (argv[i]); - } - newargz[++newargc] = NULL; - - LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>"))); - for (i = 0; i < newargc; i++) - { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>"))); - } - -EOF - - case $host_os in - mingw*) - cat <<"EOF" - /* execv doesn't actually work on mingw as expected on unix */ - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); - if (rval == -1) - { - /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); - return 127; - } - return rval; -EOF - ;; - *) - cat <<"EOF" - execv (lt_argv_zero, newargz); - return rval; /* =127, but avoids unused variable warning */ -EOF - ;; - esac - - cat <<"EOF" -} - -void * -xmalloc (size_t num) -{ - void *p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), - string) : NULL; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char) name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable (const char *path) -{ - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal ("Could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} - -void -lt_setenv (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : "<NULL>"), - (value ? value : "<NULL>"))); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : "<NULL>"), - (value ? value : "<NULL>"))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : "<NULL>"), - (value ? value : "<NULL>"))); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - - -EOF -} -# end: func_emit_cwrapperexe_src - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - weak_libs="$weak_libs $arg" - prev= - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_duplicate_deps ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - case $lib in - *.la) func_source "$lib" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` - case " $weak_libs " in - *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - dir=$func_stripname_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_dirname "$deplib" "" "." - dir="$func_dirname_result" - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - $ECHO - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c <<EOF - int main() { return 0; } -EOF - $opt_dry_run || $RM conftest - if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then - ldd_output=`ldd conftest` - for i in $deplibs; do - case $i in - -l*) - func_stripname -l '' "$i" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $i "*) - newdeplibs="$newdeplibs $i" - i="" - ;; - esac - fi - if test -n "$i" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` - set dummy $deplib_matches; shift - deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" - else - droppeddeps=yes - $ECHO - $ECHO "*** Warning: dynamic linker does not accept needed library $i." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which I believe you do not have" - $ECHO "*** because a test_compile did reveal that the linker did not use it for" - $ECHO "*** its dynamic dependency list that programs get resolved with at runtime." - fi - fi - ;; - *) - newdeplibs="$newdeplibs $i" - ;; - esac - done - else - # Error occurred in the first compile. Let's try to salvage - # the situation: Compile a separate program for each library. - for i in $deplibs; do - case $i in - -l*) - func_stripname -l '' "$i" - name=$func_stripname_result - $opt_dry_run || $RM conftest - if $LTCC $LTCFLAGS -o conftest conftest.c $i; then - ldd_output=`ldd conftest` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $i "*) - newdeplibs="$newdeplibs $i" - i="" - ;; - esac - fi - if test -n "$i" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` - set dummy $deplib_matches; shift - deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" - else - droppeddeps=yes - $ECHO - $ECHO "*** Warning: dynamic linker does not accept needed library $i." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because a test_compile did reveal that the linker did not use this one" - $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime." - fi - fi - else - droppeddeps=yes - $ECHO - $ECHO "*** Warning! Library $i is needed by this library but I was not able to" - $ECHO "*** make it link in! You will probably need to install it or some" - $ECHO "*** library that it depends on before this library will be fully" - $ECHO "*** functional. Installing it before continuing would be even better." - fi - ;; - *) - newdeplibs="$newdeplibs $i" - ;; - esac - done - fi - ;; - file_magic*) - set dummy $deplibs_check_method; shift - file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $ECHO - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` - done - fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." - else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." - fi - $ECHO "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output - for obj in $save_libobjs - do - $ECHO "$obj" >> $output - done - $ECHO ')' >> $output - delfiles="$delfiles $output" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - $ECHO "$obj" >> $output - done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - delfiles="$delfiles $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" - ;; - *) newdlfiles="$newdlfiles $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/externals/otf/config/m4/acarchive/ax_mpi.m4 b/externals/otf/config/m4/acarchive/ax_mpi.m4 deleted file mode 100644 index 7a49497e8ba87000fa7d4edc7f70e5e676bf819c..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/acarchive/ax_mpi.m4 +++ /dev/null @@ -1,180 +0,0 @@ -# =========================================================================== -# http://www.nongnu.org/autoconf-archive/ax_mpi.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_MPI([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro tries to find out how to compile programs that use MPI -# (Message Passing Interface), a standard API for parallel process -# communication (see http://www-unix.mcs.anl.gov/mpi/) -# -# On success, it sets the MPICC, MPICXX, MPIF77, or MPIFC output variable -# to the name of the MPI compiler, depending upon the current language. -# (This may just be $CC/$CXX/$F77/$FC, but is more often something like -# mpicc/mpiCC/mpif77/mpif90.) It also sets MPILIBS to any libraries that -# are needed for linking MPI (e.g. -lmpi or -lfmpi, if a special -# MPICC/MPICXX/MPIF77/MPIFC was not found). -# -# If you want to compile everything with MPI, you should set: -# -# CC="MPICC" #OR# CXX="MPICXX" #OR# F77="MPIF77" #OR# FC="MPIFC" -# LIBS="$MPILIBS $LIBS" -# -# NOTE: The above assumes that you will use $CC (or whatever) for linking -# as well as for compiling. (This is the default for automake and most -# Makefiles.) -# -# The user can force a particular library/compiler by setting the -# MPICC/MPICXX/MPIF77/MPIFC and/or MPILIBS environment variables. -# -# ACTION-IF-FOUND is a list of shell commands to run if an MPI library is -# found, and ACTION-IF-NOT-FOUND is a list of commands to run if it is not -# found. If ACTION-IF-FOUND is not specified, the default action will -# define HAVE_MPI. -# -# LICENSE -# -# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> -# Copyright (c) 2008 Julian C. Cummings <cummings@cacr.caltech.edu> -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 4 - -AU_ALIAS([ACX_MPI], [AX_MPI]) -AC_DEFUN([AX_MPI], [ -AC_PREREQ(2.50) dnl for AC_LANG_CASE - -AC_LANG_CASE([C], [ - AC_REQUIRE([AC_PROG_CC]) - AC_ARG_VAR(MPICC,[MPI C compiler command]) - AC_CHECK_PROGS(MPICC, mpicc hcc mpxlc_r mpxlc mpcc cmpicc, $CC) - ax_mpi_save_CC="$CC" - CC="$MPICC" - AC_SUBST(MPICC) -], -[C++], [ - AC_REQUIRE([AC_PROG_CXX]) - AC_ARG_VAR(MPICXX,[MPI C++ compiler command]) - AC_CHECK_PROGS(MPICXX, mpic++ mpicxx mpiCC hcp mpxlC_r mpxlC mpCC cmpic++, $CXX) - ax_mpi_save_CXX="$CXX" - CXX="$MPICXX" - AC_SUBST(MPICXX) -], -[Fortran 77], [ - AC_REQUIRE([AC_PROG_F77]) - AC_ARG_VAR(MPIF77,[MPI Fortran 77 compiler command]) - AC_CHECK_PROGS(MPIF77, mpif77 hf77 mpxlf_r mpxlf mpf77 cmpifc, $F77) - ax_mpi_save_F77="$F77" - F77="$MPIF77" - AC_SUBST(MPIF77) -], -[Fortran], [ - AC_REQUIRE([AC_PROG_FC]) - AC_ARG_VAR(MPIFC,[MPI Fortran compiler command]) - AC_CHECK_PROGS(MPIFC, mpif90 mpxlf95_r mpxlf90_r mpxlf95 mpxlf90 mpf90 cmpif90c, $FC) - ax_mpi_save_FC="$FC" - FC="$MPIFC" - AC_SUBST(MPIFC) -]) - -if test x = x"$MPILIBS"; then - AC_LANG_CASE([C], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])], - [C++], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])], - [Fortran 77], [AC_MSG_CHECKING([for MPI_Init]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ call MPI_Init])],[MPILIBS=" " - AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])], - [Fortran], [AC_MSG_CHECKING([for MPI_Init]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[ call MPI_Init])],[MPILIBS=" " - AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])]) -fi -AC_LANG_CASE([Fortran 77], [ - if test x = x"$MPILIBS"; then - AC_CHECK_LIB(fmpi, MPI_Init, [MPILIBS="-lfmpi"]) - fi - if test x = x"$MPILIBS"; then - AC_CHECK_LIB(fmpich, MPI_Init, [MPILIBS="-lfmpich"]) - fi -], -[Fortran], [ - if test x = x"$MPILIBS"; then - AC_CHECK_LIB(fmpi, MPI_Init, [MPILIBS="-lfmpi"]) - fi - if test x = x"$MPILIBS"; then - AC_CHECK_LIB(mpichf90, MPI_Init, [MPILIBS="-lmpichf90"]) - fi -]) -if test x = x"$MPILIBS"; then - AC_CHECK_LIB(mpi, MPI_Init, [MPILIBS="-lmpi"]) -fi -if test x = x"$MPILIBS"; then - AC_CHECK_LIB(mpich, MPI_Init, [MPILIBS="-lmpich"]) -fi - -dnl We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the -dnl latter uses $CPP, not $CC (which may be mpicc). -AC_LANG_CASE([C], [if test x != x"$MPILIBS"; then - AC_MSG_CHECKING([for mpi.h]) - AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS="" - AC_MSG_RESULT(no)]) -fi], -[C++], [if test x != x"$MPILIBS"; then - AC_MSG_CHECKING([for mpi.h]) - AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS="" - AC_MSG_RESULT(no)]) -fi], -[Fortran 77], [if test x != x"$MPILIBS"; then - AC_MSG_CHECKING([for mpif.h]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[ include 'mpif.h'])],[AC_MSG_RESULT(yes)], [MPILIBS="" - AC_MSG_RESULT(no)]) -fi], -[Fortran], [if test x != x"$MPILIBS"; then - AC_MSG_CHECKING([for mpif.h]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[ include 'mpif.h'])],[AC_MSG_RESULT(yes)], [MPILIBS="" - AC_MSG_RESULT(no)]) -fi]) - -AC_LANG_CASE([C], [CC="$ax_mpi_save_CC"], - [C++], [CXX="$ax_mpi_save_CXX"], - [Fortran 77], [F77="$ax_mpi_save_F77"], - [Fortran], [FC="$ax_mpi_save_FC"]) - -AC_SUBST(MPILIBS) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x = x"$MPILIBS"; then - $2 - : -else - ifelse([$1],,[AC_DEFINE(HAVE_MPI,1,[Define if you have the MPI library.])],[$1]) - : -fi -])dnl AX_MPI diff --git a/externals/otf/config/m4/acarchive/ax_openmp.m4 b/externals/otf/config/m4/acarchive/ax_openmp.m4 deleted file mode 100644 index 832044aaa6768f89e3bc4b04aa287dce39913c5b..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/acarchive/ax_openmp.m4 +++ /dev/null @@ -1,71 +0,0 @@ -dnl @synopsis AX_OPENMP([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -dnl -dnl @summary determine how to compile programs using OpenMP -dnl -dnl This macro tries to find out how to compile programs that use -dnl OpenMP a standard API and set of compiler directives for parallel -dnl programming (see http://www-unix.mcs/) -dnl -dnl On success, it sets the -dnl OPENMP_CFLAGS/OPENMP_CXXFLAGS/OPENMP_F77FLAGS output variable to -dnl the flag (e.g. -omp) used both to compile *and* link OpenMP -dnl programs in the current language. -dnl -dnl NOTE: You are assumed to not only compile your program with these -dnl flags, but also link it with them as well. -dnl -dnl If you want to compile everything with OpenMP, you should set: -dnl -dnl CFLAGS="$CFLAGS $OPENMP_CFLAGS" -dnl #OR# CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS" -dnl #OR# FFLAGS="$FFLAGS $OPENMP_FFLAGS" -dnl -dnl (depending on the selected language). -dnl -dnl The user can override the default choice by setting the -dnl corresponding environment variable (e.g. OPENMP_CFLAGS). -dnl -dnl ACTION-IF-FOUND is a list of shell commands to run if an OpenMP -dnl flag is found, and ACTION-IF-NOT-FOUND is a list of commands to run -dnl it if it is not found. If ACTION-IF-FOUND is not specified, the -dnl default action will define HAVE_OPENMP. -dnl -dnl @category InstalledPackages -dnl @author Steven G. Johnson <stevenj@alum.mit.edu> -dnl @version 2006-01-24 -dnl @license GPLWithACException - -AC_DEFUN([AX_OPENMP], [ -AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX - -AC_CACHE_CHECK([for OpenMP flag of _AC_LANG compiler], ax_cv_[]_AC_LANG_ABBREV[]_openmp, [save[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS -ax_cv_[]_AC_LANG_ABBREV[]_openmp=unknown -# Flags to try: -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI), -# -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX), -# -Popenmp (NECSX), none -ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp -Popenmp none" -if test "x$OPENMP_[]_AC_LANG_PREFIX[]FLAGS" != x; then - ax_openmp_flags="$OPENMP_[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flags" -fi -for ax_openmp_flag in $ax_openmp_flags; do - case $ax_openmp_flag in - none) []_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[] ;; - *) []_AC_LANG_PREFIX[]FLAGS="$save[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flag" ;; - esac - AC_TRY_COMPILE([], [ -#ifndef _OPENMP -# error "_OPENMP not defined" -#endif - ], [ax_cv_[]_AC_LANG_ABBREV[]_openmp=$ax_openmp_flag; break]) -done -[]_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[]FLAGS -]) -if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" = "xunknown"; then - m4_default([$2],:) -else - if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" != "xnone"; then - OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ax_cv_[]_AC_LANG_ABBREV[]_openmp - fi - m4_default([$1],:) -fi -])dnl AX_OPENMP diff --git a/externals/otf/config/m4/acinclude.debug.m4 b/externals/otf/config/m4/acinclude.debug.m4 deleted file mode 100644 index fc423fd12a8071400cfb039d2c1754b5cf07979d..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/acinclude.debug.m4 +++ /dev/null @@ -1,15 +0,0 @@ -dnl switch on/off additonal debug output in otf lib -AC_DEFUN([WITH_DEBUG], -[ - AH_TEMPLATE(OTF_DEBUG, [], [switch on/off additonal debug checks in otf lib]) - - AC_ARG_WITH([debug], - AC_HELP_STRING([--with-debug],[additonal debug checks]), - [debug=$withval], - [debug=""]) - - if test "$debug" = yes; then - AC_DEFINE(OTF_DEBUG) - fi -]) - diff --git a/externals/otf/config/m4/acinclude.math.m4 b/externals/otf/config/m4/acinclude.math.m4 deleted file mode 100644 index d2b3fc0b5eb5c27ce0dfb50d89064266452f7e04..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/acinclude.math.m4 +++ /dev/null @@ -1,21 +0,0 @@ -AC_DEFUN([CHECK_MATH], -[ - LIBS="$LIBS -lm" - AC_MSG_CHECKING([whether linking with -lm works]) - AC_TRY_LINK([],[], - [AC_MSG_RESULT([yes]); math_lib=-lm],[AC_MSG_RESULT([no])]) - LIBS=$sav_LIBS - - AS_IF([test x"$math_lib" != x], - [ - AC_MSG_CHECKING([whether we need to link -lm to get math functions]) - AC_TRY_LINK([#include <math.h>], -[ - volatile double c, x = 47.11; - c = ceil(x); -], - [AC_MSG_RESULT([no])], [AC_MSG_RESULT([yes]); MATHLIB=$math_lib]) - ]) - - AC_SUBST(MATHLIB) -]) diff --git a/externals/otf/config/m4/acinclude.mpi.m4 b/externals/otf/config/m4/acinclude.mpi.m4 deleted file mode 100644 index 184225c0d7dbac9d4c87d5a3374de0a7b375d8b9..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/acinclude.mpi.m4 +++ /dev/null @@ -1,76 +0,0 @@ -AC_DEFUN([CHECK_MPI], -[ - mpi_error="no" - check_mpi="yes" - force_mpi="no" - have_mpi="no" - - AC_ARG_WITH([mpi], - AC_HELP_STRING([--with-mpi], - [use MPI for some OTF tools, default: yes if found by configure]), - [if test "$withval" = "yes"; then force_mpi="yes"; else check_mpi="no"; fi]) - - AC_ARG_WITH([mpi-dir], - AC_HELP_STRING([--with-mpi-dir], - [give the path for MPI, default: /usr]), - [mpi_dir="$withval/"]) - - AC_ARG_WITH([mpi-inc-dir], - AC_HELP_STRING([--with-mpi-inc-dir], - [give the path dir MPI-include files, default: MPIDIR/include]), - [mpi_inc_dir="$withval/"], - [if test x"$mpi_dir" != x; then mpi_inc_dir="$mpi_dir"include/; fi]) - - AC_ARG_WITH([mpi-lib-dir], - AC_HELP_STRING([--with-mpi-lib-dir], - [give the path for MPI-libraries, default: MPIDIR/lib]), - [mpi_lib_dir="$withval/"], - [if test x"$mpi_dir" != x; then mpi_lib_dir="$mpi_dir"lib/; fi]) - - AC_ARG_WITH([mpi-lib], - AC_HELP_STRING([--with-mpi-lib], - [use given MPI]), - [mpi_lib="$withval"]) - - if test "$check_mpi" = "yes"; then - sav_CPPFLAGS=$CPPFLAGS - AS_IF([test x"$mpi_inc_dir" != x], - [CPPFLAGS="$CPPFLAGS -I$mpi_inc_dir"]) - - sav_LDFLAGS=$LDFLAGS - AS_IF([test x"$mpi_lib_dir" != x], - [LDFLAGS="$LDFLAGS -L$mpi_lib_dir"]) - - AS_IF([test x"$mpi_lib" != x], - [MPILIBS="$mpi_lib"]) - - AX_MPI( - [ - mpi_lib=$MPILIBS - have_mpi="yes" - ], - [ - mpi_error="yes" - ]) - - CPPFLAGS=$sav_CPPFLAGS - LDFLAGS=$sav_LDFLAGS - fi - - MPI_LIB_DIR=$mpi_lib_dir - MPI_LIB_LINE=$mpi_lib - if test x"$mpi_lib_dir" != x; then - MPI_LIB_LINE="-L$mpi_lib_dir $MPI_LIB_LINE" - fi - - MPI_INCLUDE_DIR=$mpi_inc_dir - MPI_INCLUDE_LINE= - if test x"$mpi_inc_dir" != x; then - MPI_INCLUDE_LINE="-I$mpi_inc_dir" - fi - - AC_SUBST(MPI_LIB_DIR) - AC_SUBST(MPI_LIB_LINE) - AC_SUBST(MPI_INCLUDE_DIR) - AC_SUBST(MPI_INCLUDE_LINE) -]) diff --git a/externals/otf/config/m4/acinclude.omp.m4 b/externals/otf/config/m4/acinclude.omp.m4 deleted file mode 100644 index dc4c0829a8987065854377bb4be53bc7f3279fba..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/acinclude.omp.m4 +++ /dev/null @@ -1,22 +0,0 @@ -AC_DEFUN([CHECK_OMP], -[ - omp_error="no" - check_omp="yes" - force_omp="no" - have_omp="no" - - AC_ARG_VAR(OPENMP_CXXFLAGS, [C++ compiler flags to enable support for OpenMP]) - - AC_ARG_WITH([omp], - AC_HELP_STRING([--with-omp], - [use OpenMP for some OTF tools, default: yes if found by configure]), - [if test "$withval" = "yes"; then force_omp="yes"; else check_omp="no"; fi]) - - AS_IF([test "$check_omp" = "yes"], - [ - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AX_OPENMP([have_omp="yes"], [omp_error="yes"]) - AC_LANG_RESTORE - ]) -]) diff --git a/externals/otf/config/m4/acinclude.pydev.m4 b/externals/otf/config/m4/acinclude.pydev.m4 deleted file mode 100644 index d24618d6436d070956eef624f6c38ec89b0904ed..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/acinclude.pydev.m4 +++ /dev/null @@ -1,154 +0,0 @@ -AC_DEFUN([AC_PYTHON_DEVEL],[ - - # - # Allow the use of a (user set) custom python version - # - AC_ARG_VAR([PYTHON_VERSION],[The installed Python - version to use, for example '2.3'. This string - will be appended to the Python interpreter - canonical name.]) - - AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]]) - if test -z "$PYTHON"; then - - AC_MSG_WARN([Cannot find python$PYTHON_VERSION in your system path]) - PYTHON_VERSION="" - - else - - - # - # Check for Python include path - # - AC_MSG_CHECKING([for python include path]) - if test -z "$PYTHON_CPPFLAGS"; then - python_path=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc();" 2> /dev/null` - if test -n "${python_path}"; then - python_path="-I$python_path" - fi - PYTHON_CPPFLAGS=$python_path - fi - if test -n "$PYTHON_CPPFLAGS"; then - AC_MSG_RESULT([$PYTHON_CPPFLAGS]) - else - AC_MSG_RESULT([no]) - fi - AC_SUBST([PYTHON_CPPFLAGS]) - - # - # Check for Python library path - # - AC_MSG_CHECKING([for python library path]) - if test -z "$PYTHON_LDFLAGS"; then - # (makes two attempts to ensure we've got a version number - # from the interpreter) - py_version=`$PYTHON -c "from distutils.sysconfig import *; \ - from string import join; \ - print join(get_config_vars('VERSION'))" 2> /dev/null` - if test "$py_version" = "[None]" -o -z "$py_version"; then - if test -n "$PYTHON_VERSION"; then - py_version=$PYTHON_VERSION - else - py_version=`$PYTHON -c "import sys; \ - print sys.version[[:3]]"` - fi - fi - - PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \ - from string import join; \ - print '-L' + get_python_lib(0,1), \ - '-lpython';" 2> /dev/null`$py_version - fi - if test ! "$PYTHON_LDFLAGS" = "$py_version"; then - AC_MSG_RESULT([$PYTHON_LDFLAGS]) - else - AC_MSG_RESULT([no]) - fi - AC_SUBST([PYTHON_LDFLAGS]) - - # - # Check for site packages - # - AC_MSG_CHECKING([for python site-packages path]) - if test -z "$PYTHON_SITE_PKG"; then - PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ - print distutils.sysconfig.get_python_lib(0,0);" 2> /dev/null` - fi - if test -n "$PYTHON_SITE_PKG"; then - AC_MSG_RESULT([$PYTHON_SITE_PKG]) - else - AC_MSG_RESULT([no]) - fi - AC_SUBST([PYTHON_SITE_PKG]) - - # - # libraries which must be linked in when embedding - # - AC_MSG_CHECKING(python extra libraries) - if test -z "$PYTHON_EXTRA_LIBS"; then - PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ - conf = distutils.sysconfig.get_config_var; \ - print conf('LOCALMODLIBS'), conf('LIBS')" 2> /dev/null` - fi - if test -n "$PYTHON_EXTRA_LIBS"; then - AC_MSG_RESULT([$PYTHON_EXTRA_LIBS]) - else - AC_MSG_RESULT([no]) - fi - AC_SUBST(PYTHON_EXTRA_LIBS) - - # - # linking flags needed when embedding - # - AC_MSG_CHECKING(python extra linking flags) - if test -z "$PYTHON_EXTRA_LDFLAGS"; then - PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ - conf = distutils.sysconfig.get_config_var; \ - print conf('LINKFORSHARED')" 2> /dev/null` - fi - if test -n "$PYTHON_EXTRA_LDFLAGS"; then - AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS]) - else - AC_MSG_RESULT([no]) - fi - AC_SUBST(PYTHON_EXTRA_LDFLAGS) - - # - # final check to see if everything compiles alright - # - AC_MSG_CHECKING([consistency of all components of python development environment]) - AC_LANG_PUSH([C]) - # save current global flags - sav_LDFLAGS=$LDFLAGS - sav_CPPFLAGS=$CPPFLAGS - LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS" - CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" - AC_TRY_LINK([ - #include <Python.h> - ],[ - Py_Initialize(); - ],[pythonexists=yes],[pythonexists=no]) - - AC_MSG_RESULT([$pythonexists]) - - if test ! "$pythonexists" = "yes"; then - AC_MSG_ERROR([Cannot find python development environment. You probably have to install the development version of the python package.]) - PYTHON_VERSION="" - fi - - AC_LANG_POP - # turn back to default flags - LDFLAGS=$sav_LDFLAGS - CPPFLAGS=$sav_CPPFLAGS - - - #get the paths where to install the package - AC_SUBST([pkgpythondir], - ['${prefix}'/lib/python${py_version}/site-packages/otf]) - - AC_SUBST([pkgpyexecdir], - ['${exec_prefix}'/lib/python${py_version}/site-packages/otf]) - - fi - -]) diff --git a/externals/otf/config/m4/acinclude.swig.m4 b/externals/otf/config/m4/acinclude.swig.m4 deleted file mode 100644 index 312855d048abd79d9a3489871bd30d0dddd165ee..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/acinclude.swig.m4 +++ /dev/null @@ -1,57 +0,0 @@ -AC_DEFUN([AC_PROG_SWIG],[ - AC_PATH_PROG([SWIG],[swig]) - if test -z "$SWIG" ; then - - AC_MSG_ERROR([Cannot find 'swig' program.]) - - elif test -n "$1" ; then - AC_MSG_CHECKING([for swig version]) - [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] - AC_MSG_RESULT([$swig_version]) - if test -n "$swig_version" ; then - # Calculate the required version number components - [required=$1] - [required_major=`echo $required | sed 's/[^0-9].*//'`] - if test -z "$required_major" ; then - [required_major=0] - fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] - [required_minor=`echo $required | sed 's/[^0-9].*//'`] - if test -z "$required_minor" ; then - [required_minor=0] - fi - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] - [required_patch=`echo $required | sed 's/[^0-9].*//'`] - if test -z "$required_patch" ; then - [required_patch=0] - fi - # Calculate the available version number components - [available=$swig_version] - [available_major=`echo $available | sed 's/[^0-9].*//'`] - if test -z "$available_major" ; then - [available_major=0] - fi - [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] - [available_minor=`echo $available | sed 's/[^0-9].*//'`] - if test -z "$available_minor" ; then - [available_minor=0] - fi - [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] - [available_patch=`echo $available | sed 's/[^0-9].*//'`] - if test -z "$available_patch" ; then - [available_patch=0] - fi - if test $available_major -ne $required_major \ - -o $available_minor -ne $required_minor \ - -o $available_patch -lt $required_patch ; then - AC_MSG_ERROR([swig version >= $1 is required. You have $swig_version.]) - else - swigexists=yes - fi - else - AC_MSG_ERROR([Cannot determine swig version]) - fi - fi - -]) - diff --git a/externals/otf/config/m4/acinclude.swig_python.m4 b/externals/otf/config/m4/acinclude.swig_python.m4 deleted file mode 100644 index bd4a4bde76474d3fbd60d40316499e32a6b0c9f1..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/acinclude.swig_python.m4 +++ /dev/null @@ -1,51 +0,0 @@ -AC_DEFUN([SWIG_PYTHON],[ - - # - #enable python bindings - # - AC_ARG_ENABLE([python-bindings], - AC_HELP_STRING([--enable-python-bindings], - [force generation of Python bindings]), - [enable_python_bindings="yes"], - [enable_python_bindings=""]) - - - # - #with python version - # - AC_ARG_WITH([python-version], - AC_HELP_STRING([--with-python-version=VERSION], - [force a custom python version]), - [PYTHON_VERSION=$withval]) - - - # - #only check if the user did --enable-python-bindings - # - if test x"$enable_python_bindings" = xyes; then - - # - #test for swig >= 1.3 - # - AC_PROG_SWIG(1.3) - - # - #test for python-dev - # - AC_PYTHON_DEVEL - - test "x$1" != "xno" || swig_shadow=" -noproxy" - - # - #set the swig options - # - AC_SUBST([SWIG_PYTHON_OPT],[-python]) - - # - #set the python compiler flags - # - AC_SUBST([SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS]) - - fi - -]) diff --git a/externals/otf/config/m4/acinclude.verbose.m4 b/externals/otf/config/m4/acinclude.verbose.m4 deleted file mode 100644 index 6a51bea8c2ac24a77d6160fda19fd78670923111..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/acinclude.verbose.m4 +++ /dev/null @@ -1,15 +0,0 @@ -dnl switch on/off additonal debug output in otf lib -AC_DEFUN([WITH_VERBOSE], -[ - AH_TEMPLATE(OTF_VERBOSE, [], [switch on/off verbose output in otf lib]) - - AC_ARG_WITH([verbose], - AC_HELP_STRING([--with-verbose],[additonal verbose output]), - [verbose=$withval], - [verbose=""]) - - if test "$verbose" = yes; then - AC_DEFINE(OTF_VERBOSE) - fi -]) - diff --git a/externals/otf/config/m4/acinclude.vtf3.m4 b/externals/otf/config/m4/acinclude.vtf3.m4 deleted file mode 100644 index 7d289e5c84ead0eadec8c4edc7a381c0bf06238b..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/acinclude.vtf3.m4 +++ /dev/null @@ -1,90 +0,0 @@ -dnl have the vtf3 dirs specified -AC_DEFUN([CHECK_VTF3], -[ - vtf3_error="no" - check_vtf3="yes" - force_vtf3="no" - have_vtf3="no" - - AH_TEMPLATE(HAVE_VTF3, [], [defined if vtf3 library is to be used]) - - AC_ARG_WITH([vtf3], - AC_HELP_STRING([--with-vtf3], - [use vtf3, default: yes if found by configure]), - [if test "$withval" = "yes"; then force_vtf3="yes"; else check_vtf3="no"; fi]) - - AC_ARG_WITH([vtf3-dir], - AC_HELP_STRING([--with-vtf3-dir], - [give the path for vtf3, default: /usr]), - [vtf3_dir="$withval/"]) - - AC_ARG_WITH([vtf3-inc-dir], - AC_HELP_STRING([--with-vtf3-inc-dir], - [give the path dir vtf3-include files, default: VTF3DIR/include]), - [vtf3_inc_dir="$withval/"], - [if test x"$vtf3_dir" != x; then vtf3_inc_dir="$vtf3_dir"include/; fi]) - - AC_ARG_WITH([vtf3-lib-dir], - AC_HELP_STRING([--with-vtf3-lib-dir], - [give the path for VTF3-libraries, default: VTF3DIR/lib]), - [vtf3_lib_dir="$withval/"], - [if test x"$vtf3_dir" != x; then vtf3_lib_dir="$vtf3_dir"lib/; fi]) - - AC_ARG_WITH([vtf3-lib], - AC_HELP_STRING([--with-vtf3-lib], - [use given vtf3, default: -lvtf3]), - [vtf3_lib="$withval"]) - - if test "$check_vtf3" = "yes"; then - sav_CPPFLAGS=$CPPFLAGS - if test x"$vtf3_inc_dir" != x; then - CPPFLAGS="$CPPFLAGS -I$vtf3_inc_dir" - fi - AC_CHECK_HEADER([vtf3.h], [], - [ - AC_MSG_NOTICE([error: no vtf3.h found; check path for VTF3 package first...]) - vtf3_error="yes" - ]) - CPPFLAGS=$sav_CPPFLAGS - - if test x"$vtf3_lib" = x -a "$vtf3_error" = "no"; then - sav_LIBS=$LIBS - cl="-lvtf3" - if test x"$vtf3_lib_dir" != x; then - cl="-L$vtf3_lib_dir $cl" - fi - LIBS="$LIBS $cl" - AC_MSG_CHECKING([whether linking with -lvtf3 works]) - AC_TRY_LINK([],[], - [AC_MSG_RESULT([yes]); vtf3_lib=-lvtf3],[AC_MSG_RESULT([no])]) - LIBS=$sav_LIBS - fi - - if test x"$vtf3_lib" = x -a "$vtf3_error" = "no"; then - AC_MSG_NOTICE([error: no libvtf3 found; check path for VTF3 package first...]) - vtf3_error="yes" - fi - - if test $vtf3_error = "no"; then - AC_DEFINE(HAVE_VTF3) - have_vtf3="yes" - fi - fi - - VTF3_LIB_DIR=$vtf3_lib_dir - VTF3_LIB_LINE=$vtf3_lib - if test x"$vtf3_lib_dir" != x; then - VTF3_LIB_LINE="-L$vtf3_lib_dir $VTF3_LIB_LINE" - fi - - VTF3_INCLUDE_DIR=$vtf3_inc_dir - VTF3_INCLUDE_LINE= - if test x"$vtf3_inc_dir" != x; then - VTF3_INCLUDE_LINE="-I$vtf3_inc_dir" - fi - - AC_SUBST(VTF3_LIB_DIR) - AC_SUBST(VTF3_LIB_LINE) - AC_SUBST(VTF3_INCLUDE_DIR) - AC_SUBST(VTF3_INCLUDE_LINE) -]) diff --git a/externals/otf/config/m4/acinclude.zlib.m4 b/externals/otf/config/m4/acinclude.zlib.m4 deleted file mode 100644 index a9150bfd19e3fe66187b38b8a7c5268f17861293..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/acinclude.zlib.m4 +++ /dev/null @@ -1,90 +0,0 @@ -dnl have the zlib dirs specified -AC_DEFUN([CHECK_ZLIB], -[ - zlib_error="no" - check_zlib="yes" - force_zlib="no" - have_zlib="no" - - AH_TEMPLATE(HAVE_ZLIB, [], [defined if zlib library is to be used]) - - AC_ARG_WITH([zlib], - AC_HELP_STRING([--with-zlib], - [use zlib, default: yes if found by configure]), - [if test "$withval" = "yes"; then force_zlib="yes"; else check_zlib="no"; fi]) - - AC_ARG_WITH([zlib-dir], - AC_HELP_STRING([--with-zlib-dir], - [give the path for zlib, default: /usr]), - [zlib_dir="$withval/"]) - - AC_ARG_WITH([zlib-inc-dir], - AC_HELP_STRING([--with-zlib-inc-dir], - [give the path dir zlib-include files, default: ZLIBDIR/include]), - [zlib_inc_dir="$withval/"], - [if test x"$zlib_dir" != x; then zlib_inc_dir="$zlib_dir"include/; fi]) - - AC_ARG_WITH([zlib-lib-dir], - AC_HELP_STRING([--with-zlib-lib-dir], - [give the path for ZLIB-libraries, default: ZLIBDIR/lib]), - [zlib_lib_dir="$withval/"], - [if test x"$zlib_dir" != x; then zlib_lib_dir="$zlib_dir"lib/; fi]) - - AC_ARG_WITH([zlib-lib], - AC_HELP_STRING([--with-zlib-lib], - [use given zlib, default: -lz]), - [zlib_lib="$withval"]) - - if test "$check_zlib" = "yes"; then - sav_CPPFLAGS=$CPPFLAGS - if test x"$zlib_inc_dir" != x; then - CPPFLAGS="$CPPFLAGS -I$zlib_inc_dir" - fi - AC_CHECK_HEADER([zlib.h], [], - [ - AC_MSG_NOTICE([error: no zlib.h found; check path for ZLIB package first...]) - zlib_error="yes" - ]) - CPPFLAGS=$sav_CPPFLAGS - - if test x"$zlib_lib" = x -a "$zlib_error" = "no"; then - sav_LIBS=$LIBS - cl="-lz" - if test x"$zlib_lib_dir" != x; then - cl="-L$zlib_lib_dir $cl" - fi - LIBS="$LIBS $cl" - AC_MSG_CHECKING([whether linking with -lz works]) - AC_TRY_LINK([],[], - [AC_MSG_RESULT([yes]); zlib_lib=-lz],[AC_MSG_RESULT([no])]) - LIBS=$sav_LIBS - fi - - if test x"$zlib_lib" = x -a "$zlib_error" = "no"; then - AC_MSG_NOTICE([error: no libz found; check path for ZLIB package first...]) - zlib_error="yes" - fi - - if test $zlib_error = "no"; then - AC_DEFINE(HAVE_ZLIB) - have_zlib="yes" - fi - fi - - ZLIB_LIB_DIR=$zlib_lib_dir - ZLIB_LIB_LINE=$zlib_lib - if test x"$zlib_lib_dir" != x; then - ZLIB_LIB_LINE="-L$zlib_lib_dir $ZLIB_LIB_LINE" - fi - - ZLIB_INCLUDE_DIR=$zlib_inc_dir - ZLIB_INCLUDE_LINE= - if test x"$zlib_inc_dir" != x; then - ZLIB_INCLUDE_LINE="-I$zlib_inc_dir" - fi - - AC_SUBST(ZLIB_LIB_DIR) - AC_SUBST(ZLIB_LIB_LINE) - AC_SUBST(ZLIB_INCLUDE_DIR) - AC_SUBST(ZLIB_INCLUDE_LINE) -]) diff --git a/externals/otf/config/m4/libtool.m4 b/externals/otf/config/m4/libtool.m4 deleted file mode 100644 index 841ff897407d82255d7c673632bacca4e0875c81..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/libtool.m4 +++ /dev/null @@ -1,7357 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - -_LT_OUTPUT_LIBTOOL_INIT -]) - - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to <bug-libtool@gnu.org>." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib<name>.so - # instead of lib<name>.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break - ;; - *) - test "$with_gnu_ld" != yes && break - ;; - esac - fi - done - IFS="$lt_save_ifs" -else - lt_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$lt_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -_LT_PATH_LD_GNU -AC_SUBST([LD]) - -_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) -])# LT_PATH_LD - -# Old names: -AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) -AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_LD], []) -dnl AC_DEFUN([AC_PROG_LD], []) - - -# _LT_PATH_LD_GNU -#- -------------- -m4_defun([_LT_PATH_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - lt_cv_prog_gnu_ld=yes - ;; -*) - lt_cv_prog_gnu_ld=no - ;; -esac]) -with_gnu_ld=$lt_cv_prog_gnu_ld -])# _LT_PATH_LD_GNU - - -# _LT_CMD_RELOAD -# -------------- -# find reload flag for linker -# -- PORTME Some linkers may need a different reload flag. -m4_defun([_LT_CMD_RELOAD], -[AC_CACHE_CHECK([for $LD option to reload object files], - lt_cv_ld_reload_flag, - [lt_cv_ld_reload_flag='-r']) -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac -_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl -_LT_DECL([], [reload_cmds], [2])dnl -])# _LT_CMD_RELOAD - - -# _LT_CHECK_MAGIC_METHOD -# ---------------------- -# how to check for library dependencies -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_MAGIC_METHOD], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -AC_CACHE_CHECK([how to recognize dependent libraries], -lt_cv_deplibs_check_method, -[lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[[4-9]]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[[45]]*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -AC_MSG_CHECKING([for $compiler option to produce PIC]) -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - bgxlc* | bgxlC* | xlc* | xlC*) - # IBM XL 8.0 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - bgxl* | xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - bgxl[[cC]]* | xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - bgxl* | xl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC="$lt_save_CC" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF - ;; - esac -]) diff --git a/externals/otf/config/m4/ltoptions.m4 b/externals/otf/config/m4/ltoptions.m4 deleted file mode 100644 index 34151a3ba625f326e6645d6afc79586f10746a3e..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/ltoptions.m4 +++ /dev/null @@ -1,368 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/externals/otf/config/m4/ltsugar.m4 b/externals/otf/config/m4/ltsugar.m4 deleted file mode 100644 index 9000a057d31ddf75cb85ccda8757de4493bcdbe7..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/externals/otf/config/m4/ltversion.m4 b/externals/otf/config/m4/ltversion.m4 deleted file mode 100644 index f3c5309802447a3b341b1a2c5e4d74ec138b311a..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# Generated from ltversion.in. - -# serial 3017 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/externals/otf/config/m4/lt~obsolete.m4 b/externals/otf/config/m4/lt~obsolete.m4 deleted file mode 100644 index 637bb2066c425f79faecd6cc9e4e6b5074c6b55c..0000000000000000000000000000000000000000 --- a/externals/otf/config/m4/lt~obsolete.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 4 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) diff --git a/externals/otf/config/missing b/externals/otf/config/missing deleted file mode 100644 index 28055d2ae6f2a2c584afcd769d7881e11f62ecd9..0000000000000000000000000000000000000000 --- a/externals/otf/config/missing +++ /dev/null @@ -1,376 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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 <http://www.gnu.org/licenses/>. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. - -Send bug reports to <bug-automake@gnu.org>." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/externals/otf/config/otf_get_version.sh b/externals/otf/config/otf_get_version.sh deleted file mode 100644 index 4c39e510cbb33c759fd48ebc7e289c3f923bb19b..0000000000000000000000000000000000000000 --- a/externals/otf/config/otf_get_version.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh - -srcfile=$1 -option=$2 - -if test -z "$srcfile"; then - option="--help" -else - if ! test -f $srcfile; then - echo "$0: $srcfile: No such file or directory" - exit 1 - fi - - otf_vers=`cat $srcfile` - eval "$otf_vers" -fi - -if test -z "$option"; then - option="--full" -fi - -case "$option" in - --major) - echo $major - ;; - --minor) - echo $minor - ;; - --sub) - echo $sub - ;; - --string) - echo $string - ;; - --full) - out="$major.$minor" - if test x"$sub" != "x0"; then - out="$out.$sub" - fi - if test x"$string" != "x"; then - out="$out$string" - fi - echo "$out" - ;; - --library) - echo $library - ;; - -h|--help) - cat <<EOF -$0 <srcfile> <option> - -<srcfile> - Text version file -<option> - One of: - --full - Full version number - --major - Major version number - --minor - Minor version number - --string - Version string (alpha, beta, etc) - --library - Library version number - --help - This message -EOF - ;; - *) - echo "Unrecognized option $option. Run $0 --help for options" - exit 1 - ;; -esac - -exit 0 - diff --git a/externals/otf/config/py-compile b/externals/otf/config/py-compile deleted file mode 100644 index 3f9d05b603db603f16721a91bb729571d2dbb5de..0000000000000000000000000000000000000000 --- a/externals/otf/config/py-compile +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/sh -# py-compile - Compile a Python program - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software -# Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# 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 <bug-automake@gnu.org> or send patches to -# <automake-patches@gnu.org>. - -if [ -z "$PYTHON" ]; then - PYTHON=python -fi - -basedir= -destdir= -files= -while test $# -ne 0; do - case "$1" in - --basedir) - basedir=$2 - if test -z "$basedir"; then - echo "$0: Missing argument to --basedir." 1>&2 - exit 1 - fi - shift - ;; - --destdir) - destdir=$2 - if test -z "$destdir"; then - echo "$0: Missing argument to --destdir." 1>&2 - exit 1 - fi - shift - ;; - -h|--h*) - cat <<\EOF -Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." - -Byte compile some python scripts FILES. Use --destdir to specify any -leading directory path to the FILES that you don't want to include in the -byte compiled file. Specify --basedir for any additional path information you -do want to be shown in the byte compiled file. - -Example: - py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py - -Report bugs to <bug-automake@gnu.org>. -EOF - exit $? - ;; - -v|--v*) - echo "py-compile $scriptversion" - exit $? - ;; - *) - files="$files $1" - ;; - esac - shift -done - -if test -z "$files"; then - echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 - exit 1 -fi - -# if basedir was given, then it should be prepended to filenames before -# byte compilation. -if [ -z "$basedir" ]; then - pathtrans="path = file" -else - pathtrans="path = os.path.join('$basedir', file)" -fi - -# if destdir was given, then it needs to be prepended to the filename to -# byte compile but not go into the compiled file. -if [ -z "$destdir" ]; then - filetrans="filepath = path" -else - filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" -fi - -$PYTHON -c " -import sys, os, py_compile - -files = '''$files''' - -sys.stdout.write('Byte-compiling python modules...\n') -for file in files.split(): - $pathtrans - $filetrans - if not os.path.exists(filepath) or not (len(filepath) >= 3 - and filepath[-3:] == '.py'): - continue - sys.stdout.write(file) - sys.stdout.flush() - py_compile.compile(filepath, filepath + 'c', path) -sys.stdout.write('\n')" || exit $? - -# this will fail for python < 1.5, but that doesn't matter ... -$PYTHON -O -c " -import sys, os, py_compile - -files = '''$files''' -sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') -for file in files.split(): - $pathtrans - $filetrans - if not os.path.exists(filepath) or not (len(filepath) >= 3 - and filepath[-3:] == '.py'): - continue - sys.stdout.write(file) - sys.stdout.flush() - py_compile.compile(filepath, filepath + 'o', path) -sys.stdout.write('\n')" 2>/dev/null || : - -# 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/externals/otf/configure b/externals/otf/configure deleted file mode 100755 index 5833bf8a8dd923c266f76165ac68b5faa7ef95c7..0000000000000000000000000000000000000000 --- a/externals/otf/configure +++ /dev/null @@ -1,18814 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for OTF 1.7catfish. -# -# Report bugs to <andreas.knuepfer@tu-dresden.de>. -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: andreas.knuepfer@tu-dresden.de about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - - -test -n "$DJDIR" || exec 7<&0 </dev/null -exec 6>&1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='OTF' -PACKAGE_TARNAME='OTF' -PACKAGE_VERSION='1.7catfish' -PACKAGE_STRING='OTF 1.7catfish' -PACKAGE_BUGREPORT='andreas.knuepfer@tu-dresden.de' -PACKAGE_URL='' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include <stdio.h> -#ifdef HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -# include <sys/stat.h> -#endif -#ifdef STDC_HEADERS -# include <stdlib.h> -# include <stddef.h> -#else -# ifdef HAVE_STDLIB_H -# include <stdlib.h> -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include <memory.h> -# endif -# include <string.h> -#endif -#ifdef HAVE_STRINGS_H -# include <strings.h> -#endif -#ifdef HAVE_INTTYPES_H -# include <inttypes.h> -#endif -#ifdef HAVE_STDINT_H -# include <stdint.h> -#endif -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -sizeof_long -have_inttypes_h -have_stdint_h -AMHAVEPYTHONSWIG_FALSE -AMHAVEPYTHONSWIG_TRUE -SWIG_PYTHON_CPPFLAGS -SWIG_PYTHON_OPT -pkgpyexecdir -pkgpythondir -PYTHON_EXTRA_LDFLAGS -PYTHON_EXTRA_LIBS -PYTHON_SITE_PKG -PYTHON_LDFLAGS -PYTHON_CPPFLAGS -PYTHON -PYTHON_VERSION -SWIG -MATHLIB -AMHAVEZLIB_FALSE -AMHAVEZLIB_TRUE -ZLIB_INCLUDE_LINE -ZLIB_INCLUDE_DIR -ZLIB_LIB_LINE -ZLIB_LIB_DIR -AMHAVEVTF3_FALSE -AMHAVEVTF3_TRUE -VTF3_INCLUDE_LINE -VTF3_INCLUDE_DIR -VTF3_LIB_LINE -VTF3_LIB_DIR -AMHAVEOMP_FALSE -AMHAVEOMP_TRUE -OPENMP_CXXFLAGS -AMHAVEMPI_FALSE -AMHAVEMPI_TRUE -MPI_INCLUDE_LINE -MPI_INCLUDE_DIR -MPI_LIB_LINE -MPI_LIB_DIR -MPILIBS -MPICC -AMBUILDBINARIES_FALSE -AMBUILDBINARIES_TRUE -CXXCPP -CPP -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -lt_ECHO -RANLIB -AR -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -LIBTOOL -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -ac_ct_CC -CFLAGS -CC -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CXX -CPPFLAGS -LDFLAGS -CXXFLAGS -CXX -OTF_VERSION_LIBRARY -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_os -target_vendor -target_cpu -target -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -enable_dependency_tracking -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -enable_libtool_lock -enable_binaries -with_mpi -with_mpi_dir -with_mpi_inc_dir -with_mpi_lib_dir -with_mpi_lib -with_omp -with_vtf3 -with_vtf3_dir -with_vtf3_inc_dir -with_vtf3_lib_dir -with_vtf3_lib -with_zlib -with_zlib_dir -with_zlib_inc_dir -with_zlib_lib_dir -with_zlib_lib -enable_python_bindings -with_python_version -with_debug -with_verbose -' - ac_precious_vars='build_alias -host_alias -target_alias -CXX -CXXFLAGS -LDFLAGS -LIBS -CPPFLAGS -CCC -CC -CFLAGS -CPP -CXXCPP -MPICC -OPENMP_CXXFLAGS -PYTHON_VERSION' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures OTF 1.7catfish to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/OTF] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of OTF 1.7catfish:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-binaries build and install binaries, default: enabled - --enable-python-bindings - force generation of Python bindings - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-mpi use MPI for some OTF tools, default: yes if found by - configure - --with-mpi-dir give the path for MPI, default: /usr - --with-mpi-inc-dir give the path dir MPI-include files, default: - MPIDIR/include - --with-mpi-lib-dir give the path for MPI-libraries, default: MPIDIR/lib - --with-mpi-lib use given MPI - --with-omp use OpenMP for some OTF tools, default: yes if found - by configure - --with-vtf3 use vtf3, default: yes if found by configure - --with-vtf3-dir give the path for vtf3, default: /usr - --with-vtf3-inc-dir give the path dir vtf3-include files, default: - VTF3DIR/include - --with-vtf3-lib-dir give the path for VTF3-libraries, default: - VTF3DIR/lib - --with-vtf3-lib use given vtf3, default: -lvtf3 - --with-zlib use zlib, default: yes if found by configure - --with-zlib-dir give the path for zlib, default: /usr - --with-zlib-inc-dir give the path dir zlib-include files, default: - ZLIBDIR/include - --with-zlib-lib-dir give the path for ZLIB-libraries, default: - ZLIBDIR/lib - --with-zlib-lib use given zlib, default: -lz - --with-python-version=VERSION - force a custom python version - --with-debug additonal debug checks - --with-verbose additonal verbose output - -Some influential environment variables: - CXX C++ compiler command - CXXFLAGS C++ compiler flags - LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a - nonstandard directory <lib dir> - LIBS libraries to pass to the linker, e.g. -l<library> - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if - you have headers in a nonstandard directory <include dir> - CC C compiler command - CFLAGS C compiler flags - CPP C preprocessor - CXXCPP C++ preprocessor - MPICC MPI C compiler command - OPENMP_CXXFLAGS - C++ compiler flags to enable support for OpenMP - PYTHON_VERSION - The installed Python version to use, for example '2.3'. This - string will be appended to the Python interpreter canonical - name. - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to <andreas.knuepfer@tu-dresden.de>. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -OTF configure 1.7catfish -generated by GNU Autoconf 2.65 - -Copyright (C) 2009 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case <limits.h> declares $2. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_cpp - -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_link - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## --------------------------------------------- ## -## Report this to andreas.knuepfer@tu-dresden.de ## -## --------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $2 - (void) $2; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include <stdio.h> -#include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 <conftest.val; ac_retval=0 -else - ac_retval=1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -rm -f conftest.val - - fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_compute_int -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 OTF $as_me 1.7catfish, which was -generated by GNU Autoconf 2.65. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_aux_dir= -for ac_dir in config "$srcdir"/config; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) as_fn_error "invalid value of canonical target" "$LINENO" 5;; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - -am__api_version='1.11' - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='OTF' - VERSION='1.7catfish' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - -ac_config_headers="$ac_config_headers config.h" - - -# If Automake supports silent rules, enable them. -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; -esac -AM_BACKSLASH='\' - - -# Get library version -OTF_VERSION_LIBRARY=1:0:0 - - -# Checks for programs. -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 -$as_echo_n "checking whether the C++ compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C++ compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 -$as_echo_n "checking for C++ compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdio.h> -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C++ compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2.6b' -macro_revision='1.3017' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break - ;; - *) - test "$with_gnu_ld" != yes && break - ;; - esac - fi - done - IFS="$lt_save_ifs" -else - lt_cv_path_LD="$LD" # Let the user override the test with a path. -fi -fi - -LD="$lt_cv_path_LD" -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - lt_cv_prog_gnu_ld=yes - ;; -*) - lt_cv_prog_gnu_ld=no - ;; -esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5431: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:5434: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:5437: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line 6643 "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -_lt_caught_CXX_error=yes; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - - - - - - - - - - - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8700: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:8704: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - bgxl* | xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9039: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:9043: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9144: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:9148: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:9199: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:9203: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - bgxl[cC]* | xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo(void) {} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib<name>.so - # instead of lib<name>.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 11566 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 11662 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -archive_cmds_need_lc_CXX=no -allow_undefined_flag_CXX= -always_export_symbols_CXX=no -archive_expsym_cmds_CXX= -compiler_needs_object_CXX=no -export_dynamic_flag_spec_CXX= -hardcode_direct_CXX=no -hardcode_direct_absolute_CXX=no -hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= -hardcode_libdir_separator_CXX= -hardcode_minus_L_CXX=no -hardcode_shlibpath_var_CXX=unsupported -hardcode_automatic_CXX=no -inherit_rpath_CXX=no -module_cmds_CXX= -module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown -old_archive_cmds_CXX=$old_archive_cmds -no_undefined_flag_CXX= -whole_archive_flag_spec_CXX= -enable_shared_with_static_runtimes_CXX=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -objext_CXX=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - - ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - compiler_CXX=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break - ;; - *) - test "$with_gnu_ld" != yes && break - ;; - esac - fi - done - IFS="$lt_save_ifs" -else - lt_cv_path_LD="$LD" # Let the user override the test with a path. -fi -fi - -LD="$lt_cv_path_LD" -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - lt_cv_prog_gnu_ld=yes - ;; -*) - lt_cv_prog_gnu_ld=no - ;; -esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - file_list_spec_CXX='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec_CXX='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - - - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi - - else - ld_shlibs_CXX=no - fi - - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - ld_shlibs_CXX=no - ;; - - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - - gnu*) - ;; - - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - hardcode_direct_CXX=yes - hardcode_direct_absolute_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - interix[3-9]*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' - fi - fi - link_all_deplibs_CXX=yes - ;; - esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - inherit_rpath_CXX=yes - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [1-5].* | *pgcpp\ [1-5].*) - prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' - old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' - archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 will use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - bgxl* | xl*) - # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object_CXX=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - ld_shlibs_CXX=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - hardcode_direct_absolute_CXX=yes - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=echo - else - ld_shlibs_CXX=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - case $host in - osf3*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - ;; - *) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - ;; - esac - - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } - test "$ld_shlibs_CXX" = no && can_build_shared=no - - GCC_CXX="$GXX" - LD_CXX="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - # Dependencies to place before and after the object being linked: -predep_objects_CXX= -postdep_objects_CXX= -predeps_CXX= -postdeps_CXX= -compiler_lib_search_path_CXX= - -cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF - -if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling CXX test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -case $host_os in -interix[3-9]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac - - -case " $postdeps_CXX " in -*" -lc "*) archive_cmds_need_lc_CXX=no ;; -esac - compiler_lib_search_dirs_CXX= -if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lt_prog_compiler_wl_CXX= -lt_prog_compiler_pic_CXX= -lt_prog_compiler_static_CXX= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } - - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic_CXX='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= - ;; - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac - else - case $host_os in - aix[4-9]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - bgxlc* | bgxlC* | xlc* | xlC*) - # IBM XL 8.0 on PPC - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-qpic' - lt_prog_compiler_static_CXX='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic_CXX='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_prog_compiler_pic_CXX" >&6; } - - - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13618: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:13622: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works_CXX=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac -else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no -fi - -fi - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works_CXX=yes - fi - else - lt_cv_prog_compiler_static_works_CXX=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13717: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:13721: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o_CXX=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13769: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:13773: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 -$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix[4-9]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 -$as_echo "$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no - -with_gnu_ld_CXX=$with_gnu_ld - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_CXX" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 -$as_echo "$archive_cmds_need_lc_CXX" >&6; } - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib<name>.so - # instead of lib<name>.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action_CXX= -if test -n "$hardcode_libdir_flag_spec_CXX" || - test -n "$runpath_var_CXX" || - test "X$hardcode_automatic_CXX" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct_CXX" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_CXX=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 -$as_echo "$hardcode_action_CXX" >&6; } - -if test "$hardcode_action_CXX" = relink || - test "$inherit_rpath_CXX" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - -# Own stuff - -# Add -D_GNU_SOURCE to CPPFLAGS, if necessary -case "$host_os" in - *-gnu*) - CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - ;; -esac - -# Do we want to build and install binaries? -# Check whether --enable-binaries was given. -if test "${enable_binaries+set}" = set; then : - enableval=$enable_binaries; enable_binaries="$enableval" -else - enable_binaries="yes" -fi - - if test x"$enable_binaries" = "xyes"; then - AMBUILDBINARIES_TRUE= - AMBUILDBINARIES_FALSE='#' -else - AMBUILDBINARIES_TRUE='#' - AMBUILDBINARIES_FALSE= -fi - - -# Checks for MPI. - - mpi_error="no" - check_mpi="yes" - force_mpi="no" - have_mpi="no" - - -# Check whether --with-mpi was given. -if test "${with_mpi+set}" = set; then : - withval=$with_mpi; if test "$withval" = "yes"; then force_mpi="yes"; else check_mpi="no"; fi -fi - - - -# Check whether --with-mpi-dir was given. -if test "${with_mpi_dir+set}" = set; then : - withval=$with_mpi_dir; mpi_dir="$withval/" -fi - - - -# Check whether --with-mpi-inc-dir was given. -if test "${with_mpi_inc_dir+set}" = set; then : - withval=$with_mpi_inc_dir; mpi_inc_dir="$withval/" -else - if test x"$mpi_dir" != x; then mpi_inc_dir="$mpi_dir"include/; fi -fi - - - -# Check whether --with-mpi-lib-dir was given. -if test "${with_mpi_lib_dir+set}" = set; then : - withval=$with_mpi_lib_dir; mpi_lib_dir="$withval/" -else - if test x"$mpi_dir" != x; then mpi_lib_dir="$mpi_dir"lib/; fi -fi - - - -# Check whether --with-mpi-lib was given. -if test "${with_mpi_lib+set}" = set; then : - withval=$with_mpi_lib; mpi_lib="$withval" -fi - - - if test "$check_mpi" = "yes"; then - sav_CPPFLAGS=$CPPFLAGS - if test x"$mpi_inc_dir" != x; then : - CPPFLAGS="$CPPFLAGS -I$mpi_inc_dir" -fi - - sav_LDFLAGS=$LDFLAGS - if test x"$mpi_lib_dir" != x; then : - LDFLAGS="$LDFLAGS -L$mpi_lib_dir" -fi - - if test x"$mpi_lib" != x; then : - MPILIBS="$mpi_lib" -fi - - - - - - - for ac_prog in mpicc hcc mpxlc_r mpxlc mpcc cmpicc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MPICC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MPICC"; then - ac_cv_prog_MPICC="$MPICC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_MPICC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MPICC=$ac_cv_prog_MPICC -if test -n "$MPICC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC" >&5 -$as_echo "$MPICC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$MPICC" && break -done -test -n "$MPICC" || MPICC="$CC" - - ax_mpi_save_CC="$CC" - CC="$MPICC" - - - -if test x = x"$MPILIBS"; then - ac_fn_c_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init" -if test "x$ac_cv_func_MPI_Init" = x""yes; then : - MPILIBS=" " -fi - -fi - -if test x = x"$MPILIBS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 -$as_echo_n "checking for MPI_Init in -lmpi... " >&6; } -if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpi $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPI_Init (); -int -main () -{ -return MPI_Init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mpi_MPI_Init=yes -else - ac_cv_lib_mpi_MPI_Init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5 -$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then : - MPILIBS="-lmpi" -fi - -fi -if test x = x"$MPILIBS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 -$as_echo_n "checking for MPI_Init in -lmpich... " >&6; } -if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmpich $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char MPI_Init (); -int -main () -{ -return MPI_Init (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_mpich_MPI_Init=yes -else - ac_cv_lib_mpich_MPI_Init=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5 -$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then : - MPILIBS="-lmpich" -fi - -fi - -if test x != x"$MPILIBS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5 -$as_echo_n "checking for mpi.h... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <mpi.h> -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - MPILIBS="" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -CC="$ax_mpi_save_CC" - - - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x = x"$MPILIBS"; then - - mpi_error="yes" - - : -else - - mpi_lib=$MPILIBS - have_mpi="yes" - - : -fi - - - CPPFLAGS=$sav_CPPFLAGS - LDFLAGS=$sav_LDFLAGS - fi - - MPI_LIB_DIR=$mpi_lib_dir - MPI_LIB_LINE=$mpi_lib - if test x"$mpi_lib_dir" != x; then - MPI_LIB_LINE="-L$mpi_lib_dir $MPI_LIB_LINE" - fi - - MPI_INCLUDE_DIR=$mpi_inc_dir - MPI_INCLUDE_LINE= - if test x"$mpi_inc_dir" != x; then - MPI_INCLUDE_LINE="-I$mpi_inc_dir" - fi - - - - - - -if test x"$force_mpi" = "xyes" -a x"$mpi_error" = "xyes"; then exit 1; fi - if test x"$have_mpi" = xyes; then - AMHAVEMPI_TRUE= - AMHAVEMPI_FALSE='#' -else - AMHAVEMPI_TRUE='#' - AMHAVEMPI_FALSE= -fi - - -# Checks for OpenMP. - - omp_error="no" - check_omp="yes" - force_omp="no" - have_omp="no" - - - - -# Check whether --with-omp was given. -if test "${with_omp+set}" = set; then : - withval=$with_omp; if test "$withval" = "yes"; then force_omp="yes"; else check_omp="no"; fi -fi - - - if test "$check_omp" = "yes"; then : - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C++ compiler" >&5 -$as_echo_n "checking for OpenMP flag of C++ compiler... " >&6; } -if test "${ax_cv_cxx_openmp+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - saveCXXFLAGS=$CXXFLAGS -ax_cv_cxx_openmp=unknown -# Flags to try: -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI), -# -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX), -# -Popenmp (NECSX), none -ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp -Popenmp none" -if test "x$OPENMP_CXXFLAGS" != x; then - ax_openmp_flags="$OPENMP_CXXFLAGS $ax_openmp_flags" -fi -for ax_openmp_flag in $ax_openmp_flags; do - case $ax_openmp_flag in - none) CXXFLAGS=$saveCXX ;; - *) CXXFLAGS="$saveCXXFLAGS $ax_openmp_flag" ;; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - -#ifndef _OPENMP -# error "_OPENMP not defined" -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv_cxx_openmp=$ax_openmp_flag; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -CXXFLAGS=$saveCXXFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_openmp" >&5 -$as_echo "$ax_cv_cxx_openmp" >&6; } -if test "x$ax_cv_cxx_openmp" = "xunknown"; then - omp_error="yes" -else - if test "x$ax_cv_cxx_openmp" != "xnone"; then - OPENMP_CXXFLAGS=$ax_cv_cxx_openmp - fi - have_omp="yes" -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi - -if test x"$force_omp" = "xyes" -a x"$omp_error" = "xyes"; then exit 1; fi - if test x"$have_omp" = xyes; then - AMHAVEOMP_TRUE= - AMHAVEOMP_FALSE='#' -else - AMHAVEOMP_TRUE='#' - AMHAVEOMP_FALSE= -fi - - -# Checks for VTF3. - - vtf3_error="no" - check_vtf3="yes" - force_vtf3="no" - have_vtf3="no" - - - - -# Check whether --with-vtf3 was given. -if test "${with_vtf3+set}" = set; then : - withval=$with_vtf3; if test "$withval" = "yes"; then force_vtf3="yes"; else check_vtf3="no"; fi -fi - - - -# Check whether --with-vtf3-dir was given. -if test "${with_vtf3_dir+set}" = set; then : - withval=$with_vtf3_dir; vtf3_dir="$withval/" -fi - - - -# Check whether --with-vtf3-inc-dir was given. -if test "${with_vtf3_inc_dir+set}" = set; then : - withval=$with_vtf3_inc_dir; vtf3_inc_dir="$withval/" -else - if test x"$vtf3_dir" != x; then vtf3_inc_dir="$vtf3_dir"include/; fi -fi - - - -# Check whether --with-vtf3-lib-dir was given. -if test "${with_vtf3_lib_dir+set}" = set; then : - withval=$with_vtf3_lib_dir; vtf3_lib_dir="$withval/" -else - if test x"$vtf3_dir" != x; then vtf3_lib_dir="$vtf3_dir"lib/; fi -fi - - - -# Check whether --with-vtf3-lib was given. -if test "${with_vtf3_lib+set}" = set; then : - withval=$with_vtf3_lib; vtf3_lib="$withval" -fi - - - if test "$check_vtf3" = "yes"; then - sav_CPPFLAGS=$CPPFLAGS - if test x"$vtf3_inc_dir" != x; then - CPPFLAGS="$CPPFLAGS -I$vtf3_inc_dir" - fi - ac_fn_c_check_header_mongrel "$LINENO" "vtf3.h" "ac_cv_header_vtf3_h" "$ac_includes_default" -if test "x$ac_cv_header_vtf3_h" = x""yes; then : - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: error: no vtf3.h found; check path for VTF3 package first..." >&5 -$as_echo "$as_me: error: no vtf3.h found; check path for VTF3 package first..." >&6;} - vtf3_error="yes" - -fi - - - CPPFLAGS=$sav_CPPFLAGS - - if test x"$vtf3_lib" = x -a "$vtf3_error" = "no"; then - sav_LIBS=$LIBS - cl="-lvtf3" - if test x"$vtf3_lib_dir" != x; then - cl="-L$vtf3_lib_dir $cl" - fi - LIBS="$LIBS $cl" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linking with -lvtf3 works" >&5 -$as_echo_n "checking whether linking with -lvtf3 works... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; vtf3_lib=-lvtf3 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$sav_LIBS - fi - - if test x"$vtf3_lib" = x -a "$vtf3_error" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: no libvtf3 found; check path for VTF3 package first..." >&5 -$as_echo "$as_me: error: no libvtf3 found; check path for VTF3 package first..." >&6;} - vtf3_error="yes" - fi - - if test $vtf3_error = "no"; then - $as_echo "#define HAVE_VTF3 1" >>confdefs.h - - have_vtf3="yes" - fi - fi - - VTF3_LIB_DIR=$vtf3_lib_dir - VTF3_LIB_LINE=$vtf3_lib - if test x"$vtf3_lib_dir" != x; then - VTF3_LIB_LINE="-L$vtf3_lib_dir $VTF3_LIB_LINE" - fi - - VTF3_INCLUDE_DIR=$vtf3_inc_dir - VTF3_INCLUDE_LINE= - if test x"$vtf3_inc_dir" != x; then - VTF3_INCLUDE_LINE="-I$vtf3_inc_dir" - fi - - - - - - -if test x"$force_vtf3" = "xyes" -a x"$vtf3_error" = "xyes"; then exit 1; fi - if test x"$have_vtf3" = xyes; then - AMHAVEVTF3_TRUE= - AMHAVEVTF3_FALSE='#' -else - AMHAVEVTF3_TRUE='#' - AMHAVEVTF3_FALSE= -fi - - -# Checks for zlib compression. - - zlib_error="no" - check_zlib="yes" - force_zlib="no" - have_zlib="no" - - - - -# Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then : - withval=$with_zlib; if test "$withval" = "yes"; then force_zlib="yes"; else check_zlib="no"; fi -fi - - - -# Check whether --with-zlib-dir was given. -if test "${with_zlib_dir+set}" = set; then : - withval=$with_zlib_dir; zlib_dir="$withval/" -fi - - - -# Check whether --with-zlib-inc-dir was given. -if test "${with_zlib_inc_dir+set}" = set; then : - withval=$with_zlib_inc_dir; zlib_inc_dir="$withval/" -else - if test x"$zlib_dir" != x; then zlib_inc_dir="$zlib_dir"include/; fi -fi - - - -# Check whether --with-zlib-lib-dir was given. -if test "${with_zlib_lib_dir+set}" = set; then : - withval=$with_zlib_lib_dir; zlib_lib_dir="$withval/" -else - if test x"$zlib_dir" != x; then zlib_lib_dir="$zlib_dir"lib/; fi -fi - - - -# Check whether --with-zlib-lib was given. -if test "${with_zlib_lib+set}" = set; then : - withval=$with_zlib_lib; zlib_lib="$withval" -fi - - - if test "$check_zlib" = "yes"; then - sav_CPPFLAGS=$CPPFLAGS - if test x"$zlib_inc_dir" != x; then - CPPFLAGS="$CPPFLAGS -I$zlib_inc_dir" - fi - ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" -if test "x$ac_cv_header_zlib_h" = x""yes; then : - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: error: no zlib.h found; check path for ZLIB package first..." >&5 -$as_echo "$as_me: error: no zlib.h found; check path for ZLIB package first..." >&6;} - zlib_error="yes" - -fi - - - CPPFLAGS=$sav_CPPFLAGS - - if test x"$zlib_lib" = x -a "$zlib_error" = "no"; then - sav_LIBS=$LIBS - cl="-lz" - if test x"$zlib_lib_dir" != x; then - cl="-L$zlib_lib_dir $cl" - fi - LIBS="$LIBS $cl" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linking with -lz works" >&5 -$as_echo_n "checking whether linking with -lz works... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; zlib_lib=-lz -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$sav_LIBS - fi - - if test x"$zlib_lib" = x -a "$zlib_error" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: no libz found; check path for ZLIB package first..." >&5 -$as_echo "$as_me: error: no libz found; check path for ZLIB package first..." >&6;} - zlib_error="yes" - fi - - if test $zlib_error = "no"; then - $as_echo "#define HAVE_ZLIB 1" >>confdefs.h - - have_zlib="yes" - fi - fi - - ZLIB_LIB_DIR=$zlib_lib_dir - ZLIB_LIB_LINE=$zlib_lib - if test x"$zlib_lib_dir" != x; then - ZLIB_LIB_LINE="-L$zlib_lib_dir $ZLIB_LIB_LINE" - fi - - ZLIB_INCLUDE_DIR=$zlib_inc_dir - ZLIB_INCLUDE_LINE= - if test x"$zlib_inc_dir" != x; then - ZLIB_INCLUDE_LINE="-I$zlib_inc_dir" - fi - - - - - - -if test x"$force_zlib" = "xyes" -a x"$zlib_error" = "xyes"; then exit 1; fi - if test x"$have_zlib" = xyes; then - AMHAVEZLIB_TRUE= - AMHAVEZLIB_FALSE='#' -else - AMHAVEZLIB_TRUE='#' - AMHAVEZLIB_FALSE= -fi - - -# Checks for math library. - - LIBS="$LIBS -lm" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linking with -lm works" >&5 -$as_echo_n "checking whether linking with -lm works... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; math_lib=-lm -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$sav_LIBS - - if test x"$math_lib" != x; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need to link -lm to get math functions" >&5 -$as_echo_n "checking whether we need to link -lm to get math functions... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <math.h> -int -main () -{ - - volatile double c, x = 47.11; - c = ceil(x); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; }; MATHLIB=$math_lib -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi - - - - -# Checks for swig and python-dev. - - - # - #enable python bindings - # - # Check whether --enable-python-bindings was given. -if test "${enable_python_bindings+set}" = set; then : - enableval=$enable_python_bindings; enable_python_bindings="yes" -else - enable_python_bindings="" -fi - - - - # - #with python version - # - -# Check whether --with-python-version was given. -if test "${with_python_version+set}" = set; then : - withval=$with_python_version; PYTHON_VERSION=$withval -fi - - - - # - #only check if the user did --enable-python-bindings - # - if test x"$enable_python_bindings" = xyes; then - - # - #test for swig >= 1.3 - # - - # Extract the first word of "swig", so it can be a program name with args. -set dummy swig; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SWIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $SWIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -SWIG=$ac_cv_path_SWIG -if test -n "$SWIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 -$as_echo "$SWIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test -z "$SWIG" ; then - - as_fn_error "Cannot find 'swig' program." "$LINENO" 5 - - elif test -n "1.3" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for swig version" >&5 -$as_echo_n "checking for swig version... " >&6; } - swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5 -$as_echo "$swig_version" >&6; } - if test -n "$swig_version" ; then - # Calculate the required version number components - required=1.3 - required_major=`echo $required | sed 's/[^0-9].*//'` - if test -z "$required_major" ; then - required_major=0 - fi - required=`echo $required | sed 's/[0-9]*[^0-9]//'` - required_minor=`echo $required | sed 's/[^0-9].*//'` - if test -z "$required_minor" ; then - required_minor=0 - fi - required=`echo $required | sed 's/[0-9]*[^0-9]//'` - required_patch=`echo $required | sed 's/[^0-9].*//'` - if test -z "$required_patch" ; then - required_patch=0 - fi - # Calculate the available version number components - available=$swig_version - available_major=`echo $available | sed 's/[^0-9].*//'` - if test -z "$available_major" ; then - available_major=0 - fi - available=`echo $available | sed 's/[0-9]*[^0-9]//'` - available_minor=`echo $available | sed 's/[^0-9].*//'` - if test -z "$available_minor" ; then - available_minor=0 - fi - available=`echo $available | sed 's/[0-9]*[^0-9]//'` - available_patch=`echo $available | sed 's/[^0-9].*//'` - if test -z "$available_patch" ; then - available_patch=0 - fi - if test $available_major -ne $required_major \ - -o $available_minor -ne $required_minor \ - -o $available_patch -lt $required_patch ; then - as_fn_error "swig version >= 1.3 is required. You have $swig_version." "$LINENO" 5 - else - swigexists=yes - fi - else - as_fn_error "Cannot determine swig version" "$LINENO" 5 - fi - fi - - - - # - #test for python-dev - # - - - # - # Allow the use of a (user set) custom python version - # - - - # Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args. -set dummy python$PYTHON_VERSION; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PYTHON+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PYTHON in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PYTHON=$ac_cv_path_PYTHON -if test -n "$PYTHON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -$as_echo "$PYTHON" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test -z "$PYTHON"; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find python$PYTHON_VERSION in your system path" >&5 -$as_echo "$as_me: WARNING: Cannot find python$PYTHON_VERSION in your system path" >&2;} - PYTHON_VERSION="" - - else - - - # - # Check for Python include path - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python include path" >&5 -$as_echo_n "checking for python include path... " >&6; } - if test -z "$PYTHON_CPPFLAGS"; then - python_path=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc();" 2> /dev/null` - if test -n "${python_path}"; then - python_path="-I$python_path" - fi - PYTHON_CPPFLAGS=$python_path - fi - if test -n "$PYTHON_CPPFLAGS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5 -$as_echo "$PYTHON_CPPFLAGS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - - - # - # Check for Python library path - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python library path" >&5 -$as_echo_n "checking for python library path... " >&6; } - if test -z "$PYTHON_LDFLAGS"; then - # (makes two attempts to ensure we've got a version number - # from the interpreter) - py_version=`$PYTHON -c "from distutils.sysconfig import *; \ - from string import join; \ - print join(get_config_vars('VERSION'))" 2> /dev/null` - if test "$py_version" = "None" -o -z "$py_version"; then - if test -n "$PYTHON_VERSION"; then - py_version=$PYTHON_VERSION - else - py_version=`$PYTHON -c "import sys; \ - print sys.version[:3]"` - fi - fi - - PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \ - from string import join; \ - print '-L' + get_python_lib(0,1), \ - '-lpython';" 2> /dev/null`$py_version - fi - if test ! "$PYTHON_LDFLAGS" = "$py_version"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5 -$as_echo "$PYTHON_LDFLAGS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - - - # - # Check for site packages - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python site-packages path" >&5 -$as_echo_n "checking for python site-packages path... " >&6; } - if test -z "$PYTHON_SITE_PKG"; then - PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ - print distutils.sysconfig.get_python_lib(0,0);" 2> /dev/null` - fi - if test -n "$PYTHON_SITE_PKG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5 -$as_echo "$PYTHON_SITE_PKG" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - - - # - # libraries which must be linked in when embedding - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5 -$as_echo_n "checking python extra libraries... " >&6; } - if test -z "$PYTHON_EXTRA_LIBS"; then - PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ - conf = distutils.sysconfig.get_config_var; \ - print conf('LOCALMODLIBS'), conf('LIBS')" 2> /dev/null` - fi - if test -n "$PYTHON_EXTRA_LIBS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 -$as_echo "$PYTHON_EXTRA_LIBS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - - - # - # linking flags needed when embedding - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5 -$as_echo_n "checking python extra linking flags... " >&6; } - if test -z "$PYTHON_EXTRA_LDFLAGS"; then - PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ - conf = distutils.sysconfig.get_config_var; \ - print conf('LINKFORSHARED')" 2> /dev/null` - fi - if test -n "$PYTHON_EXTRA_LDFLAGS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5 -$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - - - # - # final check to see if everything compiles alright - # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5 -$as_echo_n "checking consistency of all components of python development environment... " >&6; } - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # save current global flags - sav_LDFLAGS=$LDFLAGS - sav_CPPFLAGS=$CPPFLAGS - LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS" - CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include <Python.h> - -int -main () -{ - - Py_Initialize(); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - pythonexists=yes -else - pythonexists=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5 -$as_echo "$pythonexists" >&6; } - - if test ! "$pythonexists" = "yes"; then - as_fn_error "Cannot find python development environment. You probably have to install the development version of the python package." "$LINENO" 5 - PYTHON_VERSION="" - fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # turn back to default flags - LDFLAGS=$sav_LDFLAGS - CPPFLAGS=$sav_CPPFLAGS - - - #get the paths where to install the package - pkgpythondir='${prefix}'/lib/python${py_version}/site-packages/otf - - - pkgpyexecdir='${exec_prefix}'/lib/python${py_version}/site-packages/otf - - - fi - - - - test "x" != "xno" || swig_shadow=" -noproxy" - - # - #set the swig options - # - SWIG_PYTHON_OPT=-python - - - # - #set the python compiler flags - # - SWIG_PYTHON_CPPFLAGS=$PYTHON_CPPFLAGS - - - fi - - - if test "$pythonexists" = yes -a "$swigexists" = yes ; then - AMHAVEPYTHONSWIG_TRUE= - AMHAVEPYTHONSWIG_FALSE='#' -else - AMHAVEPYTHONSWIG_TRUE='#' - AMHAVEPYTHONSWIG_FALSE= -fi - - - - - - - -# Check whether --with-debug was given. -if test "${with_debug+set}" = set; then : - withval=$with_debug; debug=$withval -else - debug="" -fi - - - if test "$debug" = yes; then - $as_echo "#define OTF_DEBUG 1" >>confdefs.h - - fi - - - - - -# Check whether --with-verbose was given. -if test "${with_verbose+set}" = set; then : - withval=$with_verbose; verbose=$withval -else - verbose="" -fi - - - if test "$verbose" = yes; then - $as_echo "#define OTF_VERBOSE 1" >>confdefs.h - - fi - - - -# Checks for header files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -for ac_header in fcntl.h stddef.h stdlib.h string.h sys/param.h sys/time.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = x""yes; then : - have_stdint_h=1 -else - have_stdint_h=0 -fi - - -ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" -if test "x$ac_cv_header_inttypes_h" = x""yes; then : - have_inttypes_h=1 -else - have_inttypes_h=0 -fi - - - - - -# Checks for library functions. -ac_fn_c_check_decl "$LINENO" "va_copy" "ac_cv_have_decl_va_copy" "#include <stdarg.h> -" -if test "x$ac_cv_have_decl_va_copy" = x""yes; then : - -$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h - -fi - -ac_fn_c_check_decl "$LINENO" "__va_copy" "ac_cv_have_decl___va_copy" "#include <stdarg.h> -" -if test "x$ac_cv_have_decl___va_copy" = x""yes; then : - -$as_echo "#define HAVE_UNDERSCORE_VA_COPY 1" >>confdefs.h - -fi - -for ac_func in asprintf snprintf vasprintf vsnprintf strdup gettimeofday -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_source+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> /* for off_t */ - #include <stdio.h> -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_largefile_source=no; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGEFILE_SOURCE 1 -#include <sys/types.h> /* for off_t */ - #include <stdio.h> -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_sys_largefile_source=1; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_cv_sys_largefile_source=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 -$as_echo "$ac_cv_sys_largefile_source" >&6; } -case $ac_cv_sys_largefile_source in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source -_ACEOF -;; -esac -rm -rf conftest* - -# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug -# in glibc 2.1.3, but that breaks too many other things. -# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -if test $ac_cv_sys_largefile_source != unknown; then - -$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h - -fi - -#AC_FUNC_MALLOC -#AC_FUNC_REALLOC -#AC_FUNC_STAT - -# Checks for typedefs, structures, and compiler characteristics. -# AC_C_CONST ### do not use this if you want to do C++ programs because it might define 'const' -# to an empty string which produces a total mess later on!!! - -ac_fn_c_check_decl "$LINENO" "O_NOATIME" "ac_cv_have_decl_O_NOATIME" "#include <fcntl.h> -" -if test "x$ac_cv_have_decl_O_NOATIME" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_O_NOATIME $ac_have_decl -_ACEOF - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - - -# Checks for datatype sizes. -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (long) -See \`config.log' for more details." "$LINENO" 5; }; } - else - ac_cv_sizeof_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -$as_echo "$ac_cv_sizeof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - -sizeof_long=$ac_cv_sizeof_long - - -ac_config_files="$ac_config_files Makefile otflib/Makefile otflib/OTF_inttypes_unix.h otflib_py/Makefile tools/Makefile tools/otfaux/Makefile tools/otfcompress/Makefile tools/otfconfig/Makefile tools/otfdump/Makefile tools/otfinfo/Makefile tools/otfmerge/Makefile tools/otfmerge-mpi/Makefile tools/otfprofile/Makefile tools/otfshrink/Makefile tools/otf2vtf/Makefile tools/vtf2otf/Makefile docu/Makefile" - - -## workaround for stupid warning caused by newer autoconf versions - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMBUILDBINARIES_TRUE}" && test -z "${AMBUILDBINARIES_FALSE}"; then - as_fn_error "conditional \"AMBUILDBINARIES\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMHAVEMPI_TRUE}" && test -z "${AMHAVEMPI_FALSE}"; then - as_fn_error "conditional \"AMHAVEMPI\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMHAVEOMP_TRUE}" && test -z "${AMHAVEOMP_FALSE}"; then - as_fn_error "conditional \"AMHAVEOMP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMHAVEVTF3_TRUE}" && test -z "${AMHAVEVTF3_FALSE}"; then - as_fn_error "conditional \"AMHAVEVTF3\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMHAVEZLIB_TRUE}" && test -z "${AMHAVEZLIB_FALSE}"; then - as_fn_error "conditional \"AMHAVEZLIB\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMHAVEPYTHONSWIG_TRUE}" && test -z "${AMHAVEPYTHONSWIG_FALSE}"; then - as_fn_error "conditional \"AMHAVEPYTHONSWIG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by OTF $as_me 1.7catfish, which was -generated by GNU Autoconf 2.65. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to <andreas.knuepfer@tu-dresden.de>." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -OTF config.status 1.7catfish -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2009 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' -predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' -postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -AR \ -AR_FLAGS \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ -lt_prog_compiler_pic \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -fix_srcfile_path \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -finish_eval \ -old_striplib \ -striplib \ -compiler_lib_search_dirs \ -predep_objects \ -postdep_objects \ -predeps \ -postdeps \ -compiler_lib_search_path \ -LD_CXX \ -compiler_CXX \ -lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_pic_CXX \ -lt_prog_compiler_static_CXX \ -lt_cv_prog_compiler_c_o_CXX \ -export_dynamic_flag_spec_CXX \ -whole_archive_flag_spec_CXX \ -compiler_needs_object_CXX \ -with_gnu_ld_CXX \ -allow_undefined_flag_CXX \ -no_undefined_flag_CXX \ -hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_flag_spec_ld_CXX \ -hardcode_libdir_separator_CXX \ -fix_srcfile_path_CXX \ -exclude_expsyms_CXX \ -include_expsyms_CXX \ -file_list_spec_CXX \ -compiler_lib_search_dirs_CXX \ -predep_objects_CXX \ -postdep_objects_CXX \ -predeps_CXX \ -postdeps_CXX \ -compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec \ -old_archive_cmds_CXX \ -old_archive_from_new_cmds_CXX \ -old_archive_from_expsyms_cmds_CXX \ -archive_cmds_CXX \ -archive_expsym_cmds_CXX \ -module_cmds_CXX \ -module_expsym_cmds_CXX \ -export_symbols_cmds_CXX \ -prelink_cmds_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "otflib/Makefile") CONFIG_FILES="$CONFIG_FILES otflib/Makefile" ;; - "otflib/OTF_inttypes_unix.h") CONFIG_FILES="$CONFIG_FILES otflib/OTF_inttypes_unix.h" ;; - "otflib_py/Makefile") CONFIG_FILES="$CONFIG_FILES otflib_py/Makefile" ;; - "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; - "tools/otfaux/Makefile") CONFIG_FILES="$CONFIG_FILES tools/otfaux/Makefile" ;; - "tools/otfcompress/Makefile") CONFIG_FILES="$CONFIG_FILES tools/otfcompress/Makefile" ;; - "tools/otfconfig/Makefile") CONFIG_FILES="$CONFIG_FILES tools/otfconfig/Makefile" ;; - "tools/otfdump/Makefile") CONFIG_FILES="$CONFIG_FILES tools/otfdump/Makefile" ;; - "tools/otfinfo/Makefile") CONFIG_FILES="$CONFIG_FILES tools/otfinfo/Makefile" ;; - "tools/otfmerge/Makefile") CONFIG_FILES="$CONFIG_FILES tools/otfmerge/Makefile" ;; - "tools/otfmerge-mpi/Makefile") CONFIG_FILES="$CONFIG_FILES tools/otfmerge-mpi/Makefile" ;; - "tools/otfprofile/Makefile") CONFIG_FILES="$CONFIG_FILES tools/otfprofile/Makefile" ;; - "tools/otfshrink/Makefile") CONFIG_FILES="$CONFIG_FILES tools/otfshrink/Makefile" ;; - "tools/otf2vtf/Makefile") CONFIG_FILES="$CONFIG_FILES tools/otf2vtf/Makefile" ;; - "tools/vtf2otf/Makefile") CONFIG_FILES="$CONFIG_FILES tools/vtf2otf/Makefile" ;; - "docu/Makefile") CONFIG_FILES="$CONFIG_FILES docu/Makefile" ;; - - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' <conf$$subs.awk | sed ' -/^[^""]/{ - N - s/\n// -} -' >>$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' <confdefs.h | sed ' -s/'"$ac_delim"'/"\\\ -"/g' >>$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="CXX " - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects -postdep_objects=$lt_postdep_objects -predeps=$lt_predeps -postdeps=$lt_postdeps - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac - - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - - cat <<_LT_EOF >> "$ofile" - -# ### BEGIN LIBTOOL TAG CONFIG: CXX - -# The linker used to build libraries. -LD=$lt_LD_CXX - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds_CXX - -# A language specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU compiler? -with_gcc=$GCC_CXX - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic_CXX - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static_CXX - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_CXX - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object_CXX - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds_CXX -archive_expsym_cmds=$lt_archive_expsym_cmds_CXX - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds_CXX -module_expsym_cmds=$lt_module_expsym_cmds_CXX - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld_CXX - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag_CXX - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag_CXX - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct_CXX - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute_CXX - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic_CXX - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath_CXX - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX - -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds_CXX - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec_CXX - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX - -# The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX - -# Dependencies to place before and after the objects being linked to -# create a shared library. -predep_objects=$lt_predep_objects_CXX -postdep_objects=$lt_postdep_objects_CXX -predeps=$lt_predeps_CXX -postdeps=$lt_postdeps_CXX - -# The library search path used internally by the compiler when linking -# a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - -# ### END LIBTOOL TAG CONFIG: CXX -_LT_EOF - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/externals/otf/configure.in b/externals/otf/configure.in deleted file mode 100644 index b6656e67391c2c5e0931fb3443e362484ecdb740..0000000000000000000000000000000000000000 --- a/externals/otf/configure.in +++ /dev/null @@ -1,129 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.57) -AC_INIT([OTF], - [m4_normalize(esyscmd([config/otf_get_version.sh VERSION --full]))], - [andreas.knuepfer@tu-dresden.de], [OTF]) -AC_CONFIG_AUX_DIR(config) -AC_CONFIG_MACRO_DIR(config/m4) -AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE -AM_CONFIG_HEADER(config.h) - -# If Automake supports silent rules, enable them. -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) - -# Get library version -OTF_VERSION_LIBRARY=m4_normalize(esyscmd([config/otf_get_version.sh VERSION --library])) -AC_SUBST([OTF_VERSION_LIBRARY]) - -# Checks for programs. -AC_PROG_CXX -AC_PROG_CC -AC_PROG_LIBTOOL - -# Own stuff - -# Add -D_GNU_SOURCE to CPPFLAGS, if necessary -case "$host_os" in - *-gnu*) - CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - ;; -esac - -# Do we want to build and install binaries? -AC_ARG_ENABLE(binaries, - AC_HELP_STRING([--enable-binaries], - [build and install binaries, default: enabled]), - [enable_binaries="$enableval"], [enable_binaries="yes"]) -AM_CONDITIONAL(AMBUILDBINARIES, test x"$enable_binaries" = "xyes") - -# Checks for MPI. -CHECK_MPI -if test x"$force_mpi" = "xyes" -a x"$mpi_error" = "xyes"; then exit 1; fi -AM_CONDITIONAL(AMHAVEMPI, test x"$have_mpi" = xyes) - -# Checks for OpenMP. -CHECK_OMP -if test x"$force_omp" = "xyes" -a x"$omp_error" = "xyes"; then exit 1; fi -AM_CONDITIONAL(AMHAVEOMP, test x"$have_omp" = xyes) - -# Checks for VTF3. -CHECK_VTF3 -if test x"$force_vtf3" = "xyes" -a x"$vtf3_error" = "xyes"; then exit 1; fi -AM_CONDITIONAL(AMHAVEVTF3, test x"$have_vtf3" = xyes) - -# Checks for zlib compression. -CHECK_ZLIB -if test x"$force_zlib" = "xyes" -a x"$zlib_error" = "xyes"; then exit 1; fi -AM_CONDITIONAL(AMHAVEZLIB, test x"$have_zlib" = xyes) - -# Checks for math library. -CHECK_MATH - -# Checks for swig and python-dev. -SWIG_PYTHON -AM_CONDITIONAL(AMHAVEPYTHONSWIG, [test "$pythonexists" = yes -a "$swigexists" = yes] ) - - -WITH_DEBUG -WITH_VERBOSE - - -# Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h sys/param.h sys/time.h unistd.h]) -AC_CHECK_HEADER([stdint.h], [have_stdint_h=1], [have_stdint_h=0]) -AC_CHECK_HEADER([inttypes.h], [have_inttypes_h=1], [have_inttypes_h=0]) -AC_SUBST([have_stdint_h]) -AC_SUBST([have_inttypes_h]) - -# Checks for library functions. -AC_CHECK_DECL([va_copy], -[AC_DEFINE([HAVE_VA_COPY], [1], [Define to 1 if you have the `va_copy' function.])], -[], [#include <stdarg.h>]) -AC_CHECK_DECL([__va_copy], -[AC_DEFINE([HAVE_UNDERSCORE_VA_COPY], [1], [Define to 1 if you have the `__va_copy' function.])], -[], [#include <stdarg.h>]) -AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf strdup gettimeofday]) -AC_FUNC_FSEEKO -#AC_FUNC_MALLOC -#AC_FUNC_REALLOC -#AC_FUNC_STAT - -# Checks for typedefs, structures, and compiler characteristics. -# AC_C_CONST ### do not use this if you want to do C++ programs because it might define 'const' -# to an empty string which produces a total mess later on!!! - -AC_CHECK_DECLS([O_NOATIME], [], [], [[#include <fcntl.h>]]) -AC_TYPE_SIZE_T - -# Checks for datatype sizes. -AC_CHECK_SIZEOF(long, 8) -sizeof_long=$ac_cv_sizeof_long -AC_SUBST([sizeof_long]) - -AC_CONFIG_FILES([Makefile - otflib/Makefile - otflib/OTF_inttypes_unix.h - otflib_py/Makefile - tools/Makefile - tools/otfaux/Makefile - tools/otfcompress/Makefile - tools/otfconfig/Makefile - tools/otfdump/Makefile - tools/otfinfo/Makefile - tools/otfmerge/Makefile - tools/otfmerge-mpi/Makefile - tools/otfprofile/Makefile - tools/otfshrink/Makefile - tools/otf2vtf/Makefile - tools/vtf2otf/Makefile - docu/Makefile -]) - -## workaround for stupid warning caused by newer autoconf versions -AC_DEFUN([AC_DATAROOTDIR_CHECKED]) - -AC_OUTPUT diff --git a/externals/otf/docu/Makefile.am b/externals/otf/docu/Makefile.am deleted file mode 100644 index 9ed566b8d35f3f7be3af19636dc27d5f0af89c11..0000000000000000000000000000000000000000 --- a/externals/otf/docu/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -otfdoc_DATA = \ - $(top_srcdir)/ChangeLog \ - $(top_srcdir)/LICENSE \ - api/specification.pdf \ - tools/otftools.pdf - -otfdocdir = $(docdir) - -EXTRA_DIST = \ - $(otfdoc_DATA) \ - doxygen.conf diff --git a/externals/otf/docu/Makefile.in b/externals/otf/docu/Makefile.in deleted file mode 100644 index 177f6f7fda9097ca56304133a03b1feff7f0fc7a..0000000000000000000000000000000000000000 --- a/externals/otf/docu/Makefile.in +++ /dev/null @@ -1,473 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = docu -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(otfdocdir)" -DATA = $(otfdoc_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -otfdoc_DATA = \ - $(top_srcdir)/ChangeLog \ - $(top_srcdir)/LICENSE \ - api/specification.pdf \ - tools/otftools.pdf - -otfdocdir = $(docdir) -EXTRA_DIST = \ - $(otfdoc_DATA) \ - doxygen.conf - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docu/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign docu/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-otfdocDATA: $(otfdoc_DATA) - @$(NORMAL_INSTALL) - test -z "$(otfdocdir)" || $(MKDIR_P) "$(DESTDIR)$(otfdocdir)" - @list='$(otfdoc_DATA)'; test -n "$(otfdocdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(otfdocdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(otfdocdir)" || exit $$?; \ - done - -uninstall-otfdocDATA: - @$(NORMAL_UNINSTALL) - @list='$(otfdoc_DATA)'; test -n "$(otfdocdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(otfdocdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(otfdocdir)" && rm -f $$files -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(DATA) -installdirs: - for dir in "$(DESTDIR)$(otfdocdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-otfdocDATA - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-otfdocDATA - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-otfdocDATA \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-otfdocDATA - - -# 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/externals/otf/docu/api/specification.pdf b/externals/otf/docu/api/specification.pdf deleted file mode 100644 index 8577baebe0ef4aa044088e9d311078313691b845..0000000000000000000000000000000000000000 Binary files a/externals/otf/docu/api/specification.pdf and /dev/null differ diff --git a/externals/otf/docu/doxygen.conf b/externals/otf/docu/doxygen.conf deleted file mode 100644 index b9d7d17ca518c75e896ac6db266851855970b08d..0000000000000000000000000000000000000000 --- a/externals/otf/docu/doxygen.conf +++ /dev/null @@ -1,946 +0,0 @@ -# Doxyfile 1.2.15 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = "Open Trace Format API" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doxygen - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, -# German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, -# Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish. - -OUTPUT_LANGUAGE = English - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these class will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. - -STRIP_FROM_PATH = - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower case letters. If set to YES upper case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are adviced to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explict @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# reimplements. - -INHERIT_DOCS = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = NO - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consist of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = ../otflib/OTF_Reader.h \ - ../otflib/OTF_RStream.h \ - ../otflib/OTF_Writer.h \ - ../otflib/OTF_WStream.h \ - ../otflib/OTF_HandlerArray.h \ - ../otflib/OTF_MasterControl.h \ - ../otflib/OTF_FileManager.h \ - ../otflib/otf.h \ - ../otflib/ - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl - -FILE_PATTERNS = *.h - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command <filter> <input-file>, where <filter> -# is the value of the INPUT_FILTER tag, and <input-file> is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse. - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the Html help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, -# or Internet explorer 4.0+). Note that for large projects the tree generation -# can take a very long time. In such cases it is better to disable this feature. -# Windows users are probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = YES - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimised for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = YES - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assigments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_XML = NO - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line and do not end with a semicolon. Such function macros are typically -# used for boiler-plate code, and will confuse the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES tag can be used to specify one or more tagfiles. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superceded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yield more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermedate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO - -# The CGI_NAME tag should be the name of the CGI script that -# starts the search engine (doxysearch) with the correct parameters. -# A script with this name will be generated by doxygen. - -CGI_NAME = search.cgi - -# The CGI_URL tag should be the absolute URL to the directory where the -# cgi binaries are located. See the documentation of your http daemon for -# details. - -CGI_URL = - -# The DOC_URL tag should be the absolute URL to the directory where the -# documentation is located. If left blank the absolute path to the -# documentation, with file:// prepended to it, will be used. - -DOC_URL = - -# The DOC_ABSPATH tag should be the absolute path to the directory where the -# documentation is located. If left blank the directory on the local machine -# will be used. - -DOC_ABSPATH = - -# The BIN_ABSPATH tag must point to the directory where the doxysearch binary -# is installed. - -BIN_ABSPATH = /usr/local/bin/ - -# The EXT_DOC_PATHS tag can be used to specify one or more paths to -# documentation generated for other projects. This allows doxysearch to search -# the documentation for these projects as well. - -EXT_DOC_PATHS = diff --git a/externals/otf/docu/tools/otftools.pdf b/externals/otf/docu/tools/otftools.pdf deleted file mode 100644 index bd51f0f61ad14adaafc4e9062f82b91d8adb9e99..0000000000000000000000000000000000000000 Binary files a/externals/otf/docu/tools/otftools.pdf and /dev/null differ diff --git a/externals/otf/otf_vc08.sln b/externals/otf/otf_vc08.sln deleted file mode 100644 index 81363dba968778e971235f48294e8482c4b4d62c..0000000000000000000000000000000000000000 --- a/externals/otf/otf_vc08.sln +++ /dev/null @@ -1,66 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libotf", "otflib\libotf_vs08.vcproj", "{6B9B49C9-75CD-400D-B736-5EACA04D0A82}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "otfaux", "tools\otfaux\otfaux_vs08.vcproj", "{24587836-ED5E-49DF-A7AD-419FDC208C08}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "otfcompress", "tools\otfcompress\otfcompress_vs08.vcproj", "{B6BBC220-1492-4BEA-A299-9D062133ABAA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "otfdump", "tools\otfdump\otfdump_vs08.vcproj", "{508A823C-8EAB-4C56-9DFE-4D85B0D24491}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "otfmerge", "tools\otfmerge\otfmerge_vs08.vcproj", "{1B9223C8-DE20-4538-8214-776C6017D22B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release Static|Win32 = Release Static|Win32 - Release Static|x64 = Release Static|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6B9B49C9-75CD-400D-B736-5EACA04D0A82}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B9B49C9-75CD-400D-B736-5EACA04D0A82}.Debug|Win32.Build.0 = Debug|Win32 - {6B9B49C9-75CD-400D-B736-5EACA04D0A82}.Debug|x64.ActiveCfg = Debug|x64 - {6B9B49C9-75CD-400D-B736-5EACA04D0A82}.Debug|x64.Build.0 = Debug|x64 - {6B9B49C9-75CD-400D-B736-5EACA04D0A82}.Release Static|Win32.ActiveCfg = Release Static|Win32 - {6B9B49C9-75CD-400D-B736-5EACA04D0A82}.Release Static|Win32.Build.0 = Release Static|Win32 - {6B9B49C9-75CD-400D-B736-5EACA04D0A82}.Release Static|x64.ActiveCfg = Release Static|x64 - {6B9B49C9-75CD-400D-B736-5EACA04D0A82}.Release Static|x64.Build.0 = Release Static|x64 - {24587836-ED5E-49DF-A7AD-419FDC208C08}.Debug|Win32.ActiveCfg = Debug|Win32 - {24587836-ED5E-49DF-A7AD-419FDC208C08}.Debug|Win32.Build.0 = Debug|Win32 - {24587836-ED5E-49DF-A7AD-419FDC208C08}.Debug|x64.ActiveCfg = Debug|x64 - {24587836-ED5E-49DF-A7AD-419FDC208C08}.Debug|x64.Build.0 = Debug|x64 - {24587836-ED5E-49DF-A7AD-419FDC208C08}.Release Static|Win32.ActiveCfg = Release Static|Win32 - {24587836-ED5E-49DF-A7AD-419FDC208C08}.Release Static|Win32.Build.0 = Release Static|Win32 - {24587836-ED5E-49DF-A7AD-419FDC208C08}.Release Static|x64.ActiveCfg = Release Static|x64 - {24587836-ED5E-49DF-A7AD-419FDC208C08}.Release Static|x64.Build.0 = Release Static|x64 - {B6BBC220-1492-4BEA-A299-9D062133ABAA}.Debug|Win32.ActiveCfg = Debug|Win32 - {B6BBC220-1492-4BEA-A299-9D062133ABAA}.Debug|Win32.Build.0 = Debug|Win32 - {B6BBC220-1492-4BEA-A299-9D062133ABAA}.Debug|x64.ActiveCfg = Debug|x64 - {B6BBC220-1492-4BEA-A299-9D062133ABAA}.Debug|x64.Build.0 = Debug|x64 - {B6BBC220-1492-4BEA-A299-9D062133ABAA}.Release Static|Win32.ActiveCfg = Release Static|Win32 - {B6BBC220-1492-4BEA-A299-9D062133ABAA}.Release Static|Win32.Build.0 = Release Static|Win32 - {B6BBC220-1492-4BEA-A299-9D062133ABAA}.Release Static|x64.ActiveCfg = Release Static|x64 - {B6BBC220-1492-4BEA-A299-9D062133ABAA}.Release Static|x64.Build.0 = Release Static|x64 - {508A823C-8EAB-4C56-9DFE-4D85B0D24491}.Debug|Win32.ActiveCfg = Debug|Win32 - {508A823C-8EAB-4C56-9DFE-4D85B0D24491}.Debug|Win32.Build.0 = Debug|Win32 - {508A823C-8EAB-4C56-9DFE-4D85B0D24491}.Debug|x64.ActiveCfg = Debug|x64 - {508A823C-8EAB-4C56-9DFE-4D85B0D24491}.Debug|x64.Build.0 = Debug|x64 - {508A823C-8EAB-4C56-9DFE-4D85B0D24491}.Release Static|Win32.ActiveCfg = Release Static|Win32 - {508A823C-8EAB-4C56-9DFE-4D85B0D24491}.Release Static|Win32.Build.0 = Release Static|Win32 - {508A823C-8EAB-4C56-9DFE-4D85B0D24491}.Release Static|x64.ActiveCfg = Release Static|x64 - {508A823C-8EAB-4C56-9DFE-4D85B0D24491}.Release Static|x64.Build.0 = Release Static|x64 - {1B9223C8-DE20-4538-8214-776C6017D22B}.Debug|Win32.ActiveCfg = Debug|Win32 - {1B9223C8-DE20-4538-8214-776C6017D22B}.Debug|Win32.Build.0 = Debug|Win32 - {1B9223C8-DE20-4538-8214-776C6017D22B}.Debug|x64.ActiveCfg = Debug|x64 - {1B9223C8-DE20-4538-8214-776C6017D22B}.Debug|x64.Build.0 = Debug|x64 - {1B9223C8-DE20-4538-8214-776C6017D22B}.Release Static|Win32.ActiveCfg = Release Static|Win32 - {1B9223C8-DE20-4538-8214-776C6017D22B}.Release Static|Win32.Build.0 = Release Static|Win32 - {1B9223C8-DE20-4538-8214-776C6017D22B}.Release Static|x64.ActiveCfg = Release Static|x64 - {1B9223C8-DE20-4538-8214-776C6017D22B}.Release Static|x64.Build.0 = Release Static|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/externals/otf/otflib/Makefile.am b/externals/otf/otflib/Makefile.am deleted file mode 100644 index db23e0d8795eacddf3f0c0c8b30ac0ff82e8c774..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/Makefile.am +++ /dev/null @@ -1,63 +0,0 @@ -INCLUDES = $(ZLIB_INCLUDE_LINE) - -include_HEADERS = otf.h \ - OTF_CopyHandler.h \ - OTF_Definitions.h \ - OTF_Errno.h \ - OTF_File.h \ - OTF_FileManager.h \ - OTF_Filenames.h \ - OTF_HandlerArray.h \ - OTF_inttypes.h \ - OTF_KeyValue.h \ - OTF_MasterControl.h \ - OTF_RBuffer.h \ - OTF_RStream.h \ - OTF_Reader.h \ - OTF_Version.h \ - OTF_WBuffer.h \ - OTF_WStream.h \ - OTF_Writer.h - -nodist_include_HEADERS = OTF_inttypes_unix.h - -noinst_HEADERS = OTF_Handler.h \ - OTF_Keywords.h \ - OTF_Parse.h \ - OTF_Platform.h \ - OTF_Platform_unix.h - -lib_LTLIBRARIES = libotf.la - -libotf_la_CFLAGS = -prefer-pic -libotf_la_LDFLAGS = -version-info @OTF_VERSION_LIBRARY@ -libotf_la_LIBADD = $(ZLIB_LIB_LINE) -libotf_la_SOURCES = \ - OTF_CopyHandler.c \ - OTF_Errno.c \ - OTF_File.c \ - OTF_FileManager.c \ - OTF_Filenames.c \ - OTF_HandlerArray.c \ - OTF_KeyValue.c \ - OTF_MasterControl.c \ - OTF_Parse.c \ - OTF_Platform.c \ - OTF_RBuffer.c \ - OTF_Reader.c \ - OTF_RStream.c \ - OTF_WBuffer.c \ - OTF_Writer.c \ - OTF_WStream.c \ - OTF_inttypes.c - -EXTRA_DIST = \ - OTF_Platform_win.h \ - OTF_inttypes_win.h \ - OTF_Version.h \ - libotf_vs08.vcproj - - -.PHONY: doc -doc: - doxygen diff --git a/externals/otf/otflib/Makefile.in b/externals/otf/otflib/Makefile.in deleted file mode 100644 index 43dd6b620ca4faa6c052871b5df1eae8e57ba8d8..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/Makefile.in +++ /dev/null @@ -1,864 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = otflib -DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/OTF_inttypes_unix.h.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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 = OTF_inttypes_unix.h -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" \ - "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -libotf_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_libotf_la_OBJECTS = libotf_la-OTF_CopyHandler.lo \ - libotf_la-OTF_Errno.lo libotf_la-OTF_File.lo \ - libotf_la-OTF_FileManager.lo libotf_la-OTF_Filenames.lo \ - libotf_la-OTF_HandlerArray.lo libotf_la-OTF_KeyValue.lo \ - libotf_la-OTF_MasterControl.lo libotf_la-OTF_Parse.lo \ - libotf_la-OTF_Platform.lo libotf_la-OTF_RBuffer.lo \ - libotf_la-OTF_Reader.lo libotf_la-OTF_RStream.lo \ - libotf_la-OTF_WBuffer.lo libotf_la-OTF_Writer.lo \ - libotf_la-OTF_WStream.lo libotf_la-OTF_inttypes.lo -libotf_la_OBJECTS = $(am_libotf_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -libotf_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libotf_la_CFLAGS) \ - $(CFLAGS) $(libotf_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libotf_la_SOURCES) -DIST_SOURCES = $(libotf_la_SOURCES) -HEADERS = $(include_HEADERS) $(nodist_include_HEADERS) \ - $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = $(ZLIB_INCLUDE_LINE) -include_HEADERS = otf.h \ - OTF_CopyHandler.h \ - OTF_Definitions.h \ - OTF_Errno.h \ - OTF_File.h \ - OTF_FileManager.h \ - OTF_Filenames.h \ - OTF_HandlerArray.h \ - OTF_inttypes.h \ - OTF_KeyValue.h \ - OTF_MasterControl.h \ - OTF_RBuffer.h \ - OTF_RStream.h \ - OTF_Reader.h \ - OTF_Version.h \ - OTF_WBuffer.h \ - OTF_WStream.h \ - OTF_Writer.h - -nodist_include_HEADERS = OTF_inttypes_unix.h -noinst_HEADERS = OTF_Handler.h \ - OTF_Keywords.h \ - OTF_Parse.h \ - OTF_Platform.h \ - OTF_Platform_unix.h - -lib_LTLIBRARIES = libotf.la -libotf_la_CFLAGS = -prefer-pic -libotf_la_LDFLAGS = -version-info @OTF_VERSION_LIBRARY@ -libotf_la_LIBADD = $(ZLIB_LIB_LINE) -libotf_la_SOURCES = \ - OTF_CopyHandler.c \ - OTF_Errno.c \ - OTF_File.c \ - OTF_FileManager.c \ - OTF_Filenames.c \ - OTF_HandlerArray.c \ - OTF_KeyValue.c \ - OTF_MasterControl.c \ - OTF_Parse.c \ - OTF_Platform.c \ - OTF_RBuffer.c \ - OTF_Reader.c \ - OTF_RStream.c \ - OTF_WBuffer.c \ - OTF_Writer.c \ - OTF_WStream.c \ - OTF_inttypes.c - -EXTRA_DIST = \ - OTF_Platform_win.h \ - OTF_inttypes_win.h \ - OTF_Version.h \ - libotf_vs08.vcproj - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign otflib/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign otflib/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): -OTF_inttypes_unix.h: $(top_builddir)/config.status $(srcdir)/OTF_inttypes_unix.h.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libotf.la: $(libotf_la_OBJECTS) $(libotf_la_DEPENDENCIES) - $(AM_V_CCLD)$(libotf_la_LINK) -rpath $(libdir) $(libotf_la_OBJECTS) $(libotf_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_CopyHandler.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_Errno.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_File.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_FileManager.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_Filenames.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_HandlerArray.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_KeyValue.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_MasterControl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_Parse.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_Platform.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_RBuffer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_RStream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_Reader.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_WBuffer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_WStream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_Writer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libotf_la-OTF_inttypes.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libotf_la-OTF_CopyHandler.lo: OTF_CopyHandler.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_CopyHandler.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_CopyHandler.Tpo -c -o libotf_la-OTF_CopyHandler.lo `test -f 'OTF_CopyHandler.c' || echo '$(srcdir)/'`OTF_CopyHandler.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_CopyHandler.Tpo $(DEPDIR)/libotf_la-OTF_CopyHandler.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_CopyHandler.c' object='libotf_la-OTF_CopyHandler.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_CopyHandler.lo `test -f 'OTF_CopyHandler.c' || echo '$(srcdir)/'`OTF_CopyHandler.c - -libotf_la-OTF_Errno.lo: OTF_Errno.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_Errno.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_Errno.Tpo -c -o libotf_la-OTF_Errno.lo `test -f 'OTF_Errno.c' || echo '$(srcdir)/'`OTF_Errno.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_Errno.Tpo $(DEPDIR)/libotf_la-OTF_Errno.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_Errno.c' object='libotf_la-OTF_Errno.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_Errno.lo `test -f 'OTF_Errno.c' || echo '$(srcdir)/'`OTF_Errno.c - -libotf_la-OTF_File.lo: OTF_File.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_File.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_File.Tpo -c -o libotf_la-OTF_File.lo `test -f 'OTF_File.c' || echo '$(srcdir)/'`OTF_File.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_File.Tpo $(DEPDIR)/libotf_la-OTF_File.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_File.c' object='libotf_la-OTF_File.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_File.lo `test -f 'OTF_File.c' || echo '$(srcdir)/'`OTF_File.c - -libotf_la-OTF_FileManager.lo: OTF_FileManager.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_FileManager.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_FileManager.Tpo -c -o libotf_la-OTF_FileManager.lo `test -f 'OTF_FileManager.c' || echo '$(srcdir)/'`OTF_FileManager.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_FileManager.Tpo $(DEPDIR)/libotf_la-OTF_FileManager.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_FileManager.c' object='libotf_la-OTF_FileManager.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_FileManager.lo `test -f 'OTF_FileManager.c' || echo '$(srcdir)/'`OTF_FileManager.c - -libotf_la-OTF_Filenames.lo: OTF_Filenames.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_Filenames.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_Filenames.Tpo -c -o libotf_la-OTF_Filenames.lo `test -f 'OTF_Filenames.c' || echo '$(srcdir)/'`OTF_Filenames.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_Filenames.Tpo $(DEPDIR)/libotf_la-OTF_Filenames.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_Filenames.c' object='libotf_la-OTF_Filenames.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_Filenames.lo `test -f 'OTF_Filenames.c' || echo '$(srcdir)/'`OTF_Filenames.c - -libotf_la-OTF_HandlerArray.lo: OTF_HandlerArray.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_HandlerArray.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_HandlerArray.Tpo -c -o libotf_la-OTF_HandlerArray.lo `test -f 'OTF_HandlerArray.c' || echo '$(srcdir)/'`OTF_HandlerArray.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_HandlerArray.Tpo $(DEPDIR)/libotf_la-OTF_HandlerArray.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_HandlerArray.c' object='libotf_la-OTF_HandlerArray.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_HandlerArray.lo `test -f 'OTF_HandlerArray.c' || echo '$(srcdir)/'`OTF_HandlerArray.c - -libotf_la-OTF_KeyValue.lo: OTF_KeyValue.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_KeyValue.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_KeyValue.Tpo -c -o libotf_la-OTF_KeyValue.lo `test -f 'OTF_KeyValue.c' || echo '$(srcdir)/'`OTF_KeyValue.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_KeyValue.Tpo $(DEPDIR)/libotf_la-OTF_KeyValue.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_KeyValue.c' object='libotf_la-OTF_KeyValue.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_KeyValue.lo `test -f 'OTF_KeyValue.c' || echo '$(srcdir)/'`OTF_KeyValue.c - -libotf_la-OTF_MasterControl.lo: OTF_MasterControl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_MasterControl.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_MasterControl.Tpo -c -o libotf_la-OTF_MasterControl.lo `test -f 'OTF_MasterControl.c' || echo '$(srcdir)/'`OTF_MasterControl.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_MasterControl.Tpo $(DEPDIR)/libotf_la-OTF_MasterControl.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_MasterControl.c' object='libotf_la-OTF_MasterControl.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_MasterControl.lo `test -f 'OTF_MasterControl.c' || echo '$(srcdir)/'`OTF_MasterControl.c - -libotf_la-OTF_Parse.lo: OTF_Parse.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_Parse.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_Parse.Tpo -c -o libotf_la-OTF_Parse.lo `test -f 'OTF_Parse.c' || echo '$(srcdir)/'`OTF_Parse.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_Parse.Tpo $(DEPDIR)/libotf_la-OTF_Parse.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_Parse.c' object='libotf_la-OTF_Parse.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_Parse.lo `test -f 'OTF_Parse.c' || echo '$(srcdir)/'`OTF_Parse.c - -libotf_la-OTF_Platform.lo: OTF_Platform.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_Platform.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_Platform.Tpo -c -o libotf_la-OTF_Platform.lo `test -f 'OTF_Platform.c' || echo '$(srcdir)/'`OTF_Platform.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_Platform.Tpo $(DEPDIR)/libotf_la-OTF_Platform.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_Platform.c' object='libotf_la-OTF_Platform.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_Platform.lo `test -f 'OTF_Platform.c' || echo '$(srcdir)/'`OTF_Platform.c - -libotf_la-OTF_RBuffer.lo: OTF_RBuffer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_RBuffer.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_RBuffer.Tpo -c -o libotf_la-OTF_RBuffer.lo `test -f 'OTF_RBuffer.c' || echo '$(srcdir)/'`OTF_RBuffer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_RBuffer.Tpo $(DEPDIR)/libotf_la-OTF_RBuffer.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_RBuffer.c' object='libotf_la-OTF_RBuffer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_RBuffer.lo `test -f 'OTF_RBuffer.c' || echo '$(srcdir)/'`OTF_RBuffer.c - -libotf_la-OTF_Reader.lo: OTF_Reader.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_Reader.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_Reader.Tpo -c -o libotf_la-OTF_Reader.lo `test -f 'OTF_Reader.c' || echo '$(srcdir)/'`OTF_Reader.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_Reader.Tpo $(DEPDIR)/libotf_la-OTF_Reader.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_Reader.c' object='libotf_la-OTF_Reader.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_Reader.lo `test -f 'OTF_Reader.c' || echo '$(srcdir)/'`OTF_Reader.c - -libotf_la-OTF_RStream.lo: OTF_RStream.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_RStream.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_RStream.Tpo -c -o libotf_la-OTF_RStream.lo `test -f 'OTF_RStream.c' || echo '$(srcdir)/'`OTF_RStream.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_RStream.Tpo $(DEPDIR)/libotf_la-OTF_RStream.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_RStream.c' object='libotf_la-OTF_RStream.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_RStream.lo `test -f 'OTF_RStream.c' || echo '$(srcdir)/'`OTF_RStream.c - -libotf_la-OTF_WBuffer.lo: OTF_WBuffer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_WBuffer.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_WBuffer.Tpo -c -o libotf_la-OTF_WBuffer.lo `test -f 'OTF_WBuffer.c' || echo '$(srcdir)/'`OTF_WBuffer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_WBuffer.Tpo $(DEPDIR)/libotf_la-OTF_WBuffer.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_WBuffer.c' object='libotf_la-OTF_WBuffer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_WBuffer.lo `test -f 'OTF_WBuffer.c' || echo '$(srcdir)/'`OTF_WBuffer.c - -libotf_la-OTF_Writer.lo: OTF_Writer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_Writer.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_Writer.Tpo -c -o libotf_la-OTF_Writer.lo `test -f 'OTF_Writer.c' || echo '$(srcdir)/'`OTF_Writer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_Writer.Tpo $(DEPDIR)/libotf_la-OTF_Writer.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_Writer.c' object='libotf_la-OTF_Writer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_Writer.lo `test -f 'OTF_Writer.c' || echo '$(srcdir)/'`OTF_Writer.c - -libotf_la-OTF_WStream.lo: OTF_WStream.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_WStream.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_WStream.Tpo -c -o libotf_la-OTF_WStream.lo `test -f 'OTF_WStream.c' || echo '$(srcdir)/'`OTF_WStream.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_WStream.Tpo $(DEPDIR)/libotf_la-OTF_WStream.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_WStream.c' object='libotf_la-OTF_WStream.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_WStream.lo `test -f 'OTF_WStream.c' || echo '$(srcdir)/'`OTF_WStream.c - -libotf_la-OTF_inttypes.lo: OTF_inttypes.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -MT libotf_la-OTF_inttypes.lo -MD -MP -MF $(DEPDIR)/libotf_la-OTF_inttypes.Tpo -c -o libotf_la-OTF_inttypes.lo `test -f 'OTF_inttypes.c' || echo '$(srcdir)/'`OTF_inttypes.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libotf_la-OTF_inttypes.Tpo $(DEPDIR)/libotf_la-OTF_inttypes.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='OTF_inttypes.c' object='libotf_la-OTF_inttypes.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libotf_la_CFLAGS) $(CFLAGS) -c -o libotf_la-OTF_inttypes.lo `test -f 'OTF_inttypes.c' || echo '$(srcdir)/'`OTF_inttypes.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files -install-nodist_includeHEADERS: $(nodist_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-nodist_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES 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-includeHEADERS install-nodist_includeHEADERS - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -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: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-nodist_includeHEADERS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES 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-includeHEADERS install-info \ - install-info-am install-libLTLIBRARIES install-man \ - install-nodist_includeHEADERS 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 uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS - - -.PHONY: doc -doc: - doxygen - -# 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/externals/otf/otflib/Makefile.mingw b/externals/otf/otflib/Makefile.mingw deleted file mode 100644 index 6123f24473c28f81d05953f26d4caded3352f9d5..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/Makefile.mingw +++ /dev/null @@ -1,27 +0,0 @@ - -CC = gcc -LD = gcc - -OPT = -g -Wall -W -OBJ = OTF_CopyHandler.o OTF_Errno.o OTF_File.o OTF_FileManager.o OTF_Filenames.o OTF_HandlerArray.o OTF_inttypes.o OTF_MasterControl.o OTF_Parse.o OTF_Platform.o OTF_Reader.o OTF_RStream.o OTF_WBuffer.o OTF_Writer.o OTF_WStream.o OTF_RBuffer.o - -OBJ_OUTPUT = obj\\ -CHK_DIR_EXISTS = if not exist -MKDIR = mkdir -RM = del - - -all: makedir $(OBJ) - ar r libotf.a $(OBJ_OUTPUT)*.o - ranlib libotf.a - -makedir: - @$(CHK_DIR_EXISTS) $(OBJ_OUTPUT) $(MKDIR) $(OBJ_OUTPUT) - - -$(OBJ):%.o: %.c %.h - $(LD) -c $< $(OPT) -o $(OBJ_OUTPUT)$@ - -clean: - $(RM) $(OBJ_OUTPUT)*.o *.*~ makefile~ - diff --git a/externals/otf/otflib/OTF_CopyHandler.c b/externals/otf/otflib/OTF_CopyHandler.c deleted file mode 100644 index 49d76af1ed813f9521642f4cf16415badaf1aa70..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_CopyHandler.c +++ /dev/null @@ -1,546 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "OTF_Platform.h" -#include "OTF_CopyHandler.h" -#include "OTF_Writer.h" - - -/* *** Definition handlers *** ************************************* */ - -int OTF_CopyHandler_DefinitionComment( void* userData, uint32_t stream, - const char* comment, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefinitionCommentKV( (OTF_Writer*)userData, stream, - comment, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefTimerResolution( void* userData, uint32_t stream, - uint64_t ticksPerSecond, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefTimerResolutionKV( (OTF_Writer*)userData, stream, - ticksPerSecond, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefProcess( void* userData, uint32_t stream, uint32_t deftoken, - const char* name, uint32_t parent, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefProcessKV( (OTF_Writer*)userData, stream, - deftoken, name, parent, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefProcessGroup( void* userData, uint32_t stream, uint32_t deftoken, - const char* name, uint32_t n, const uint32_t* procs, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefProcessGroupKV( (OTF_Writer*)userData, stream, deftoken, - name, n, procs, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int OTF_CopyHandler_DefAttributeList( void* userData, uint32_t stream, uint32_t attr_token, - uint32_t num, OTF_ATTR_TYPE* array, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefAttributeListKV( (OTF_Writer*)userData, stream, attr_token, - num, array, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int OTF_CopyHandler_DefProcessOrGroupAttributes( void* userData, uint32_t stream, uint32_t proc_token, - uint32_t attr_token, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefProcessOrGroupAttributesKV( (OTF_Writer*)userData, stream, proc_token, - attr_token, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int OTF_CopyHandler_DefFunction( void* userData, uint32_t stream, - uint32_t deftoken, const char* name, - uint32_t group, uint32_t scltoken, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefFunctionKV( (OTF_Writer*)userData, stream, deftoken, - name, group, scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefFunctionGroup( void* userData, uint32_t stream, - uint32_t deftoken, const char* name, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefFunctionGroupKV( (OTF_Writer*)userData, stream, - deftoken, name, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefCollectiveOperation( void* userData, uint32_t stream, - uint32_t collOp, const char* name, uint32_t type, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefCollectiveOperationKV( (OTF_Writer*)userData, stream, - collOp, name, type, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefCounter( void* userData, uint32_t stream, - uint32_t deftoken, const char* name, uint32_t properties, - uint32_t countergroup, const char* unit, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefCounterKV( (OTF_Writer*)userData, stream, - deftoken, name, properties, countergroup, unit, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefCounterGroup( void* userData, uint32_t stream, - uint32_t deftoken, const char* name, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefCounterGroupKV( (OTF_Writer*)userData, stream, - deftoken, name, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefScl( void* userData, uint32_t stream, uint32_t deftoken, - uint32_t sclfile, uint32_t sclline, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefSclKV( (OTF_Writer*)userData, stream, deftoken, - sclfile, sclline, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefSclFile( void* userData, uint32_t stream, - uint32_t deftoken, const char* filename, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefSclFileKV( (OTF_Writer*)userData, stream, - deftoken, filename, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefVersion( void* userData, uint32_t stream, - uint8_t major, uint8_t minor, uint8_t sub, const char* string ) { - - - /* version is writen implicitly */ - - return OTF_RETURN_OK; /* success */ -} - - -int OTF_CopyHandler_DefCreator( void* userData, uint32_t stream, - const char* creator, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefCreatorKV( (OTF_Writer*)userData, stream, creator, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefFile( void* userData, uint32_t stream, uint32_t token, - const char* name, uint32_t group, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefFileKV( (OTF_Writer*)userData, stream, token, - name, group, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefFileGroup( void* userData, uint32_t stream, - uint32_t token, const char* name, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefFileGroupKV( (OTF_Writer*)userData, stream, token, - name, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int OTF_CopyHandler_DefKeyValue( void* userData, uint32_t stream, uint32_t key, - OTF_Type type, const char* name, const char *description, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeDefKeyValueKV( (OTF_Writer*)userData, stream, key, - type, name, description, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -/* *** Event handlers *** ****************************************** */ - -int OTF_CopyHandler_NoOp( void* userData, uint64_t time, uint32_t process, - OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeNoOpKV( (OTF_Writer*)userData, time, - process, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_EventComment( void* userData, uint64_t time, uint32_t process, - const char* comment, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeEventCommentKV( (OTF_Writer*)userData, time, - process, comment, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_Counter( void* userData, uint64_t time, uint32_t process, - uint32_t counter_token, uint64_t value, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeCounterKV( (OTF_Writer*)userData, time, - process, counter_token, value, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_Enter( void* userData, uint64_t time, uint32_t statetoken, - uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeEnterKV( (OTF_Writer*)userData, time, - statetoken, cpuid, scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_CollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint32_t functionToken, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeCollectiveOperationKV( (OTF_Writer*)userData, time, - process, functionToken, communicator, rootprocess, - sent, received, duration, scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_BeginCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint32_t collOp, uint64_t matchingId, - uint32_t procGroup, uint32_t rootProc, uint64_t sent, - uint64_t received, uint32_t scltoken, OTF_KeyValueList* list ) -{ - - return (0 == OTF_Writer_writeBeginCollectiveOperationKV( - (OTF_Writer*) userData, time, process, collOp, - matchingId, procGroup, rootProc, sent, received, - scltoken, list )) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_EndCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint64_t matchingId, OTF_KeyValueList* list ) -{ - - return (0 == OTF_Writer_writeEndCollectiveOperationKV( - (OTF_Writer*) userData, time, process, - matchingId, list )) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_RecvMsg( void* userData, uint64_t time, - uint32_t receiver, uint32_t sender, uint32_t communicator, - uint32_t msgtype, uint32_t msglength, uint32_t scltoken, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeRecvMsgKV( (OTF_Writer*)userData, time, receiver, - sender, communicator, msgtype, msglength, scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_SendMsg( void* userData, uint64_t time, - uint32_t sender, uint32_t receiver, uint32_t communicator, - uint32_t msgtype, uint32_t msglength, uint32_t scltoken, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeSendMsgKV( (OTF_Writer*)userData, time, sender, - receiver, communicator, msgtype, msglength, scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_Leave( void* userData, uint64_t time, uint32_t statetoken, - uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeLeaveKV( (OTF_Writer*)userData, time, statetoken, - cpuid, scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_BeginProcess( void* userData, uint64_t time, - uint32_t process, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeBeginProcessKV( (OTF_Writer*)userData, time, - process, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_EndProcess( void* userData, uint64_t time, - uint32_t process, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeEndProcessKV( (OTF_Writer*)userData, time, - process, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_FileOperation( void* userData, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t handleid, uint32_t operation, uint64_t bytes, - uint64_t duration, uint32_t source, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeFileOperationKV( (OTF_Writer*)userData, time, fileid, - process, handleid, operation, bytes, duration, source, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_BeginFileOperation( void* userData, uint64_t time, - uint32_t process, uint64_t matchingId, uint32_t scltoken, - OTF_KeyValueList* list ) -{ - - return (0 == OTF_Writer_writeBeginFileOperationKV( - (OTF_Writer*) userData, time, process, matchingId, - scltoken, list )) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_EndFileOperation( void* userData, uint64_t time, - uint32_t process, uint32_t fileid, uint64_t matchingId, - uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList* list ) -{ - - return (0 == OTF_Writer_writeEndFileOperationKV( (OTF_Writer*) userData, - time, process, fileid, matchingId, handleId, operation, bytes, - scltoken, list )) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_RMAPut( void* userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeRMAPutKV( (OTF_Writer*)userData, time, - process, origin, target, communicator, tag, bytes, scltoken, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_RMAPutRemoteEnd( void* userData, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeRMAPutRemoteEndKV( (OTF_Writer*)userData, - time, process, origin, target, communicator, tag, bytes, scltoken, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_RMAGet( void* userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeRMAGetKV( (OTF_Writer*)userData, time, - process, origin, target, communicator, tag, bytes, scltoken, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_RMAEnd( void* userData, uint64_t time, uint32_t process, uint32_t remote, - uint32_t communicator, uint32_t tag, uint32_t scltoken, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeRMAEndKV( (OTF_Writer*)userData, time, - process, remote, communicator, tag, scltoken, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -/* *** snapshot handlers ********************************************** */ - - -int OTF_CopyHandler_SnapshotComment( void* userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeSnapshotCommentKV( (OTF_Writer*)userData, - time, process, comment, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_EnterSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t function, uint32_t process, - uint32_t source, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeEnterSnapshotKV( (OTF_Writer*)userData, - time, originaltime, function, process, source, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_SendSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t tag, uint32_t length, - uint32_t source, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeSendSnapshotKV( (OTF_Writer*)userData, - time, originaltime, sender, receiver, procGroup, tag, length, source, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_OpenFileSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, - uint32_t source, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeOpenFileSnapshotKV( (OTF_Writer*)userData, time, - originaltime, fileid, process, handleid, source, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_BeginCollopSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeBeginCollopSnapshotKV( (OTF_Writer*)userData, time, - originaltime, process, collOp, matchingId, procGroup, rootProc, sent, received, - scltoken, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - -} - - -int OTF_CopyHandler_BeginFileOpSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, - uint32_t scltoken, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeBeginFileOpSnapshotKV( (OTF_Writer*)userData, time, - originaltime, process, matchingId, scltoken, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - -} -/* *** summary handlers ********************************************** */ -int OTF_CopyHandler_SummaryComment( void * userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeSummaryCommentKV( (OTF_Writer*)userData, - time, process, comment, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_FunctionSummary( void* userData, - uint64_t time, uint32_t function, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, - OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeFunctionSummaryKV( (OTF_Writer*)userData, - time, function, process, count, excltime, incltime, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_FunctionGroupSummary( void* userData, - uint64_t time, uint32_t functiongroup, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, - OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeFunctionGroupSummaryKV( (OTF_Writer*)userData, - time, functiongroup, process, count, excltime, incltime, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_MessageSummary( void* userData, uint64_t time, - uint32_t process, uint32_t peer, uint32_t comm, uint32_t type, - uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes, - uint64_t receivedBytes, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeMessageSummaryKV((OTF_Writer*) userData, - time, process, peer, comm, type, sentNumber, receivedNumber, sentBytes, - receivedBytes, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_CollopSummary( void *userData, uint64_t time, - uint32_t process, uint32_t comm, uint32_t collective, uint64_t sentNumber, - uint64_t receivedNumber, uint64_t sentBytes, uint64_t receivedBytes, - OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeCollopSummaryKV((OTF_Writer*) userData, - time, process, comm, collective, sentNumber, receivedNumber, sentBytes, - receivedBytes, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_FileOperationSummary( void* userData, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeFileOperationSummaryKV( (OTF_Writer*) userData, - time, fileid, process, nopen, nclose, nread, nwrite, nseek, - bytesread, byteswrite, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_FileGroupOperationSummary( void* userData, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeFileGroupOperationSummaryKV( (OTF_Writer*) userData, - time, groupid, process, nopen, nclose, nread, nwrite, nseek, - bytesread, byteswrite, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int OTF_CopyHandler_DefMarker( void *userData, uint32_t stream, - uint32_t token, const char* name, uint32_t type, OTF_KeyValueList* list ) { - - - /* even if marker definitions could be read from many streams, they are - written to stream 0 forcedly, because this is where all markers belong. */ - stream= 0; - - return ( 0 == OTF_Writer_writeDefMarkerKV( (OTF_Writer*) userData, - stream, token, name, type, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK;; -} - - -int OTF_CopyHandler_Marker( void *userData, uint64_t time, - uint32_t process, uint32_t token, const char* text, OTF_KeyValueList* list ) { - - - return ( 0 == OTF_Writer_writeMarkerKV( (OTF_Writer*) userData, - time, process, token, text, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} diff --git a/externals/otf/otflib/OTF_CopyHandler.h b/externals/otf/otflib/OTF_CopyHandler.h deleted file mode 100644 index cdae2930f72d297a3ca530b70276a37813185c94..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_CopyHandler.h +++ /dev/null @@ -1,219 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_CopyHandler.h - * - * @brief Provides handlers for copying a trace. - * - * \ingroup internal - */ - -#ifndef OTF_COPYOTF_CopyHandler_R_H -#define OTF_COPYOTF_CopyHandler_R_H - - -#include "OTF_inttypes.h" -#include "OTF_Definitions.h" - -#include "OTF_KeyValue.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* *** Definition OTF_CopyHandler_r *** ************************************* */ - -int OTF_CopyHandler_DefinitionComment( void* userData, uint32_t stream, - const char* comment, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefTimerResolution( void* userData, uint32_t stream, - uint64_t ticksPerSecond, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefProcess( void* userData, uint32_t stream, uint32_t process, - const char* name, uint32_t parent, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefProcessGroup( void* userData, uint32_t stream, - uint32_t procGroup, const char* name, uint32_t numberOfProcs, - const uint32_t* procs, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefAttributeList( void* userData, uint32_t stream, - uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE* array, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefProcessOrGroupAttributes( void* userData, uint32_t stream, - uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefFunction( void* userData, uint32_t stream, uint32_t func, - const char* name, uint32_t funcGroup, uint32_t source, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefFunctionGroup( void* userData, uint32_t stream, - uint32_t funcGroup, const char* name, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefCollectiveOperation( void* userData, uint32_t stream, - uint32_t collOp, const char* name, uint32_t type, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefCounter( void* userData, uint32_t stream, uint32_t counter, - const char* name, uint32_t properties, uint32_t counterGroup, - const char* unit, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefCounterGroup( void* userData, uint32_t stream, - uint32_t counterGroup, const char* name, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefScl( void* userData, uint32_t stream, uint32_t source, - uint32_t sourceFile, uint32_t line, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefSclFile( void* userData, uint32_t stream, - uint32_t sourceFile, const char* name, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefVersion( void* userData, uint32_t stream, - uint8_t major, uint8_t minor, uint8_t sub, const char* string ); - -int OTF_CopyHandler_DefCreator( void* userData, uint32_t stream, - const char* creator, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefFile( void* userData, uint32_t stream, uint32_t token, - const char* name, uint32_t group, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefFileGroup( void* userData, uint32_t stream, - uint32_t token, const char* name, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefKeyValue( void* userData, uint32_t stream, uint32_t key, - OTF_Type type, const char* name, const char* description, OTF_KeyValueList* list ); - -int OTF_CopyHandler_NoOp( void* userData, uint64_t time, uint32_t process, - OTF_KeyValueList* list ); - -int OTF_CopyHandler_Enter( void* userData, uint64_t time, uint32_t function, - uint32_t process, uint32_t source, OTF_KeyValueList* list ); - -int OTF_CopyHandler_Leave( void* userData, uint64_t time, uint32_t function, - uint32_t process, uint32_t source, OTF_KeyValueList* list ); - -int OTF_CopyHandler_SendMsg( void* userData, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t group, uint32_t type, uint32_t length, - uint32_t source, OTF_KeyValueList* list ); - -int OTF_CopyHandler_RecvMsg( void* userData, uint64_t time, uint32_t recvProc, - uint32_t sendProc, uint32_t group, uint32_t type, uint32_t length, - uint32_t source, OTF_KeyValueList* list ); - -int OTF_CopyHandler_Counter( void* userData, uint64_t time, uint32_t process, - uint32_t counter, uint64_t value, OTF_KeyValueList* list ); - -int OTF_CopyHandler_CollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint32_t collective, uint32_t procGroup, - uint32_t rootProc, uint32_t sent, uint32_t received, uint64_t duration, - uint32_t source, OTF_KeyValueList* list ); - -int OTF_CopyHandler_BeginCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint32_t collOp, uint64_t matchingId, - uint32_t procGroup, uint32_t rootProc, uint64_t sent, - uint64_t received, uint32_t scltoken, OTF_KeyValueList* list ); - -int OTF_CopyHandler_EndCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint64_t matchingId, OTF_KeyValueList* list ); - -int OTF_CopyHandler_EventComment( void* userData, uint64_t time, uint32_t process, - const char* comment, OTF_KeyValueList* list ); - -int OTF_CopyHandler_BeginProcess( void* userData, uint64_t time, uint32_t process, OTF_KeyValueList* list ); - -int OTF_CopyHandler_EndProcess( void* userData, uint64_t time, uint32_t process, OTF_KeyValueList* list ); - -int OTF_CopyHandler_SnapshotComment( void* userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* list ); - -int OTF_CopyHandler_FileOperation( void* userData, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t handleid, uint32_t operation, uint64_t bytes, - uint64_t duration, uint32_t source, OTF_KeyValueList* list ); - -int OTF_CopyHandler_BeginFileOperation( void* userData, uint64_t time, - uint32_t process, uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList* list ); - -int OTF_CopyHandler_EndFileOperation( void* userData, uint64_t time, - uint32_t process, uint32_t fileid, uint64_t matchingId, uint64_t handleId, - uint32_t operation, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list ); - -int OTF_CopyHandler_RMAPut( void* userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list ); - -int OTF_CopyHandler_RMAPutRemoteEnd( void* userData, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list ); - -int OTF_CopyHandler_RMAGet( void* userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list ); - -int OTF_CopyHandler_RMAEnd( void* userData, uint64_t time, uint32_t process, - uint32_t remote, uint32_t communicator, uint32_t tag, uint32_t scltoken, OTF_KeyValueList* list ); - - -int OTF_CopyHandler_EnterSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t function, uint32_t process, - uint32_t source, OTF_KeyValueList* list ); - -int OTF_CopyHandler_SendSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t tag, uint32_t length, - uint32_t source, OTF_KeyValueList* list ); - -int OTF_CopyHandler_OpenFileSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, - uint32_t source, OTF_KeyValueList* list ); - -int OTF_CopyHandler_BeginCollopSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken, OTF_KeyValueList* list ); - -int OTF_CopyHandler_BeginFileOpSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, - uint32_t scltoken, OTF_KeyValueList* list ); - - -int OTF_CopyHandler_SummaryComment( void * userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* list ); - -int OTF_CopyHandler_FunctionSummary( void* userData, uint64_t time, - uint32_t function, uint32_t process, uint64_t invocations, - uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList* list ); - -int OTF_CopyHandler_FunctionGroupSummary( void* userData, uint64_t time, - uint32_t funcGroup, uint32_t process, uint64_t invocations, - uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList* list ); - -int OTF_CopyHandler_MessageSummary( void* userData, uint64_t time, uint32_t process, - uint32_t peer, uint32_t comm, uint32_t type, uint64_t sentNumber, - uint64_t receivedNumber, uint64_t sentBytes, uint64_t receivedBytes, OTF_KeyValueList* list ); - -int OTF_CopyHandler_CollopSummary(void *userData, uint64_t time, uint32_t process, uint32_t comm, - uint32_t collective, uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes, - uint64_t receivedBytes, OTF_KeyValueList* list ); - -int OTF_CopyHandler_FileOperationSummary( void* userData, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList* list ); - -int OTF_CopyHandler_FileGroupOperationSummary( void* userData, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList* list ); - -int OTF_CopyHandler_DefMarker( void *userData, uint32_t stream, - uint32_t token, const char* name, uint32_t type, OTF_KeyValueList* list ); - -int OTF_CopyHandler_Marker( void *userData, uint64_t time, - uint32_t process, uint32_t token, const char* text, OTF_KeyValueList* list ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_COPYOTF_CopyHandler_R_H */ - diff --git a/externals/otf/otflib/OTF_Definitions.h b/externals/otf/otflib/OTF_Definitions.h deleted file mode 100644 index 7f5eaa4e5944107999d0448685d72c8c4a3458df..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Definitions.h +++ /dev/null @@ -1,268 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_Definitions.h - * - * @brief Provides many many macros for different purposes. - * - * \ingroup misc - */ - - -#ifndef OTF_DEFINITIONS_H -#define OTF_DEFINITIONS_H - - -#include "OTF_Version.h" - -/* definitions of record type identifiers */ - - -/* Event records -- have them numbered and sorted, -this does not affect the format at all. -This is always safe with recompilation and re-linking, -yet it breaks the link compatibility of library versions.*/ - -#define OTF_EVENTCOMMENT_RECORD 0 -#define OTF_COUNTER_RECORD 1 -#define OTF_ENTER_RECORD 2 - -#define OTF_NOOP_RECORD 58 - -#define OTF_COLLOP_RECORD 5 - -#define OTF_RECEIVE_RECORD 10 -#define OTF_SEND_RECORD 11 -#define OTF_LEAVE_RECORD 12 - -#define OTF_BEGINPROCESS_RECORD 35 -#define OTF_ENDPROCESS_RECORD 36 - -#define OTF_FILEOPERATION_RECORD 42 - -#define OTF_RMAPUT_RECORD 47 -#define OTF_RMAPUTRE_RECORD 48 -#define OTF_RMAGET_RECORD 49 -#define OTF_RMAEND_RECORD 50 - -#define OTF_BEGINCOLLOP_RECORD 51 -#define OTF_ENDCOLLOP_RECORD 52 - -#define OTF_BEGINFILEOP_RECORD 53 -#define OTF_ENDFILEOP_RECORD 54 - -/* Definition records*/ - -#define OTF_DEFTIMERRESOLUTION_RECORD 13 -#define OTF_DEFPROCESS_RECORD 14 -#define OTF_DEFPROCESSGROUP_RECORD 15 -#define OTF_DEFATTRLIST_RECORD 55 -#define OTF_DEFPROCESSORGROUPATTR_RECORD 56 -#define OTF_DEFFUNCTION_RECORD 16 -#define OTF_DEFFUNCTIONGROUP_RECORD 17 -#define OTF_DEFCOUNTER_RECORD 18 -#define OTF_DEFCOUNTERGROUP_RECORD 19 -#define OTF_DEFCOLLOP_RECORD 20 -#define OTF_DEFSCL_RECORD 21 -#define OTF_DEFSCLFILE_RECORD 22 -#define OTF_DEFVERSION_RECORD 23 -#define OTF_DEFCREATOR_RECORD 24 -#define OTF_DEFFILE_RECORD 25 -#define OTF_DEFFILEGROUP_RECORD 26 - -#define OTF_DEFKEYVALUE_RECORD 57 - - -#define OTF_FUNCTIONSUMMARY_RECORD 28 -#define OTF_FUNCTIONGROUPSUMMARY_RECORD 29 -#define OTF_MESSAGESUMMARY_RECORD 30 -#define OTF_COLLOPSUMMARY_RECORD 44 -#define OTF_FILEOPERATIONSUMMARY_RECORD 31 -#define OTF_FILEGROUPOPERATIONSUMMARY_RECORD 32 - -#define OTF_DEFINITIONCOMMENT_RECORD 34 - -#define OTF_ENTERSNAPSHOT_RECORD 37 -#define OTF_SENDSNAPSHOT_RECORD 38 - -#define OTF_SUMMARYCOMMENT_RECORD 39 -#define OTF_SNAPSHOTCOMMENT_RECORD 40 -#define OTF_OPENFILESNAPSHOT_RECORD 43 -#define OTF_BEGINCOLLOPSNAPSHOT_RECORD 59 -#define OTF_BEGINFILEOPSNAPSHOT_RECORD 60 - -#define OTF_UNKNOWN_RECORD 41 - -#define OTF_DEFMARKER_RECORD 45 -#define OTF_MARKER_RECORD 46 - -/* Number of records */ -#define OTF_NRECORDS 61 - -/* Stream format definition */ - -#define OTF_WSTREAM_FORMAT_SHORT 0 -#define OTF_WSTREAM_FORMAT_LONG 1 - - -/* - -Counter properties - -There are three groups of counter properties that can be combined. -Not all combinations make perfect sense, some are only there for completeness. - -For all groups the _BITS macro allows to identify the bits that are valid for -this group. This might be useful to AND away all other bits. -*/ - - -/* -The counter type uses the first bit (the second is reserved so far). It says -whether the counter is an accumulating counter ( OTF_COUNTER_TYPE_ACC) that is -monotonously increasing. Then it's probably a good idea to visualize it's -derivative instead of the original value. The alternative is an absolute -value (OTF_COUNTER_TYPE_ABS) that should be displayed as is. -*/ - - -/* 1st-2nd bit */ -#define OTF_COUNTER_TYPE_BITS 3 -#define OTF_COUNTER_TYPE_ACC 0 -#define OTF_COUNTER_TYPE_ABS 1 - -/* -The counter scope says when the values have been collected or for which -interval of time they are valid. It uses the 3rd and 4th bit(bit 5 is -reserved again). The default is OTF_COUNTER_SCOPE_START which means the values -belong to the time interval since the beginning of the measurement. -OTF_COUNTER_SCOPE_POINT means the value is only valid at a point in time but -not necessarily for any interval of time. OTF_COUNTER_SCOPE_LAST means the -value is related to the time interval since the last counter sample of the -same counter, i.e. the immediate past. And finally OTF_COUNTER_SCOPE_NEXT -means it is valid from now until the next counter sample, i.e. the future -right ahead. -*/ - -#define OTF_COUNTER_SCOPE_BITS 12 -#define OTF_COUNTER_SCOPE_START 0 -#define OTF_COUNTER_SCOPE_POINT 4 -#define OTF_COUNTER_SCOPE_LAST 8 -#define OTF_COUNTER_SCOPE_NEXT 12 - -/* -Finally, there is the variable type which occupies the 6th - 9th bit. The bit -values are chosen to allow easy distinction of integers and non-integers as -well as unsigned and signed. -Furthermore, there are some macros to ask for the type. Some similar macros -could be added for convenience. -*/ - -#define OTF_COUNTER_VARTYPE_ISINTEGER(x) (x < 256) -#define OTF_COUNTER_VARTYPE_ISSIGNED(x) ((x&32) == 32) -#define OTF_COUNTER_VARTYPE_ISUNSIGNED(x) ((x&32) == 0) - -#define OTF_COUNTER_VARTYPE_BITS 480 /* 1111xxxxx */ -#define OTF_COUNTER_VARTYPE_UNSIGNED8 0 /* 0000 */ -#define OTF_COUNTER_VARTYPE_SIGNED8 32 /* 0001 */ -#define OTF_COUNTER_VARTYPE_UNSIGNED4 64 /* 0010 */ -#define OTF_COUNTER_VARTYPE_SIGNED4 96 /* 0011 */ -#define OTF_COUNTER_VARTYPE_UNSIGNED2 128 /* 0100 */ -#define OTF_COUNTER_VARTYPE_SIGNED2 160 /* 0101 */ -#define OTF_COUNTER_VARTYPE_FLOAT 256 /* 1000 */ -#define OTF_COUNTER_VARTYPE_DOUBLE 288 /* 1001 */ - - - -#define OTF_COUNTER_PROP_DEFAULT 0 - - -/* Types of collective operations */ - -#define OTF_COLLECTIVE_TYPE_UNKNOWN 0 -#define OTF_COLLECTIVE_TYPE_BARRIER 1 -#define OTF_COLLECTIVE_TYPE_ONE2ALL 2 -#define OTF_COLLECTIVE_TYPE_ALL2ONE 3 -#define OTF_COLLECTIVE_TYPE_ALL2ALL 4 - - -/* -File Operations - 32-bit -The bits 0-4 contain the identifier of the file operation that has happened. -The bits 5-31 are bit flags that carry additional information on the operation. -A macro allows for accessing the file operation in a convenient way. -*/ -#define OTF_FILEOP_BITS 0x0000001f -#define OTF_FILEOP_OPEN 0 -#define OTF_FILEOP_CLOSE 1 -#define OTF_FILEOP_READ 2 -#define OTF_FILEOP_WRITE 3 -#define OTF_FILEOP_SEEK 4 -#define OTF_FILEOP_UNLINK 5 -#define OTF_FILEOP_RENAME 6 -#define OTF_FILEOP_DUP 7 -#define OTF_FILEOP_SYNC 8 -#define OTF_FILEOP_LOCK 9 -#define OTF_FILEOP_UNLOCK 10 -#define OTF_FILEOP_OTHER 31 -#define OTF_IOFLAGS_BITS 0xffffffe0 -#define OTF_IOFLAG_IOFAILED 32 -#define OTF_IOFLAG_ASYNC 64 -#define OTF_IOFLAG_COLL 128 -#define OTF_IOFLAG_DIRECT 256 -#define OTF_IOFLAG_SYNC 512 -#define OTF_IOFLAG_ISREADLOCK 1024 -#define OTF_FILEOP(x) (x & OTF_FILEOP_BITS) - -/* Types of markers */ - -#define OTF_MARKER_TYPE_UNKNOWN 0 -#define OTF_MARKER_TYPE_ERROR 1 -#define OTF_MARKER_TYPE_WARNING 2 -#define OTF_MARKER_TYPE_HINT 3 - -/* otf_errno related defines */ -#define OTF_ERR_LEN 1000 -#define OTF_NO_ERROR 0 -#define OTF_ERROR -1 - -extern char otf_strerr[OTF_ERR_LEN]; -extern int otf_errno; - -/* OTF_KeyValueList related defines */ -/** This macro defines the maximum length of a byte array that can be -appended to an OTF_KeyValueList(). @see OTF_KeyValueList_appendByteArray() */ -#define OTF_KEYVALUE_MAX_ARRAY_LEN 100 - -/* enum used for DefAttributeList record */ -/** An enum which holds all values that are possible to set with datatype OTF_ATTR_TYPE().*/ -typedef enum OTF_ATTR_TYPE_enum { - OTF_ATTR_UNKNOWN = 0, /**< */ - OTF_ATTR_IsMPIRank = 1, /**< */ - OTF_ATTR_IsPThread = 2, /**< */ - OTF_ATTR_IsOMPThread = 3, /**< */ - OTF_ATTR_IsCellSPUThread = 4, /**< */ - OTF_ATTR_hasGroupCounters = 5, /**< */ - OTF_ATTR_hasEnterLeaveRecords = 6 /**< */ -} OTF_ATTR_TYPE; - - -/* return values for handlers. they are not yet evaluated!!! */ - -/** When writing an own handler, use these macros to tell OTF, what to do. -if you return OTF_RETURN_OK OTF continues reading the trace and calling the -appropriate handlers. If you return OTF_RETURN_BREAK or OTF_RETURN_ABORT OTF -stops reading immediately */ -#define OTF_RETURN_OK 0 -/** @see OTF_RETURN_OK */ -#define OTF_RETURN_BREAK 1 -/** @see OTF_RETURN_OK */ -#define OTF_RETURN_ABORT 1 - -#define OTF_READ_ERROR (uint64_t)-1 -#define OTF_READ_MAXRECORDS (uint64_t)-2 - -#endif /* OTF_DEFINITIONS_H */ diff --git a/externals/otf/otflib/OTF_Errno.c b/externals/otf/otflib/OTF_Errno.c deleted file mode 100644 index 782f9e559107548ed6a673a257be06ce7434ed72..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Errno.c +++ /dev/null @@ -1,36 +0,0 @@ -#ifdef HAVE_CONFIG_H - #include "config.h" -#endif - -#include "OTF_Definitions.h" -#include "OTF_Errno.h" - -char otf_strerr[OTF_ERR_LEN] = "No errors occurred."; -int otf_errno = OTF_NO_ERROR; - -#ifdef OTF_VERBOSE - - void OTF_fprintf( FILE* stream, const char* format, ... ) { - va_list ap; - va_start(ap, format); - - vsnprintf( otf_strerr, OTF_ERR_LEN, format, ap ); - otf_errno = OTF_ERROR; - fprintf( stream, "%s", otf_strerr ); - - va_end(ap); - } - -#else - - void OTF_fprintf( FILE* stream, const char* format, ... ) { - va_list ap; - va_start(ap, format); - - vsnprintf( otf_strerr, OTF_ERR_LEN, format, ap ); - otf_errno = OTF_ERROR; - - va_end(ap); - } - -#endif diff --git a/externals/otf/otflib/OTF_Errno.h b/externals/otf/otflib/OTF_Errno.h deleted file mode 100644 index 6b5deb46309edf4cfe6f474b08debeb14df977c7..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Errno.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_Errno.h - * - * @brief Provides two variables that contain information about the - * last error that occurred. - * - * You can check the error variables after every otf functions call - * to find out if there was an error or not. - * - * <B>Variables:</B> <BR> - * - * \code - * int otf_errno - indicates whether an error occurred or not, - * values can be OTF_NO_ERROR or OTF_ERROR - * - * char* otf_strerr - contains the last error message with a - * maximum length of OTF_ERR_LEN - * \endcode - * - * - * Both variables can be used after including otf.h - * \ingroup misc - */ - - -#ifndef OTF_ERRNO_H -#define OTF_ERRNO_H - - -#include <stdio.h> -#include <stdarg.h> - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** @cond Errno.h */ - -/** the following line is ignored by doxygen */ - -void OTF_fprintf( FILE* stream, const char* format, ... ); - -/** @endcond */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_ERRNO_H */ - diff --git a/externals/otf/otflib/OTF_File.c b/externals/otf/otflib/OTF_File.c deleted file mode 100644 index 8149685d4ef975c422597c744c7ea263d0fd4048..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_File.c +++ /dev/null @@ -1,1211 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch - also: patches by Rainer Keller, thanks a lot! -*/ - -/* macros to enable 64 bit file access. make sure all std headers are -included AFTER this macro definitions */ - -/* config.h handles this now: #define _LARGEFILE_SOURCE -#define _LARGEFILE_SOURCE -#define _LARGEFILE64_SOURCE -#define _LARGE_FILES -*/ - - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "OTF_Platform.h" -#include "OTF_inttypes.h" - -#include <stdio.h> -#include <assert.h> -#include <errno.h> - -#ifdef HAVE_STDLIB_H - #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H - #include <string.h> -#endif - -#ifdef HAVE_SYS_TYPES_H - #include <sys/types.h> -#endif - -#ifdef HAVE_SYS_STAT_H - #include <sys/stat.h> -#endif - -#ifdef HAVE_FCNTL_H - #include <fcntl.h> - #if !(defined(HAVE_DECL_O_NOATIME) && HAVE_DECL_O_NOATIME) - #define O_NOATIME 0 - #endif -#endif - -#ifdef HAVE_UNISTD_H - #include <unistd.h> -#endif - -#ifdef HAVE_IO_H - #include <io.h> -#endif - - -/* vs does not know F_OK*/ -#ifndef F_OK - #define F_OK 00 -#endif - -#ifdef HAVE_ZLIB - -#include <zlib.h> - - -#endif /* HAVE_ZLIB */ - -#include "OTF_File.h" -#include "OTF_Platform.h" -#include "OTF_Definitions.h" -#include "OTF_Errno.h" - - -struct struct_OTF_File { - - /** own copy of filename */ - char* filename; - - /** actual file handle, it is NULL if file is currently closed, - != NULL otherwise */ - FILE* file; - -#ifdef HAVE_ZLIB - - /** zlib object */ - z_stream* z; - - /** zlib entry buffer ... what a nice wordplay */ - unsigned char* zbuffer; - - unsigned char* ybuffer; - - uint32_t zbuffersize; - -#endif /* HAVE_ZLIB */ - - /** keep file pos when the real file is closed, - undefined while file is open, == 0 before opened for the first time */ - uint64_t pos; - - OTF_FileMode mode; - - OTF_FileManager* manager; -}; - - -void OTF_File_init( OTF_File* file ) { - - - file->filename= NULL; - file->file= NULL; -#ifdef HAVE_ZLIB - file->z= NULL; - file->zbuffer= NULL; - file->ybuffer= NULL; - file->zbuffersize= 1024*10; -#endif /* HAVE_ZLIB */ - file->pos= 0; - file->mode= OTF_FILEMODE_NOTHING; - file->manager= NULL; -} - - -void OTF_File_finalize( OTF_File* file ) { - - - file->filename= NULL; - file->file= NULL; -#ifdef HAVE_ZLIB - file->z= NULL; - file->zbuffer= NULL; - file->ybuffer= NULL; - file->zbuffersize= 0; -#endif /* HAVE_ZLIB */ - file->pos= 0; - file->mode= OTF_FILEMODE_NOTHING; - file->manager= NULL; -} - - -OTF_File* OTF_File_open( const char* filename, - OTF_FileManager* manager, OTF_FileMode mode ) { - - - return OTF_File_open_zlevel( filename, manager, mode, OTF_FILECOMPRESSION_COMPRESSED ); -} - - -size_t OTF_File_write( OTF_File* file, const void* ptr, size_t size ) { - - - size_t byteswritten; - -#ifdef HAVE_ZLIB - int len = 0; - int rest = (int) size; - int status; -#endif/* HAVE_ZLIB */ - - if( OTF_FILEMODE_WRITE != file->mode ) { - - OTF_fprintf ( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "current file->mode is not OTF_FILEMODE_WRITE. writing forbidden.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - - /* - OTF_fprintf( stderr, "OTF_File_write: %u / %u file handles\n", - OTF_FileManager_getCount( file->manager ), - OTF_FileManager_getNumber( file->manager ) ); - */ - - if( 0 == OTF_File_revive( file, OTF_FILEMODE_WRITE ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_File_revive() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - -#ifdef HAVE_ZLIB - - if ( NULL != file->z ) { - - /* step 1 */ - /* is any data in the y-buffer */ - if ( 0 < file->z->avail_in ) { - - /* len of the piece to fill the y buffer (to 10Kbyte) */ - len = file->zbuffersize - file->z->avail_in; - - /* is enough data in the "*ptr" to fill the ybuffer fully */ - if ( len <= rest ) { - - memcpy( file->ybuffer + file->z->avail_in, ptr, len ); - file->z->avail_in = file->zbuffersize; - file->z->next_in = file->ybuffer; - file->z->avail_out = file->zbuffersize; - file->z->next_out = file->zbuffer; - - status = deflate( file->z, Z_FULL_FLUSH ); - if ( status != Z_OK ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "error in compressing, status %u.\n", - __FUNCTION__, __FILE__, __LINE__, status ); - - return 0; - } - - byteswritten= fwrite( file->zbuffer, 1, file->zbuffersize - file->z->avail_out, file->file ); - if( byteswritten < (file->zbuffersize - file->z->avail_out) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "less bytes written than expected %u < %u.\n", - __FUNCTION__, __FILE__, __LINE__, (uint32_t) byteswritten, - (uint32_t) (file->zbuffersize - file->z->avail_out) ); - - } - - /* test if avail_in really ran empty */ - if ( 0 < file->z->avail_in ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "error in compressing.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - rest -= len; - - } else { - - /* no, it is not */ - - /* only copy the new data into the ybuffer */ - memcpy( file->ybuffer + file->z->avail_in, ptr, rest ); - file->z->avail_in += rest; - rest = 0; - } - } - - - /* step 2 */ - /* if theres more than 10k in the "*ptr" */ - while( (uint32_t) rest >= file->zbuffersize ) { - - file->z->avail_in = file->zbuffersize; - file->z->next_in = ( ( ( unsigned char* ) ptr ) + len ); - file->z->avail_out = file->zbuffersize; - file->z->next_out = file->zbuffer; - - rest -= file->zbuffersize; - len += file->zbuffersize; - - status = deflate( file->z, Z_FULL_FLUSH ); - if ( status != Z_OK ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "error in compressing, status %u.\n", - __FUNCTION__, __FILE__, __LINE__, status ); - - return 0; - } - - byteswritten= fwrite( file->zbuffer, 1, file->zbuffersize - file->z->avail_out, - file->file ); - if( byteswritten < (file->zbuffersize - file->z->avail_out) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "less bytes written than expected %u < %u.\n", - __FUNCTION__, __FILE__, __LINE__, (uint32_t) byteswritten, - (uint32_t) (file->zbuffersize - file->z->avail_out) ); - - } - - /* test if avail_in really ran empty */ - if ( 0 < file->z->avail_in ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "error in compressing.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - } - - - /* step 3 */ - /* is there less than 10k data left ... throw it into the ybuffer */ - if ( rest > 0 ) { - - memcpy( file->ybuffer, ( ( unsigned char* ) ptr ) + len, rest ); - file->z->avail_in = rest; - } - - return size; - - } else { - -#endif /* HAVE_ZLIB */ - - /* - OTF_fprintf( stderr, "OTF_File_write(): buffer %p, size %u file %p\n", ptr, - (uint32_t) size, file->file ); - */ - - byteswritten= fwrite( ptr, 1, size, file->file ); - if( byteswritten < size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "less bytes written than expected %u < %u.\n", - __FUNCTION__, __FILE__, __LINE__, (uint32_t) byteswritten, - (uint32_t) size ); - - } - - return byteswritten; - -#ifdef HAVE_ZLIB - } -#endif /* HAVE_ZLIB */ - -} - - -size_t OTF_File_read( OTF_File* file, void* ptr, size_t size ) { - - -#ifdef HAVE_ZLIB - /* size_t read; */ - int status; -#endif /* HAVE_ZLIB */ - - - if( OTF_FILEMODE_WRITE == file->mode ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "current file->mode is OTF_FILEMODE_WRITE. reading forbidden.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - if( 0 == OTF_File_revive( file, OTF_FILEMODE_READ ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_File_revive() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - -#ifdef HAVE_ZLIB - - if ( NULL != file->z ) { - - file->z->next_out= ptr; - file->z->avail_out= (uInt) size; - - while ( 0 < file->z->avail_out ) { - - if ( 0 == file->z->avail_in ) { - - - file->z->avail_in= (uInt) fread( file->zbuffer, 1, file->zbuffersize, file->file ); - file->z->next_in= file->zbuffer; - } - - if ( 0 == file->z->avail_in ) { - - break; - } - - status = inflate( file->z, Z_SYNC_FLUSH ); - if ( status != Z_OK ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "error in uncompressing, status %u.\n", - __FUNCTION__, __FILE__, __LINE__, status ); - - return 0; - } - } - - return size - file->z->avail_out; - - } else { - - return fread( ptr, 1, size, file->file ); - } - -#else /* HAVE_ZLIB */ - - return fread( ptr, 1, size, file->file ); - -#endif /* HAVE_ZLIB */ -} - - -int OTF_File_seek( OTF_File* file, uint64_t pos ) { - - - int ret; - -#ifdef HAVE_ZLIB - int sync; - uint64_t read; -#endif /* HAVE_ZLIB */ - - if( OTF_FILEMODE_WRITE == file->mode ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "current file->mode is OTF_FILEMODE_WRITE. seeking forbidden.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return -1; - } - - - if( 0 == OTF_File_revive( file, OTF_FILEMODE_SEEK ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_File_revive() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return -1; - } - - - ret= fseeko( file->file, pos, SEEK_SET ); - -#ifdef HAVE_ZLIB - - if ( NULL != file->z && 0 == ret ) { - - do { - - /* - OTF_fprintf( stderr, "OTF_File_seek() with zlib: jump to %llu\n", - (unsigned long long) pos ); - */ - - read= fread( file->zbuffer, 1, file->zbuffersize, file->file ); - - /* - OTF_fprintf( stderr, "OTF_File_seek() with zlib: read %llu bytes\n", - (unsigned long long) read ); - */ - - file->z->next_in= file->zbuffer; - file->z->avail_in= (uInt) read; - file->z->total_in= 0; - - /* re-initialize z object */ - inflateEnd( file->z ); - inflateInit( file->z ); - - /* do not sync at very beginning of compressed stream because it - would skip the first block */ - sync= Z_OK; - if ( 0 != pos ) { - - sync= inflateSync( file->z ); - } - - if ( Z_OK == sync ) { - - return ret; - } - - if ( Z_BUF_ERROR == sync ) { - - continue; - } - - if ( Z_DATA_ERROR == sync ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Z_DATA_ERROR.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return -1; - } - - if ( Z_STREAM_ERROR == sync ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Z_STREAM_ERROR.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return -1; - } - - } while ( 1 ); - } - -#endif /* HAVE_ZLIB */ - - return ret; -} - - -uint64_t OTF_File_tell( OTF_File* file ) { - - - if ( NULL != file->file ) { - - file->pos= ftello( file->file ); - } - - return file->pos; -} - - -uint64_t OTF_File_size( OTF_File* file ) { - - - struct stat st; - - if ( stat( file->filename, &st ) == -1 ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "stat() failed: %s\n", - __FUNCTION__, __FILE__, __LINE__, - strerror(errno) ); - - return 0; - } else { - - return st.st_size; - - } -} - - -int OTF_File_close( OTF_File* file ) { - - -#ifdef HAVE_ZLIB - size_t byteswritten; - int status; -#endif /* HAVE_ZLIB */ - - - if ( NULL == file ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "file has not been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - -#ifdef HAVE_ZLIB - - if ( NULL != file->z ) { - - if ( OTF_FILEMODE_WRITE != file->mode ) { - - inflateEnd( file->z ); - - } else { - - if ( file->z->avail_in > 0 ) { - - file->z->next_in = file->ybuffer; - file->z->next_out = file->zbuffer; - file->z->avail_out = file->zbuffersize; - - status = deflate( file->z, Z_FULL_FLUSH ); - if ( status != Z_OK ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "error in uncompressing, status %u.\n", - __FUNCTION__, __FILE__, __LINE__, status ); - - return 0; - } - - if( 0 == OTF_File_revive( file, OTF_FILEMODE_WRITE ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_File_revive() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - byteswritten= fwrite( file->zbuffer, 1, file->zbuffersize - - file->z->avail_out, file->file ); - if( byteswritten < (file->zbuffersize - file->z->avail_out) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "less bytes written than expected %u < %u.\n", - __FUNCTION__, __FILE__, __LINE__, (uint32_t) byteswritten, - (uint32_t) (file->zbuffersize - file->z->avail_out) ); - - } - } - - deflateEnd( file->z ); - } - - free( file->z ); - - free( file->ybuffer ); - - free( file->zbuffer ); - } - -#endif /* HAVE_ZLIB */ - - if ( NULL != file->file ) { - - OTF_FileManager_suspendFile( file->manager, file ); - } - - free( file->filename ); - - OTF_File_finalize( file ); - - free( file ); - file = NULL; - - return 1; -} - - -OTF_FileStatus OTF_File_status( OTF_File* file ) { - - - if ( NULL == file->file ) { - - if ( 0 == file->pos ) { - - return OTF_FILESTATUS_CLOSED; - - } else { - - return OTF_FILESTATUS_SUSPENDED; - } - } - - return OTF_FILESTATUS_ACTIVE; -} - - -void OTF_File_suspend( OTF_File* file ) { - - - /* get status and close OS file */ - - file->pos= ftello( file->file ); - fclose( file->file ); - file->file= NULL; -} - - -int OTF_File_revive( OTF_File* file, OTF_FileMode mode ) { - - - switch ( mode ) { - - case OTF_FILEMODE_READ : - - /* *** read *** */ - - if ( NULL == file->file ) { - - /* file currently closed, aka open or reopen */ - - /* - OTF_fprintf( stderr, "OTF_File_revive() READ: ask FileManager for free handle\n" ); - */ - if ( 0 == OTF_FileManager_guaranteeFile( file->manager ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_FileManager_guaranteeFile() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - /* open first time, as we open O_RDONLY plus O_NOATIME, which fopen doesn't know, use open/fdopen */ -#ifdef _GNU_SOURCE - { - - int fd; - int retry_num = 5; - int flags = O_RDONLY | O_NOATIME; -retry: - fd = open( file->filename, flags ); - - if ( -1 == fd ) { - - /* if the user is not the owner of the file, open with O_NOATIME will fail with errno == EPERM; - try to open without O_NOATIME again to avoid this problem */ - if ( EPERM == errno ) { - - flags = O_RDONLY; - goto retry; - - /* the file name might be stale, e.g. on Network File System (NFS) */ - } else if ( ESTALE == errno && 0 < --retry_num ) { - - sleep(1); - goto retry; - - } else { - - /* show this error every time */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot open file %s for reading. Maybe the number of " - "opened filehandles exceeds your system's limit\n", - __FUNCTION__, __FILE__, __LINE__, file->filename ); - - return 0; - } - - } - - file->file= fdopen( fd, "r" ); - - } -#else /* _GNU_SOURCE */ - file->file= fopen( file->filename, "rb" ); -#endif /* _GNU_SOURCE */ - if( NULL == file->file ) { - - /* show this error every time */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot open file %s for reading. Maybe the number of " - "opened filehandles exceeds your system's limit\n", - __FUNCTION__, __FILE__, __LINE__, file->filename ); - - return 0; - } - - /* Upon repoen, seek to the current position */ - if ( 0 != file->pos ) { - fseeko( file->file, file->pos, SEEK_SET ); - } - - - if ( 0 == OTF_FileManager_registerFile( file->manager, file ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_FileManager_registerFile() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - } else { - - /* file already opened */ - /* - OTF_fprintf( stderr, "OTF_File_revive() READ: update FileManagers LRU list\n" ); - */ - if ( 0 == OTF_FileManager_touchFile( file->manager, file ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_FileManager_touchFile() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - } - - return 1; - - case OTF_FILEMODE_WRITE : - - /* *** write *** */ - - if ( NULL == file->file ) { - - /* file currently closed */ - - /* - OTF_fprintf( stderr, "OTF_File_revive() WRITE: ask FileManager for free handle\n" ); - */ - if ( 0 == OTF_FileManager_guaranteeFile( file->manager ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_FileManager_guaranteeFile() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - if ( 0 != file->pos ) { - - /* re-open */ - - file->file= fopen( file->filename, "ab" ); - if( NULL == file->file ) { - - /* show this error every time */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot open file %s for writing. Maybe the number of " - "opened filehandles exceeds your system's limit\n", - __FUNCTION__, __FILE__, __LINE__, file->filename ); - - return 0; - } - - } else { - - /* open first time */ - - file->file= fopen( file->filename, "wb" ); - if( NULL == file->file ) { - - /* show this error every time */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot open file %s for writing. Maybe the number of " - "opened filehandles exceeds your system's limit\n", - __FUNCTION__, __FILE__, __LINE__, file->filename ); - - return 0; - } - } - - /* - OTF_fprintf( stderr, "OTF_File_revive() WRITE: register opened file with FileManager\n" ); - */ - if ( 0 == OTF_FileManager_registerFile( file->manager, file ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_FileManager_registerFile() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - } else { - - /* file already opened */ - /* - OTF_fprintf( stderr, "OTF_File_revive() WRITE: update FileManagers LRU list\n" ); - */ - if ( 0 == OTF_FileManager_touchFile( file->manager, file ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_FileManager_touchFile() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - } - - return 1; - - case OTF_FILEMODE_SEEK : - - /* *** seek *** */ - - if ( NULL == file->file ) { - - /* file currently closed */ - - /* - OTF_fprintf( stderr, "OTF_File_revive() READ: ask FileManager for free handle\n" ); - */ - if ( 0 == OTF_FileManager_guaranteeFile( file->manager ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_FileManager_guaranteeFile() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - if ( 0 != file->pos ) { - - /* re-open */ - - file->file= fopen( file->filename, "rb" ); - if( NULL == file->file ) { - - /* show this error every time */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot open file %s for reading. Maybe the number of " - "opened filehandles exceeds your system's limit\n", - __FUNCTION__, __FILE__, __LINE__, file->filename ); - - return 0; - } - - /* dont need to seek to the saved position because there - will be another seek anyway*/ - /* - fseeko( file->file, file->pos, SEEK_SET ); - */ - - } else { - - /* open first time */ - - file->file= fopen( file->filename, "rb" ); - if( NULL == file->file ) { - - /* show this error every time */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot open file %s for reading. Maybe the number of " - "opened filehandles exceeds your system's limit\n", - __FUNCTION__, __FILE__, __LINE__, file->filename ); - - return 0; - } - } - - /* - OTF_fprintf( stderr, "OTF_File_revive() SEEK: register opened file with FileManager\n" ); - */ - if ( 0 == OTF_FileManager_registerFile( file->manager, file ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_FileManager_registerFile() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - } else { - - /* file already opened */ - /* - OTF_fprintf( stderr, "OTF_File_revive() READ: update FileManagers LRU list\n" ); - */ - if ( 0 == OTF_FileManager_touchFile( file->manager, file ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_FileManager_touchFile() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - } - - return 1; - - - default: - - /* *** unknown mode *** */ - - return 0; - } -} - - -void OTF_File_setZBufferSize( OTF_File* file, uint32_t size ) { - - -#ifdef HAVE_ZLIB - - if( NULL != file->z ) { - - if ( 32 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "intended zbuffer size %u is too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - return; - - } else if ( 512 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "zbuffer size %u is very small, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } else if ( 10 * 1024 *1024 < size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "zbuffer size %u is rather big, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } - - file->zbuffersize= size; - - if( NULL != file->zbuffer ) { - free( file->zbuffer ); - } - file->zbuffer= malloc( size ); - assert( file->zbuffer ); - - if( NULL != file->ybuffer ) { - free( file->ybuffer ); - } - file->ybuffer= malloc( size ); - assert( file->ybuffer ); - - - } - -#endif /* HAVE_ZLIB */ -} - - -OTF_File* OTF_File_open_zlevel( const char* filename, OTF_FileManager* manager, - OTF_FileMode mode, OTF_FileCompression zlevel ) { - - - uint32_t len; - OTF_File* ret; - - /* Check input parameters */ - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no filename has been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - if( NULL == manager ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "manager has not been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - /* OTF_fprintf( stderr, "OTF_File_open_zlevel() zlevel: %u, filename: \"%s\"\n", zlevel, filename ); */ - - ret= (OTF_File*) malloc( sizeof(OTF_File) ); - if( NULL == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - OTF_File_init( ret ); - - len= (uint32_t) strlen( filename ); - ret->filename= malloc( len +3 ); - if( NULL == ret->filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( ret ); - ret= NULL; - - return NULL; - } - - strncpy( ret->filename, filename, len +1 ); - - ret->mode = mode; - - if ( OTF_FILEMODE_READ == mode || OTF_FILEMODE_SEEK == mode ) { - -#ifdef HAVE_ZLIB - - if ( 0 != access( ret->filename, F_OK ) ) { - - /* file not found, try '.z' suffix */ - - strncpy( ret->filename +len, ".z", 3 ); - - /* - OTF_fprintf( stderr, "try '%s'\n", ret->filename ); - */ - - if ( 0 != access( ret->filename, F_OK ) ) { - - /* file still not found, give up */ - free( ret->filename ); - ret->filename= NULL; - free( ret ); - ret= NULL; - - return ret; - } - - ret->z= malloc( sizeof(z_stream) ); - if( NULL == ret->z ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( ret->filename ); - ret->filename= NULL; - free( ret ); - ret= NULL; - - return NULL; - } - - ret->z->next_in= NULL; - ret->z->avail_in= 0; - ret->z->zalloc= NULL; - ret->z->zfree= NULL; - ret->z->opaque= NULL; - - inflateInit( ret->z ); - - ret->zbuffer= malloc( ret->zbuffersize ); - ret->ybuffer= malloc( ret->zbuffersize ); - if( NULL == ret->zbuffer || NULL == ret->ybuffer) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( ret->z ); - ret->z= NULL; - free( ret->filename ); - ret->filename= NULL; - free( ret ); - ret= NULL; - - return NULL; - } - } - -#else /* HAVE_ZLIB */ - - if ( 0 != access( ret->filename, F_OK ) ) { - - /* file still not found, give up */ - free( ret->filename ); - ret->filename= NULL; - free( ret ); - ret= NULL; - - return ret; - } - -#endif /* HAVE_ZLIB */ - - } else { - - /* filemode write */ - -#ifdef HAVE_ZLIB - - /* is a .z appended to the file name */ - if ( len > 2 && 0 == strcmp( ret->filename + len - 2, ".z" ) ) { - - ret->z= malloc( sizeof(z_stream) ); - if( NULL == ret->z ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( ret->filename ); - ret->filename= NULL; - free( ret ); - ret= NULL; - - return NULL; - } - - ret->z->next_in= NULL; - ret->z->avail_in= 0; - ret->z->zalloc= NULL; - ret->z->zfree= NULL; - ret->z->opaque= NULL; - - deflateInit( ret->z, zlevel ); - - ret->zbuffer= malloc( ret->zbuffersize ); - ret->ybuffer= malloc( ret->zbuffersize ); - if( NULL == ret->zbuffer || NULL == ret->ybuffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( ret->z ); - ret->z= NULL; - free( ret->filename ); - ret->filename= NULL; - free( ret ); - ret= NULL; - - return NULL; - } - } -#endif /* HAVE_ZLIB */ - - } - - ret->manager= manager; - - return ret; -} diff --git a/externals/otf/otflib/OTF_File.h b/externals/otf/otflib/OTF_File.h deleted file mode 100644 index 7248cdf1a3ff983801d5e961803a1e175c76b8cc..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_File.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_File.h - * - * @brief Provides a low-level API for accessing files. - * - * \ingroup internal - */ - - -#ifndef OTF_FILE_H -#define OTF_FILE_H - - -#include "OTF_FileManager.h" -#include "OTF_Filenames.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** mode determining what to do with a file */ -enum enum_OTF_FileMode { - - OTF_FILEMODE_NOTHING = 0, - OTF_FILEMODE_READ= 1, - OTF_FILEMODE_WRITE= 2, - OTF_FILEMODE_SEEK= 3 -}; -typedef enum enum_OTF_FileMode OTF_FileMode; - -/** status of a file */ -enum enum_OTF_FileStatus { - - OTF_FILESTATUS_ACTIVE= 1, - OTF_FILESTATUS_SUSPENDED= 2, - OTF_FILESTATUS_CLOSED= 3 -}; -typedef enum enum_OTF_FileStatus OTF_FileStatus; - -/** initialize a OTF_File object */ -void OTF_File_init( OTF_File* o ); - -/** finalize a OTF_File object */ -void OTF_File_finalize( OTF_File* o ); - -/** open an OTF_File */ -OTF_File* OTF_File_open( const char* filename, OTF_FileManager* manager, - OTF_FileMode mode ); - -/** OTF_File to an OTF_File */ -size_t OTF_File_write( OTF_File* file, const void* ptr, size_t size ); - -/** read from an OTF_File */ -size_t OTF_File_read( OTF_File* file, void* ptr, size_t size ); - -/** seek absolute position in an OTF_File */ -int OTF_File_seek( OTF_File* file, uint64_t pos ); - -/** get absolut position from an OTF_File */ -uint64_t OTF_File_tell( OTF_File* file ); - -/** return the file size in bytes*/ -uint64_t OTF_File_size( OTF_File* file ); - -/** close OTF_File */ -int OTF_File_close( OTF_File* file ); - -/** return OTF_File status */ -OTF_FileStatus OTF_File_status( OTF_File* file ); - - -/** suspend OTF_File - internal use only. */ -void OTF_File_suspend( OTF_File* file ); - -/** re-open the file when closed or suspended - internal use only. -return 1 on success, 0 otherwise */ -int OTF_File_revive( OTF_File* file, OTF_FileMode mode ); - -void OTF_File_setZBufferSize( OTF_File* file, uint32_t size ); - - -/** internal use */ -OTF_File* OTF_File_open_zlevel( const char* filename, OTF_FileManager* manager, - OTF_FileMode mode, OTF_FileCompression compression ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_FILE_H */ diff --git a/externals/otf/otflib/OTF_FileManager.c b/externals/otf/otflib/OTF_FileManager.c deleted file mode 100644 index 1427ba3011d8246119c6a43305403ce02375f278..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_FileManager.c +++ /dev/null @@ -1,523 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - - -#include "OTF_Platform.h" -#include "OTF_FileManager.h" -#include "OTF_File.h" -#include "OTF_Errno.h" - - -/* *** structs *** */ - - -/** entry of doubly linked list, used by struct struct_OTF_FileManager below. */ -struct struct_OTF_FileList { - - - OTF_File* file; - struct struct_OTF_FileList* prev; - struct struct_OTF_FileList* next; -}; -typedef struct struct_OTF_FileList OTF_FileList; - - -/** file handles management structure */ -struct struct_OTF_FileManager { - - /** number of files currently opened */ - uint32_t count; - - /** number of files allow to be opened simultaneously */ - uint32_t number; - - /** list of objects of type OTF_RBuffer or OTF_WBuffer */ - OTF_FileList* list; -}; - - -/* *** headers *** */ - -void OTF_FileManager_init( OTF_FileManager* fh ); -void OTF_FileManager_finalize( OTF_FileManager* fh ); - -int OTF_FileManager_listInsertAtHead( OTF_FileList** list, OTF_File* entry ); -int OTF_FileManager_listUnlinkAtHead( OTF_FileList** list, OTF_File* entry ); -int OTF_FileManager_listUnlinkAtTail( OTF_FileList** list, OTF_File* entry ); -void OTF_FileManager_listPrint( OTF_FileList** list ); - - -/* *** implementation *** */ - - -void OTF_FileManager_init( OTF_FileManager* fh ) { - - - fh->count= 0; - fh->number= 10; - - fh->list= NULL; -} - - -void OTF_FileManager_finalize( OTF_FileManager* manager ) { - - - OTF_FileList* pos; - OTF_FileList* next; - - -# ifdef OTF_DEBUG - if ( 0 < manager->count ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "open file remaining.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif /* OTF_DEBUG */ - - if ( NULL != manager->list ) { - - pos= manager->list; - - pos->prev->next= NULL; - - while ( NULL != pos ) { - - next = pos->next; - free( pos ); - pos = next; - - } - } - - manager->list= NULL; -} - - -OTF_FileManager* OTF_FileManager_open( uint32_t number ) { - - - - OTF_FileManager* ret= (OTF_FileManager*) malloc( sizeof(OTF_FileManager) ); - if( NULL == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - OTF_FileManager_init( ret ); - - OTF_FileManager_setNumber( ret, number ); - - return ret; -} - - -void OTF_FileManager_close( OTF_FileManager* fh ) { - - - OTF_FileManager_finalize( fh ); - - free( fh ); - fh = NULL; - -} - - -uint32_t OTF_FileManager_getCount( OTF_FileManager* fh ) { - - - return fh->count; -} - - -uint32_t OTF_FileManager_getNumber( OTF_FileManager* fh ) { - - - return fh->number; -} - - -uint32_t OTF_FileManager_setNumber( OTF_FileManager* fh, uint32_t number ) { - - - if ( 0 == number ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "illegal value 0 ignored.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return fh->number; - } - - fh->number= number; - - return fh->number; -} - - -/** ensure there is a free file handle available after this call. -return 1 on success, 0 otherwise (which is not supposed to happen) */ -int OTF_FileManager_guaranteeFile( OTF_FileManager* m ) { - - - /* - OTF_fprintf( stderr, "OTF_FileManager_guaranteeFile()\n" ); - */ - - if ( m->count < m->number ) { - - /* free file handles available */ - - /* - OTF_fprintf( stderr, " OTF_FileManager_guaranteeFile() free handles left\n" ); - */ - - return 1; - } - - /* - OTF_fprintf( stderr, " OTF_FileManager_guaranteeFile() need new handles\n" ); - */ - - /* suspend last entry in list */ - if ( 0 == OTF_FileManager_suspendFile( m, m->list->file ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_FileManager_suspendFile() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - /* - OTF_fprintf( stderr, "post suspend %u / %u\n", m->count, m->number ); - */ - - return 1; -} - - -/** registers the 'file' as open. return 1 on success, 0 otherwise. */ -int OTF_FileManager_registerFile( OTF_FileManager* m, OTF_File* file ) { - - - /* - OTF_fprintf( stderr, "OTF_FileManager_registerFile()\n" ); - */ - - if ( OTF_FILESTATUS_ACTIVE != OTF_File_status( file ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "file not open.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - if ( m->count >= m->number ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot register new file because limit %u exceeded, call " - "'OTF_FileManager_guaranteeFile()' before.\n", - __FUNCTION__, __FILE__, __LINE__, m->number ); - - return 0; - } - - OTF_FileManager_listInsertAtHead( &(m->list), file ); - - /* - OTF_fprintf( stderr, " c++ %u -> %u\n", m->count, m->count+1 ); - */ - m->count++; - - return 1; -} - - -/** marks currently opened 'file' as used which is important for the -scheduling strategy, i.e. the internal decision which file to suspend next. -return 1 on success or 0 for an suspended file. */ -int OTF_FileManager_touchFile( OTF_FileManager* m, OTF_File* file ) { - - - /* - OTF_fprintf( stderr, "OTF_FileManager_touchFile()\n" ); - */ - - if ( OTF_FILESTATUS_ACTIVE != OTF_File_status( file ) ) { - - return 0; - } - - /* unlink 'file' from somewhere in the list and put it to head */ - - OTF_FileManager_listUnlinkAtHead( &(m->list), file ); - OTF_FileManager_listInsertAtHead( &(m->list), file ); - - return 1; -} - - -/** suspend an open file explicitly. this may be called externaly or -internally. return 1 on success, 0 otherwise. */ -int OTF_FileManager_suspendFile( OTF_FileManager* m, OTF_File* file ) { - - - /* - OTF_fprintf( stderr, "OTF_FileManager_suspendFile()\n" ); - */ - - if ( OTF_FILESTATUS_ACTIVE != OTF_File_status( file ) ) { - - /* file not open, so cannot be suspended */ - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "file to be suspended is not open.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - if ( 0 == OTF_FileManager_listUnlinkAtTail( &(m->list), file ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "could not unlink this entry.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - }; - - /* - OTF_fprintf( stderr, " c-- %u -> %u\n", m->count, m->count-1 ); - */ - m->count--; - - OTF_File_suspend( file ); - - return 1; -} - - -int OTF_FileManager_listInsertAtHead( OTF_FileList** list, OTF_File* entry ) { - - - OTF_FileList* newentry= (OTF_FileList*) malloc( sizeof(OTF_FileList) ); - if( NULL == newentry ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - if ( NULL != (*list) ) { - - /* - OTF_fprintf( stderr, "pre insert : %p --> %p (%p)\n", - *list, (*list)->next, (*list)->file ); - */ - - newentry->file= entry; - newentry->prev= (*list)->prev; - newentry->next= (*list); - - /* - OTF_fprintf( stderr, "new entry : %p --> %p (%p)\n", - newentry, newentry->next, newentry->file ); - */ - - (*list)->prev->next= newentry; - (*list)->prev= newentry; - - *list= newentry; - - /* - OTF_fprintf( stderr, "post insert: %p --> %p (%p)\n", - *list, (*list)->next, (*list)->file ); - */ - - } else { - - /* empty list */ - - newentry->file= entry; - newentry->prev= newentry; - newentry->next= newentry; - - *list= newentry; - } - - /* - OTF_fprintf( stderr, "after OTF_FileManager_listInsertAtHead():\n" ); - */ - /* - OTF_FileManager_listPrint( list ); - */ - - return 0; -} - - -int OTF_FileManager_listUnlinkAtHead( OTF_FileList** list, OTF_File* file ) { - - - OTF_FileList* pos; - - - if ( NULL == *list ) { - - return 0; - } - - pos= *list; - while ( ( pos != (*list)->prev ) && ( pos->file != file ) ) { - - pos= pos->next; - } - - if ( pos->file == file ) { - - /* found, unlink here */ - - pos->prev->next= pos->next; - pos->next->prev= pos->prev; - - if ( pos->next == pos ) { - - /* list gets empty! */ - *list= NULL; - - } else if ( (*list) == pos ) { - - /* removed current head */ - *list= (*list)->next; - } - - free( pos ); - pos = NULL; - - /* - OTF_fprintf( stderr, "after OTF_FileManager_listUnlinkAtHead() %p found:\n", file ); - */ - /* - OTF_FileManager_listPrint( listHead, listTail ); - */ - - return 1; - } - - /* not found */ - /* - OTF_fprintf( stderr, "after OTF_FileManager_listUnlinkAtHead() %p not found:\n", file ); - */ - /* - OTF_FileManager_listPrint( listHead, listTail ); - */ - - return 0; -} - - -int OTF_FileManager_listUnlinkAtTail( OTF_FileList** list, OTF_File* file ) { - - - OTF_FileList* pos; - - - if ( NULL == *list ) { - - return 0; - } - - pos= (*list)->prev; - while ( ( pos != (*list) ) && ( pos->file != file ) ) { - - pos= pos->prev; - } - - if ( pos->file == file ) { - - /* found, unlink here */ - - pos->prev->next= pos->next; - pos->next->prev= pos->prev; - - if ( pos->next == pos ) { - - /* list gets empty! */ - *list= NULL; - - } else if ( (*list) == pos ) { - - /* removed current head */ - *list= (*list)->next; - } - - free( pos ); - pos = NULL; - - /* - OTF_fprintf( stderr, "after OTF_FileManager_listUnlinkAtHead() %p found:\n", file ); - */ - /* - OTF_FileManager_listPrint( listHead, listTail ); - */ - - return 1; - } - - /* not found */ - /* - OTF_fprintf( stderr, "after OTF_FileManager_listUnlinkAtTail():\n" ); - */ - /* - OTF_FileManager_listPrint( listHead, listTail ); - */ - - return 0; -} - - -void OTF_FileManager_listPrint( OTF_FileList** list ) { - - - OTF_FileList* pos; - - - if ( NULL == *list ) { - - OTF_fprintf( stderr, "empty list\n ----- \n" ); - - return; - } - - pos= *list; - - OTF_fprintf( stderr, "head: %p --> %p (%p %u)\n", (void*)pos, - (void*)pos->next, (void*)pos->file, - OTF_File_status( pos->file ) ); - while ( pos != (*list)->prev ) { - - pos= pos->next; - - OTF_fprintf( stderr, " %p --> %p (%p %u)\n", (void*)pos, - (void*)pos->next, (void*)pos->file, - OTF_File_status( pos->file ) ); - } - - OTF_fprintf( stderr, " ----- \n" ); -} - diff --git a/externals/otf/otflib/OTF_FileManager.h b/externals/otf/otflib/OTF_FileManager.h deleted file mode 100644 index 30bfe963eb18fdde04317b0a089bc3f830b1a8ce..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_FileManager.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_FileManager.h - * - * @brief Manages file handles. - * - * i.e. Opens, closes and suspends files, if there are not enough - * filehandles available. - * - * \ingroup fm - */ - -/** - * \defgroup fm File Manager Interface - * - * The file manager schedules an unlimited number OTF_Files to a limited - * number of actual open OS files. Therefore all open are registered with - * this manager. When a file is requested while no more OS files are - * available any of the other files are suspended, i.i. the OS file is - * closed. - */ - - -#ifndef OTF_FILEMANAGER_H -#define OTF_FILEMANAGER_H - - -#include "OTF_inttypes.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct struct_OTF_File; -typedef struct struct_OTF_File OTF_File; - - -struct struct_OTF_FileManager; -/** file manager object \ingroup fm */ -typedef struct struct_OTF_FileManager OTF_FileManager; - - -/** Generates a new file manager with a maximum number of files that are allowed -to be open simultaneously. \ingroup fm */ -OTF_FileManager* OTF_FileManager_open( uint32_t number ); - -/** Closes the file manager \ingroup fm */ -void OTF_FileManager_close( OTF_FileManager* m ); - -/** Returns the number of files currently open. */ -uint32_t OTF_FileManager_getCount( OTF_FileManager* m ); - -/** Returns the numbner of files allowed to be open simultaneously. */ -uint32_t OTF_FileManager_getNumber( OTF_FileManager* m ); - -/** Sets the number of files allowed to be open simultaneously. */ -uint32_t OTF_FileManager_setNumber( OTF_FileManager* m, uint32_t number ); - -/** Ensure there is a free file handle available after this call. -return 1 on success, 0 otherwise (which is not supposed to happen) */ -int OTF_FileManager_guaranteeFile( OTF_FileManager* m ); - -/** Registers the 'file' as open. Return 1 on success, 0 otherwise. */ -int OTF_FileManager_registerFile( OTF_FileManager* m, OTF_File* file ); - -/** Marks currently opened 'file' as used which is important for the -scheduling strategy, i.e. the internal decision which file to suspend next. -return 1 on success or 0 for an suspended file. */ -int OTF_FileManager_touchFile( OTF_FileManager* m, OTF_File* file ); - -/** Suspend an open file explicitly. this may be called externaly or -internally. Return 1 on success, 0 otherwise. */ -int OTF_FileManager_suspendFile( OTF_FileManager* m, OTF_File* file ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_FILEMANAGER_H */ - diff --git a/externals/otf/otflib/OTF_Filenames.c b/externals/otf/otflib/OTF_Filenames.c deleted file mode 100644 index 89c8b02727993a7c4977e132c736ca77e75cf6c1..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Filenames.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "OTF_Platform.h" - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#ifdef HAVE_UNISTD_H - #include <unistd.h> -#endif - -#ifdef HAVE_IO_H - #include <io.h> -#endif - - -/* vs does not know F_OK*/ -#ifndef F_OK - #define F_OK 00 -#endif - - -#include "OTF_Filenames.h" - - - -#define OTF_FILENAMESUFFIX_MAIN "otf" -#define OTF_FILENAMESUFFIX_DEF "def" -#define OTF_FILENAMESUFFIX_EVENTS "events" -#define OTF_FILENAMESUFFIX_SNAPS "snaps" -#define OTF_FILENAMESUFFIX_STATS "stats" -#define OTF_FILENAMESUFFIX_MARKER "marker" - -#include "OTF_Errno.h" - - -char* OTF_getFilename( const char* namestub, uint32_t id, OTF_FileType type, - unsigned int l, char* ret ) { - - - if ( ( NULL == ret ) || ( 0 == l ) ) { - - l= (unsigned int) strlen( namestub ) + 1 + 1 + 10 + 1 + 10 + 2; /* is this right ??? - at least it´s more than enough */ - ret= (char*) malloc( l * sizeof(char) ); - } - - - switch ( type&OTF_FILETYPE_BITS ) { - - case OTF_FILETYPE_MASTER: - - /* mastercontrol file stays uncompressed even with compression */ - snprintf( ret, l, "%s.%s", namestub, OTF_FILENAMESUFFIX_MAIN ); - break; - - case OTF_FILETYPE_GLOBAL_DEF: - - snprintf( ret, l, "%s.%s%s", namestub, OTF_FILENAMESUFFIX_DEF, - ((type&OTF_FILECOMPRESSION_BITS) > 0 && (type&OTF_FILECOMPRESSION_BITS) <= 9 ) ? ".z" : "" ); - break; - - case OTF_FILETYPE_DEF: - - snprintf( ret, l, "%s.%x.%s%s", namestub, id, OTF_FILENAMESUFFIX_DEF, - ((type&OTF_FILECOMPRESSION_BITS) > 0 && (type&OTF_FILECOMPRESSION_BITS) <= 9 ) ? ".z" : "" ); - break; - - case OTF_FILETYPE_EVENT: - - snprintf( ret, l, "%s.%x.%s%s", namestub, id, OTF_FILENAMESUFFIX_EVENTS, - ((type&OTF_FILECOMPRESSION_BITS) > 0 && (type&OTF_FILECOMPRESSION_BITS) <= 9 ) ? ".z" : "" ); - break; - - case OTF_FILETYPE_SNAPS: - - snprintf( ret, l, "%s.%x.%s%s", namestub, id, OTF_FILENAMESUFFIX_SNAPS, - ((type&OTF_FILECOMPRESSION_BITS) > 0 && (type&OTF_FILECOMPRESSION_BITS) <= 9 ) ? ".z" : "" ); - break; - - case OTF_FILETYPE_STATS: - - snprintf( ret, l, "%s.%x.%s%s", namestub, id, OTF_FILENAMESUFFIX_STATS, - ((type&OTF_FILECOMPRESSION_BITS) > 0 && (type&OTF_FILECOMPRESSION_BITS) <= 9 ) ? ".z" : "" ); - break; - - case OTF_FILETYPE_MARKER: - - snprintf( ret, l, "%s.%x.%s%s", namestub, id, OTF_FILENAMESUFFIX_MARKER, - ((type&OTF_FILECOMPRESSION_BITS) > 0 && (type&OTF_FILECOMPRESSION_BITS) <= 9 ) ? ".z" : "" ); - break; - - default: - free(ret); - ret = NULL; - return NULL; - } - - return ret; -} - - -/** strip the a filename from the ".otf" suffix if present */ -char* OTF_stripFilename( const char* filename ) { - - - char* ret= strdup( filename ); - char* p= ret; - - if( NULL == p ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - /* find last '.' and compare remainder with OTF_FILENAMESUFFIX_MAIN */ - p= strrchr( ret, '.' ); - if ( NULL != p && 0 == strcmp( p + 1, OTF_FILENAMESUFFIX_MAIN ) ) { - *p= '\0'; - } - - /* fail if the resulting filename is empty */ - if ( '\0' == *ret ) { - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "empty filename base.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( ret ); - return NULL; - } - - return ret; -} - - -int OTF_fileExists( const char* filename ) { - - if ( 0 == access( filename, F_OK ) ) { - - return 1; - - } else { - - return 0; - } -} - diff --git a/externals/otf/otflib/OTF_Filenames.h b/externals/otf/otflib/OTF_Filenames.h deleted file mode 100644 index 35885b7c3efd5687713f519c7c1a6893ac0b5d86..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Filenames.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_Filenames.h - * - * @brief Handles file naming issues. - * - * \ingroup internal - */ - - -#ifndef OTF_FILENAMES -#define OTF_FILENAMES - - -#include "OTF_inttypes.h" -#include "OTF_Definitions.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/*#define OTF_FILETYPE_MASTER 0 -#define OTF_FILETYPE_GLOBAL_DEF 1 -#define OTF_FILETYPE_DEF 2 -#define OTF_FILETYPE_EVENT 3 -#define OTF_FILETYPE_SNAPS 4 -#define OTF_FILETYPE_STATS 5*/ -#define OTF_FILETYPE_MASTER 16 -#define OTF_FILETYPE_GLOBAL_DEF 32 -#define OTF_FILETYPE_DEF 64 -#define OTF_FILETYPE_EVENT 128 -#define OTF_FILETYPE_SNAPS 256 -#define OTF_FILETYPE_STATS 512 -#define OTF_FILETYPE_MARKER 1024 -#define OTF_FILETYPE_BITS (16+32+64+128+256+512+1024) -typedef uint32_t OTF_FileType; - -/* zlevel has to be 0-9 */ -#define OTF_FILECOMPRESSION_UNCOMPRESSED 0 -/* default compression level */ -#define OTF_FILECOMPRESSION_COMPRESSED 4 -#define OTF_FILECOMPRESSION_BITS (1+2+4+8) -typedef uint32_t OTF_FileCompression; - - -/** provide a name stub, a stream id and the type of file. -the function will create the proper filename in 'ret'. ret may be -pre-allocated with length 'l' or NULL with 'l=0'. in the latter case -memory is allocated via malloc internally but has to be freed later on. -on success the resulting string is returned, return NULL indicates an error. */ -char* OTF_getFilename( const char* namestub, uint32_t id, OTF_FileType type, - unsigned int l, char* ret ); - - -/** strip the a filename from the ".otf" suffix if present */ -char* OTF_stripFilename( const char* filename ); - - -/** DEPRICATED Check whether a file exists or not. Return 1 on success. */ -int OTF_fileExists( const char* filename ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_FILENAMES */ diff --git a/externals/otf/otflib/OTF_Handler.h b/externals/otf/otflib/OTF_Handler.h deleted file mode 100644 index 8c2e56194c157383941884b9b251894fbf2f08e7..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Handler.h +++ /dev/null @@ -1,1668 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_Handler.h - * - * @brief Provides read access to OTF traces which consist of multiple - * streams. - * - */ - -/** \defgroup handler Handler Interface - * - * In the following, the handler interfaces for all record types are - * specified. The signature of callback handler functions is equal to the - * signature of corresponding record write functions except for the first - * argument. The first argument common to all callback handler functions is - * \em userData -- a generic pointer to custom user data. The second common - * argument to all callback hander functions is \em stream which identifies the - * stream where the definition occurred. A stream parameter = 0 indicates a - * global definition which is the default. - */ - -/** - * \defgroup ha Handler Array Interface - * - * Using this interface you can setup a handler array for reading traces. - * - */ - -#include "OTF_KeyValue.h" - - -/* Handlers for OTF definition records *****+++***************************** */ - - -/** - * Provides a comment record. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param comment Arbitrary comment string. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefinitionComment( void* userData, uint32_t stream, const char* comment, OTF_KeyValueList *list ); - - - -/** - * Provides the timer resolution. All timed event records need to be - * interpreted according to this definition. By default, a timer resolution of - * 1 us i.e. 1,000,000 clock ticks is assumed. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param ticksPerSecond Clock ticks per second of the timer. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefTimerResolution( void* userData, - uint32_t stream, - uint64_t ticksPerSecond, - OTF_KeyValueList *list ); - - -/** - * Provides a process definition. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param process Arbitrary but unique process identifier > 0. - * @param name Name of the process e.g. "Process X". - * @param parent Previously declared parent process identifier or 0 if - * process has no parent. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefProcess( void* userData, - uint32_t stream, - uint32_t process, - const char* name, - uint32_t parent, - OTF_KeyValueList *list ); - - -/** - * Provides a process group definition. - * - * OTF supports groups of processes. Their main objective is to classify - * processes depending on arbitrary characteristics. Processes can reside - * in multiple groups. This record type is optional. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param procGroup Arbitrary but unique process group identifier > 0. - * @param name Name of the process group e.g. "Well Balanced". - * @param numberOfProcs The number of processes in the process group. - * @param procs Vector of process identifiers as provided by - * OTF_Handler_DefProcess(). - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefProcessGroup( void* userData, - uint32_t stream, - uint32_t procGroup, - const char* name, - uint32_t numberOfProcs, - const uint32_t* procs, - OTF_KeyValueList *list ); - - -/** - * Provides a list of attributes that is assigned to a unique token. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param attr_token Arbitrary but unique attribute list identifier > 0. - * @param num Number of elements in the attribute list array. - * @param array An array of different attributes with type of OTF_ATTR_TYPE(). - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefAttributeList( void* userData, - uint32_t stream, - uint32_t attr_token, - uint32_t num, - OTF_ATTR_TYPE* array, - OTF_KeyValueList *list ); - - -/** - * Provides a process or group attributes definition. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param proc_token Arbitrary but unique process or process group identifier > 0. - * @param attr_token A unique token that was defined with OTF_Writer_writeDefAttributeList(). - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefProcessOrGroupAttributes( void* user Data, - uint32_t stream, - uint32_t proc_token, - uint32_t attr_token, - OTF_KeyValueList *list ); - - -/** - * Provides a function definition. - * - * Defines a function of the given name. Functions can optionally belong to a - * certain function group provided by the - * OTF_Handler_DefFunctionGroup() handler. A source code reference can - * be provided aswell. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param func Arbitrary but unique function identifier > 0. - * @param name Name of the function e.g. "DoSomething". - * @param funcGroup A function group identifier preliminary provided by - * OTF_Handler_DefFunctionGroup() or 0 for no - * function group assignment. - * @param source Reference to the function's source code location - * preliminary provided by OTF_Handler_DefScl() or - * 0 for no source code location assignment. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefFunction( void* userData, - uint32_t stream, - uint32_t func, - const char* name, - uint32_t funcGroup, - uint32_t source, - OTF_KeyValueList *list ); - - -/** - * Provides a function group definition. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param funcGroup An arbitrary but unique function group identifier > 0. - * @param name Name of the function group e.g. "Computation". - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefFunctionGroup( void* userData, - uint32_t stream, - uint32_t funcGroup, - const char* name, - OTF_KeyValueList *list ); - - -/** - * Provides a collective operation definition. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param collOp An arbitrary but unique collective op. identifier > 0. - * @param name Name of the collective operation e.g. "MPI_Bcast". - * @param type One of the five supported collective classes: - * OTF_COLLECTIVE_TYPE_UNKNOWN (default), - * OTF_COLLECTIVE_TYPE_BARRIER, - * OTF_COLLECTIVE_TYPE_ONE2ALL, - * OTF_COLLECTIVE_TYPE_ALL2ONE, - * OTF_COLLECTIVE_TYPE_ALL2ALL. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefCollectiveOperation( void* userData, - uint32_t stream, - uint32_t collOp, - const char* name, - uint32_t type, - OTF_KeyValueList *list ); - - -/** - * Provides a counter definition. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param counter An arbitrary but unique counter identifier. - * @param name Name of the counter e.g. "Cache Misses". - * @param properties A combination of a type, scope and vartype counter property. - * OTF_COUNTER_TYPE_ACC (default) represents a counter - * with monotonously increasing values e.g. a FLOP - * counter. OTF_COUNTER_TYPE_ABS on the other hand - * defines a counter with alternating absolute values e.g. - * the memory usage of a process. The following counter - * measurement scopes are supported: - * OTF_COUNTER_SCOPE_START (default) always refers to the - * start of the process, OTF_COUNTER_SCOPE_POINT refers - * to exactly this moment in time, OTF_COUNTER_SCOPE_LAST - * relates to the previous measurement, and - * OTF_COUNTER_SCOPE_NEXT to the next measurement. - * Examples: OTF_COUNTER_TYPE_ACC + - * OTF_COUNTER_SCOPE_START should be used for most - * standard hardware (PAPI) counters. - * OTF_COUNTER_TYPE_ABS + OTF_COUNTER_SCOPE_POINT could - * be used to record information 'spikes'. - * OTF_COUNTER_TYPE_ABS + OTF_COUNTER_SCOPE_NEXT works - * for memory allocation recording. - * The data type can be one of the following: - * COUNTER_VARTYPE_{UNSIGNED8,SIGNED8,UNSIGNED4,SIGNED4, - * UNSIGNED2,SIGNED2,DOUBLE,FLOAT} - * You may also use COUNTER_VARTYPE_IS{INTEGER,SIGNED, - * UNSIGNED}(property) to a get a clue about the data type. - * @param counterGroup A previously defined counter group identifier or 0 for - * no group. - * @param unit Unit of the counter e.g. "#" for "number of..." or 0 - * for no unit. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefCounter( void* userData, - uint32_t stream, - uint32_t counter, - const char* name, - uint32_t properties, - uint32_t counterGroup, - const char* unit, - OTF_KeyValueList *list ); - - -/** - * Provides a counter group definition. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param counterGroup An arbitrary but unique counter group identifier > 0. - * @param name Counter group name. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefCounterGroup( void* userData, - uint32_t stream, - uint32_t counterGroup, - const char* name, - OTF_KeyValueList *list ); - - -/** - * Provides a source code location (SCL). - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param source Arbitrary but unique source code location - * identifier > 0. - * @param sourceFile Previously defined source file identifier. See - * OTW_Handler_DefSclFile(). - * @param line Line number. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefScl( void* userData, - uint32_t stream, - uint32_t source, - uint32_t sourceFile, - uint32_t line, - OTF_KeyValueList *list ); - - -/** - * Provides a source code location (SCL) file. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param sourceFile Arbitrary but unique source code location - * identifier != 0. - * @param name File name. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefSclFile( void* userData, - uint32_t stream, - uint32_t sourceFile, - const char* name, - OTF_KeyValueList *list ); - - -/** - * Provides file creator information. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param creator String which identifies the creator of the - * file e.g. "TAU Version x.y.z". - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefCreator( void* userData, - uint32_t stream, - const char* creator, - OTF_KeyValueList *list ); - - -/** - * Provides information on the trace´s otf-version. This record can only be read - * and not be written. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * @param major major version number - * @param minor minor version number - * @param sub sub version number - * @param string string identifing the version - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefVersion( void* userData, - uint32_t stream, - uint8_t major, - uint8_t minor, - uint8_t sub, - const char* string, - OTF_KeyValueList *list ); - - -/** - * Provides a file definition - * NOTE: this is experimental - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * - * @param token Arbitrary, unique identifier of the file. - * Has to be > 0. - * - * @param name name of the file - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @param group A previously defined file group identifier or 0 for - * no group. - * - * \ingroup handler - */ -int OTF_Handler_DefFile( void* userData, - uint32_t stream, - uint32_t token, - const char *name, - uint32_t group, - OTF_KeyValueList *list ); - - -/** - * Provides a file group definition - * NOTE: this is experimental - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * - * @param token Arbitrary, unique identifier of the file group - * Has to be > 0. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @param name Name of the file group - * - * \ingroup handler - */ -int OTF_Handler_DefFileGroup( void* userData, - uint32_t stream, - uint32_t token, - const char *name, - OTF_KeyValueList *list ); - - -/** - * Provides a KeyValue definition - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream Identifies the stream to which this definition - * belongs to. stream = 0 represents a global - * definition. - * - * @param key Arbitrary, unique identifier of the KeyValue. - * - * @param type Type of the KeyValue. See OTF_Type(). - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @param name Name of the KeyValue. - * - * @param description Description of the KeyValue. - * - * \ingroup handler - */ -int OTF_Handler_DefKeyValue( void* userData, - uint32_t stream, - uint32_t key, - OTF_Type type, - const char *name, - const char *description, - OTF_KeyValueList *list ); - - -/* Handlers for OTF event records ****************************************** */ - -/** - * Provides a no-operation event. This event only stores a OTF_KeyValueList - * together with a process number and a timestamp. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time The time associated with this event. - * @param process Process where action took place. - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_NoOp( void* userData, - uint64_t time, - uint32_t process, - OTF_KeyValueList *list ); - - -/** - * Provides a function entry event. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time The time when the function entry took place. - * @param function Function which has been entered as defined with - * OTF_Writer_defFunction. - * @param process Process where action took place. - * @param source Explicit source code location identifier > 0 or 0 if - * no source information available. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_Enter( void* userData, - uint64_t time, - uint32_t function, - uint32_t process, - uint32_t source, - OTF_KeyValueList *list ); - - -/** - * Provides a function leave event. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time The time when the function leave took place. - * @param function Function which was left or 0 if stack integrety checking - * is not available. - * @param process Process where action took place. - * @param source Explicit source code location identifier > 0 or 0 if - * no source information available. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_Leave( void* userData, - uint64_t time, - uint32_t function, - uint32_t process, - uint32_t source, - OTF_KeyValueList *list ); - - -/** - * Provides a message send event. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time The time when the message was send. - * @param sender Sender of the message. - * @param receiver Receiver of the message. - * @param group Process-group to which sender and receiver belong to or - * 0 for no group assignment. - * @param type Message type information > 0 or 0 for no information. - * @param length Optional message length information. - * @param source Explicit source code location identifier > 0 or 0 if - * no source information available. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_SendMsg( void* userData, - uint64_t time, - uint32_t sender, - uint32_t receiver, - uint32_t group, - uint32_t type, - uint32_t length, - uint32_t source, - OTF_KeyValueList *list ); - - -/** - * Provides a message retrieval event. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time The time when the message was received. - * @param recvProc Identifier of receiving process. - * @param sendProc Identifier of sending process. - * @param group Process-group to which sender and receiver belong to or - * 0 for no group assignment. - * @param type Message type information > 0 or 0 for no information. - * @param length Optional message length information. - * @param source Explicit source code location identifier > 0 or 0 if - * no source information available. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_RecvMsg( void* userData, - uint64_t time, - uint32_t recvProc, - uint32_t sendProc, - uint32_t group, - uint32_t type, - uint32_t length, - uint32_t source, - OTF_KeyValueList *list ); - - -/** - * Provides a counter measurement. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when counter was measured. - * @param process Process where counter measurment took place. - * @param counter Counter which was measured. - * @param value Counter value. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_Counter( void* userData, - uint64_t time, - uint32_t process, - uint32_t counter, - uint64_t value, - OTF_KeyValueList *list ); - - -/** - * Provides a collective operation member event. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when collective operation was entered by member. - * @param process Process identifier i.e. collective member. - * @param collective Collective identifier as defined with - * OTF_Handler_DefCollectiveOperation(). - * @param procGroup Group of processes participating in this collective. - * @param rootProc Root process if != 0. - * @param sent Data volume sent by member or 0. - * @param received Data volume received by member or 0. - * @param duration Time spent in collective operation. - * @param source Explicit source code location or 0. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_CollectiveOperation( void* userData, - uint64_t time, - uint32_t process, - uint32_t collective, - uint32_t procGroup, - uint32_t rootProc, - uint32_t sent, - uint32_t received, - uint64_t duration, - uint32_t source, - OTF_KeyValueList *list ); - - -/** - * Provides a begin collective operation member event. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when collective operation was entered by member. - * @param process Process identifier i.e. collective member. - * @param collOp Collective identifier to be defined with - * OTF_Writer_writeDefCollectiveOperation(). - * @param matchingId Identifier for finding the associated end collective event - * record. It must be unique within this process. - * @param procGroup Group of processes participating in this collective. - * @param rootProc Root process if != 0. - * @param sent Data volume sent by member or 0. - * @param received Data volume received by member or 0. - * @param scltoken Explicit source code location or 0. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup handler - */ -int OTF_Handler_BeginCollectiveOperation( void* userData, - uint64_t time, - uint32_t process, - uint32_t collOp, - uint64_t matchingId, - uint32_t procGroup, - uint32_t rootProc, - uint64_t sent, - uint64_t received, - uint32_t scltoken, - OTF_KeyValueList *list ); - - -/** - * Provides an end collective operation member event. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when collective operation was entered by member. - * @param process Process identifier i.e. collective member. - * @param matchingId Matching identifier, must match a previous start - * collective operation. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup handler - */ -int OTF_Handler_EndCollectiveOperation( void* userData, - uint64_t time, - uint32_t process, - uint64_t matchingId, - OTF_KeyValueList *list ); - - -/** - * Provide a comment record. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Comments need a timestamp for a proper positioning in the - * trace. - * @param process Comments also need a process identifier for a proper - * positioning in the trace. - * @param comment Arbitrary comment string. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_EventComment( void* userData, - uint64_t time, - uint32_t process, - const char* comment, - OTF_KeyValueList *list ); - - -/** - * Provides a process creation event. - * - * Marks the explicit begin of a process. This event precedes the very first - * event of the respective process and should carry the same time stamp. This - * is especially useful with on-line analysis. It tells whether there will be - * additional records for the given process or not. Without this record type, - * it could only be guessed that there might not follow more events after a - * process has reached the bottom of the call stack. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when process was referenced for the first time. - * @param process Process identifier > 0. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_BeginProcess( void* userData, - uint64_t time, - uint32_t process, - OTF_KeyValueList *list ); - - -/** - * Provides a process destruction event. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when process is referenced for the last time. - * Process identifiers must not be recycled! - * @param process Process identifier > 0. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_EndProcess( void* userData, - uint64_t time, - uint32_t process, - OTF_KeyValueList *list ); - - -/** - * Provides a file operation event - * NOTE: this is experimental - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when process is referenced for the last time. - * Process identifiers must not be recycled! - * @param process Process identifier > 0. - * - * @param handleid Unique identifier. This parameter is important - * for files that are opened multiple times at the same time, - * to match the close to the correct open. - * This number has to be unique for every opened file ( - * Files with the same id must have different handleid !!! ). - * Recommendation: use the timestamp of the openfile record, - * or an increasing(with every fileopen record) variable for - * this. - * - * @param operation Kind of operation done on the file and flags further - * describing the operation. - * The macro OTF_FILEOP(operation) should be used to check - * for the kind of I/O operation. - * - OTF_FILEOP(operation) can be checked for equality on - * - OTF_FILEOP_OPEN -- open a file - * - OTF_FILEOP_CLOSE -- close a file - * - OTF_FILEOP_READ -- read some bytes off a file - * - OTF_FILEOP_WRITE -- write some bytes to a file - * - OTF_FILEOP_SEEK -- set the file pointer - * - OTF_FILEOP_UNLINK -- delete a file - * - OTF_FILEOP_RENAME -- rename a file - * - OTF_FILEOP_DUP -- duplicate a file desriptor - * - OTF_FILEOP_SYNC -- write dirty buffers to disk - * - OTF_FILEOP_LOCK -- acquire a file lock - * - OTF_FILEOP_UNLOCK -- release a file lock - * - OTF_FILEOP_OTHER -- none of the above - * - The following flags are supported and can be checked - * bit-wise for existence in operation: - * - OTF_IOFLAG_IOFAILED -- e.g. could not open file, - * could not read or write all bytes, a lock could not be - * acquired, a rename operation failed, etc. - * - OTF_IOFLAG_ASYNC -- I/O is done asynchronously - * - OTF_IOFLAG_COLL -- this is a collective I/O operation - * - OTF_IOFLAG_DIRECT -- I/O is done bypassing the cache - * - OTF_IOFLAG_SYNC -- I/O is done synchronously - * - OTF_IOFLAG_ISREADLOCK -- lock is a read-only file - * lock - * - * @param bytes Should be 0 for open and close. - * Number of read/written bytes for read/write operations. - * New position in the file after a seek operation. - * - * @param duration Time spent in the file operation. - * - * @param source Explicit source code location or 0. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * \ingroup handler - */ -int OTF_Handler_FileOperation( void* userData, - uint64_t time, - uint32_t fileid, - uint32_t process, - uint64_t handleid, - uint32_t operation, - uint64_t bytes, - uint64_t duration, - uint32_t source, - OTF_KeyValueList *list ); - - -/** - * Write a begin file operation record - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Start time of file operation. - * @param process Process identifier > 0. - * @param matchingId Operation identifier, used for finding the associated end - * file operation event record. - * @param scltoken Optional reference to source code. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup handler - */ -int OTF_Handler_BeginFileOperation( void* userData, - uint64_t time, - uint32_t process, - uint64_t matchingId, - uint32_t scltoken, - OTF_KeyValueList *list ); - - -/** - * Write an end file operation record - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time End time of file operation. - * @param process Process identifier > 0. - * @param fileid File identifier > 0. - * @param matchingId Operation identifier, must match a previous start file - * operation event record. - * @param handleId Unique file open identifier. - * @param operation Type of file operation. See OTF_Handler_FileOperation(). - * @param bytes Depends on operation. See OTF_Handler_FileOperation(). - * @param scltoken Optional reference to source code. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup handler - */ -int OTF_Handler_EndFileOperation( void* userData, - uint64_t time, - uint32_t process, - uint32_t fileid, - uint64_t matchingId, - uint64_t handleId, - uint32_t operation, - uint64_t bytes, - uint32_t scltoken, - OTF_KeyValueList *list ); - - -/** - * Provides a RMA put event - end marker is anticipated on initiating Process. - * NOTE: this is experimental - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when process is referenced for the last time. - * Process identifiers must not be recycled! - * @param process Process identifier > 0. - * This is the Process that initiates the transfer. - * @param origin If >0, Process whose memory will be transferred, instead - of this <process>. - * @param target Process whose memory will be written. - * @param communicator Together with tag, it is used to identify the - * corresponding RMA end record. This will be the process - * group of the RMA Window in case of MPI one-sided - * communication. - * @param tag Together with communicator, it is used to identify the - * corresponding RMA end record. Usually this will be counted - * upwards to distinguish multiple transfer sections with the - * same communicator BUT THIS IS NOT MANDATORY, i.e. multiple - * RMA end records with the same comm/tag combination may - * exist. - * @param bytes Number of bytes that have been transferred by this call. - * @param source Explicit source code location or 0. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup handler - */ -int OTF_Handler_RMAPut( void* userData, - uint64_t time, - uint32_t process, - uint32_t origin, - uint32_t target, - uint32_t communicator, - uint32_t tag, - uint64_t bytes, - uint32_t source, - OTF_KeyValueList *list ); - -/** - * Provides a RMA put event with remote finalization marker, i.e. RMA end marker - * is anticipated on target Process. - * NOTE: this is experimental - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when process is referenced for the last time. - * Process identifiers must not be recycled! - * @param process Process identifier > 0. - * This is the Process that initiates the transfer. - * @param origin If >0, Process whose memory will be transferred, instead - of this <process>. - * @param target Process whose memory will be written. - * That Process' stream will also carry the end record for - * this transaction. - * @param communicator Together with tag, it is used to identify the - * corresponding RMA end record. This will be the process - * group of the RMA Window in case of MPI one-sided - * communication. - * @param tag Together with communicator, it is used to identify the - * corresponding RMA end record. Usually this will be counted - * upwards to distinguish multiple transfer sections with the - * same communicator BUT THIS IS NOT MANDATORY, i.e. multiple - * RMA end records with the same comm/tag combination may - * exist. - * @param bytes Number of bytes that have been transferred by this call. - * @param source Explicit source code location or 0. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup handler - */ -int OTF_Handler_RMAPutRemoteEnd( void* userData, - uint64_t time, - uint32_t process, - uint32_t origin, - uint32_t target, - uint32_t communicator, - uint32_t tag, - uint64_t bytes, - uint32_t source, - OTF_KeyValueList *list ); - -/** - * Provides a RMA get event - end marker is anticipated on initiating Process. - * NOTE: this is experimental - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when process is referenced for the last time. - * Process identifiers must not be recycled! - * @param process Process identifier > 0. - * This is the Process that initiates the transfer. - * @param origin If >0, the Process whose memory will receive the data - * from <target>, instead of this <process>. - * @param target Process whose memory will be read. - * @param communicator Together with tag, it is used to identify the - * corresponding RMA end record. This will be the process - * group of the RMA Window in case of MPI one-sided - * communication. - * @param tag Together with communicator, it is used to identify the - * corresponding RMA end record. Usually this will be counted - * upwards to distinguish multiple transfer sections with the - * same communicator BUT THIS IS NOT MANDATORY, i.e. multiple - * RMA end records with the same comm/tag combination may - * exist. - * @param bytes Number of bytes that have been transferred by this call. - * @param source Explicit source code location or 0. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup handler - */ -int OTF_Handler_RMAGet( void* userData, - uint64_t time, - uint32_t process, - uint32_t origin, - uint32_t target, - uint32_t communicator, - uint32_t tag, - uint64_t bytes, - uint32_t source, - OTF_KeyValueList *list ); - -/** - * Provide a RMA end event. - * The end record marks the finalization of all RMA operations with the - * communicator and tag. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when process is referenced for the last time. - * Process identifiers must not be recycled! - * @param process Process identifier > 0. - * @param remote If >0, ends RMA transfers on Process <remote>, instead of - this <process>. - * @param communicator Together with tag, it is used to identify the related RMA - * transfer records. - * @param tag Together with communicator, it is used to identify the - * related RMA transfer records. - * @param source Explicit source code location or 0. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup handler - */ -int OTF_Handler_RMAEnd( void* userData, - uint64_t time, - uint32_t process, - uint32_t remote, - uint32_t communicator, - uint32_t tag, - uint32_t source, - OTF_KeyValueList *list ); - - -/* Handlers for OTF snapshot records *************************************** */ - - -/** - * Provides a snapshot comment. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Comments need a timestamp for a proper positioning in the - * trace. - * @param process Comments also need a process identifier for a proper - * positioning in the trace. - * @param comment Arbitrary comment string. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ - -int OTF_Handler_SnapshotComment( void* userData, - uint64_t time, - uint32_t process, - const char* comment, - OTF_KeyValueList *list ); - - -/** provides information about a past function call at the time 'originaltime'. -Parameters 'time', 'function', 'process' ,'source' and the return value have the -same meaning as in OTF_Handler_Enter(). -\ingroup handler */ -int OTF_Handler_EnterSnapshot( void *userData, - uint64_t time, - uint64_t originaltime, - uint32_t function, - uint32_t process, - uint32_t source, - OTF_KeyValueList *list ); - - -/** provides information about a past message send operation at the time -'originaltime'. Parameters 'time', 'sender', 'receiver', 'procGroup', 'tag', 'length', -'source' and the return value have the same meaning as in OTF_Handler_SendMsg(). -\ingroup handler */ -int OTF_Handler_SendSnapshot( void *userData, - uint64_t time, - uint64_t originaltime, - uint32_t sender, - uint32_t receiver, - uint32_t procGroup, - uint32_t tag, - uint32_t length, - uint32_t source, - OTF_KeyValueList *list ); - - -/** - * Provides a snapshot record for opened(and not yet closed) files - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Current timestamp. - * @param originaltime Timestamp when the file has been opened. - * @param process Process identifier. - * @param handleid Unique file open identifier. See - * OTF_Handler_FileOperation(). - * @param source Optional reference to source code. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * \ingroup handler - */ -int OTF_Handler_OpenFileSnapshot( void* userData, - uint64_t time, - uint64_t originaltime, - uint32_t fileid, - uint32_t process, - uint64_t handleid, - uint32_t source, - OTF_KeyValueList *list ); - - -/** - * Provides a snapshot record for unfinished collective operations - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Current timestamp. - * @param originaltime Time when the collective operation began. - * @param process Process identifier. - * @param collOp Collective identifier to be defined with - * OTF_Writer_writeDefCollectiveOperation(). - * @param matchingId Identifier for finding the associated end collective event - * record. It must be unique within this procGroup. - * @param procGroup Group of processes participating in this collective. - * @param rootProc Root process if != 0. - * @param sent Data volume sent by member or 0. - * @param received Data volume received by member or 0. - * @param scltoken Optional reference to source code. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * \ingroup handler - */ -int OTF_Handler_BeginCollopSnapshot ( void* userData, - uint64_t time, - uint64_t originaltime, - uint32_t process, - uint32_t collOp, - uint64_t matchingId, - uint32_t procGroup, - uint32_t rootProc, - uint64_t sent, - uint64_t received, - uint32_t scltoken, - OTF_KeyValueList *list ); -/** - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Current timestamp. - * @param originaltime Timestamp when the file has been opened. - * @param process Process identifier. - * @param matchingId Identifier for finding the associated end file operation event - * record. It must be unique. - * @param scltoken Optional reference to source code. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * \ingroup handler - */ -int OTF_Handler_BeginFileOpSnapshot ( void* userData, - uint64_t time, - uint64_t originaltime, - uint32_t process, - uint64_t matchingId, - uint32_t scltoken, - OTF_KeyValueList *list ); - - -/* Handlers for OTF summary records **************************************** */ - - -/** Provides a summary comment. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Comments need a timestamp for a proper positioning in the - * trace. - * @param process Comments also need a process identifier for a proper - * positioning in the trace. - * @param comment Arbitrary comment string. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ - -int OTF_Handler_SummaryComment( void * userData, - uint64_t time, - uint32_t process, - const char* comment, - OTF_KeyValueList *list ); - - -/** - * Provides summarized information for a given function. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when summary was computed. - * @param function Function as defined with - * OTF_Handler_DefFunction. - * @param process Process of the given function. - * @param invocations Number of invocations. - * @param exclTime Time spent exclusively in the given function. - * @param inclTime Time spent in the given function including all - * sub-routine calls. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_FunctionSummary( void* userData, - uint64_t time, - uint32_t function, - uint32_t process, - uint64_t invocations, - uint64_t exclTime, - uint64_t inclTime, - OTF_KeyValueList *list ); - - -/** - * Provides summarized information for a given group of functiongroups. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when summary was computed. - * @param funcGroup Function group as defined with - * OTF_Handler_DefFunctionGroup. - * @param process Process of the given function group. - * @param invocations Number of invocations. - * @param exclTime Time spent exclusively in the given function group. - * @param inclTime Time spent in the given function group including all - * sub-routine calls. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_FunctionGroupSummary( void* userData, - uint64_t time, - uint32_t funcGroup, - uint32_t process, - uint64_t invocations, - uint64_t exclTime, - uint64_t inclTime, - OTF_KeyValueList *list ); - - -/** - * Provides summarized information for a given message type. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when summary was computed. - * @param process Process where messages originated. - * @param peer Process where the message is sent to - * @param comm Communicator of message summary - * @param type Message type/tag. - * @param sentNumber The number of messages sent. - * @param receivedNumber The number of messages received. - * @param sentBytes The number of bytes sent via messages of the given - * type. - * @param receivedBytes The number of bytes received through messages of the - * given type. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_MessageSummary( void* userData, - uint64_t time, - uint32_t process, - uint32_t peer, - uint32_t comm, - uint32_t type, - uint64_t sentNumber, - uint64_t receivedNumber, - uint64_t sentBytes, - uint64_t receivedBytes, - OTF_KeyValueList *list ); - - -/** - * Provides summarized information for collective operations. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when summary was computed. - * @param process Process identifier i.e. collective member. - * @param comm Communicator of collective operation summary. - * @param collective Collective identifier as defined with - * OTF_Handler_DefCollectiveOperation(). - * @param sentNumber The number of messages sent by member or 0. - * @param receivedNumber The number of messages received by member or 0. - * @param sentBytes The number of bytes sent by member or 0. - * @param receivedBytes The number of bytes received by member or 0. - * - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_CollopSummary( void *userData, - uint64_t time, - uint32_t process, - uint32_t comm, - uint32_t collective, - uint64_t sentNumber, - uint64_t receivedNumber, - uint64_t sentBytes, - uint64_t receivedBytes, - OTF_KeyValueList *list ); - - -/** - * Provides summarized information about file operations. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when summary was computed. - * @param fileid File identifier or 0 for all files. - * @param process Process where file operations occured. - * @param nopen Number of open events. - * @param nclose Number of close events. - * @param nread Number of read events. - * @param nwrite Number of write events. - * @param nseek Number of seek events. - * @param bytesread Number of bytes read. - * @param byteswrite Number of bytes written. - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * \ingroup handler - */ -int OTF_Handler_FileOperationSummary( void* userData, - uint64_t time, - uint32_t fileid, - uint32_t process, - uint64_t nopen, - uint64_t nclose, - uint64_t nread, - uint64_t nwrite, - uint64_t nseek, - uint64_t bytesread, - uint64_t byteswrite, - OTF_KeyValueList *list ); - - -/** - * Provides summarized information about file operations in a file group. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when summary was computed. - * @param groupid Group identifier or 0 for all files. - * @param process Process where file operations occured. - * @param nopen Number of open events. - * @param nclose Number of close events. - * @param nread Number of read events. - * @param nwrite Number of write events. - * @param nseek Number of seek events. - * @param bytesread Number of bytes read. - * @param byteswrite Number of bytes written. - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * \ingroup handler - */ -int OTF_Handler_FileGroupOperationSummary( void* userData, - uint64_t time, - uint32_t groupid, - uint32_t process, - uint64_t nopen, - uint64_t nclose, - uint64_t nread, - uint64_t nwrite, - uint64_t nseek, - uint64_t bytesread, - uint64_t byteswrite, - OTF_KeyValueList *list ); - - -/** - * Can be used to handle records which cannot be read. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when summary was computed. - * @param process If 'time' equals (uin64_t) -1, the unknown record - * is a definiton record and 'process' - * represents the streamid of the record. - * If 'time' has a valid value ( not (uint64)-1 ) the - * unknown record is an event-, statistics- or - * snapshotrecord and 'process' represents - * the processid of the record. - * @param record string which contains the record. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_UnknownRecord( void *userData, - uint64_t time, - uint32_t process, - const char *record ); - - -/* - * Provides summarized information about a counter. - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time when summary was computed. - * @param process Process where messages originated. - * @param peer Token of counter. - * @param value Counter Value at current time. - * - * \ingroup handler - */ -/*int OTF_Handler_CounterSummary( void* userData, - uint64_t time, - uint32_t process, - uint32_t counterid, - uint64_t value ); -*/ - - -/* Handlers for OTF marker records **************************************** */ - - -/** - * Define a marker - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param stream stream ID is ignored here - * @param token The newly defined marker token. - * @param name Its name - * @param type Marker type, one of OTF_MARKER_TYPE_xxx - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_DefMarker( void *userData, - uint32_t stream, - uint32_t token, - const char* name, - uint32_t type, - OTF_KeyValueList *list ); - - -/** - * Define a marker - * - * @param userData Pointer to user data which can be set with - * OTF_HandlerArray_setFirstHandlerArg(). - * @param time Time stamp of the marker record. Note that marker records are - * not sorted according to time stamps! - * @param process The process or process group of the marker. - * @param token A marker token defined by 'DefMarker' before. - * @param text Descriptive text. - * @param list Pointer to an OTF_KeyValueList() that contains individual data. - * - * @return OTF_RETURN_ABORT for aborting the reading process immediately - * OTF_RETURN_OK for continue reading - * - * \ingroup handler - */ -int OTF_Handler_Marker( void *userData, - uint64_t time, - uint32_t process, - uint32_t token, - const char* text, - OTF_KeyValueList *list ); - diff --git a/externals/otf/otflib/OTF_HandlerArray.c b/externals/otf/otflib/OTF_HandlerArray.c deleted file mode 100644 index ef3dc2554fec9a8a8dda956afce6f081b2932694..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_HandlerArray.c +++ /dev/null @@ -1,480 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "OTF_Platform.h" -#include "OTF_HandlerArray.h" -#include "OTF_Definitions.h" -#include "OTF_CopyHandler.h" -#include "OTF_Errno.h" - - -/** Constructor - internal use only */ -int OTF_HandlerArray_init( OTF_HandlerArray* handlers ); - -/** Destructor - internal use only */ -int OTF_HandlerArray_finish( OTF_HandlerArray* handlers ); - - -/*********************************************************************/ - - -int OTF_HandlerArray_init( OTF_HandlerArray* handlers ) { - - - uint32_t i; - - - for ( i = 0; i < OTF_NRECORDS; ++i ) { - - handlers->pointer[i] = NULL; - handlers->firsthandlerarg[i] = NULL; - } - - return 1; -} - - -int OTF_HandlerArray_finish( OTF_HandlerArray* handlers ) { - - - free( handlers->pointer ); - free( handlers->firsthandlerarg ); - - handlers->pointer = NULL; - handlers->firsthandlerarg = NULL; - - return 1; -} - - -OTF_HandlerArray* OTF_HandlerArray_open() { - - - OTF_HandlerArray* ret; - - ret = (OTF_HandlerArray*) malloc( sizeof( OTF_HandlerArray ) ); - if( NULL == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - ret->pointer = (OTF_FunctionPointer**) malloc( - OTF_NRECORDS * sizeof( OTF_FunctionPointer* ) ); - if( NULL == ret->pointer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( ret ); - ret= NULL; - - return NULL; - } - - ret->firsthandlerarg = (void**) malloc( OTF_NRECORDS * sizeof( void* ) ); - if( NULL == ret->firsthandlerarg ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( ret->pointer ); - ret->pointer= NULL; - free( ret ); - ret= NULL; - - return NULL; - } - - OTF_HandlerArray_init( ret ); - - return ret; -} - - -int OTF_HandlerArray_close( OTF_HandlerArray* handlers ) { - - - if( NULL == handlers ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "handlers have not been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - OTF_HandlerArray_finish( handlers ); - - free( handlers ); - handlers = NULL; - - return 1; -} - - -int OTF_HandlerArray_setHandler( OTF_HandlerArray* handlers, - OTF_FunctionPointer* pointer, uint32_t recordtype ) { - - - if( recordtype >= OTF_NRECORDS ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "unknown record type %u.\n", - __FUNCTION__, __FILE__, __LINE__, recordtype ); - - return 0; - } - handlers->pointer[recordtype] = pointer; - - return 1; -} - - -int OTF_HandlerArray_setFirstHandlerArg( OTF_HandlerArray* handlers, - void* firsthandlerarg, uint32_t recordtype ) { - - - if( recordtype >= OTF_NRECORDS ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "unknown record type %u.\n", - __FUNCTION__, __FILE__, __LINE__, recordtype ); - - return 0; - } - handlers->firsthandlerarg[recordtype] = firsthandlerarg; - - return 1; -} - - -int OTF_HandlerArray_getCopyHandler( OTF_HandlerArray* handlers, - OTF_Writer* writer ) { - - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefinitionComment, - OTF_DEFINITIONCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFINITIONCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefTimerResolution, - OTF_DEFTIMERRESOLUTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFTIMERRESOLUTION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefProcess, - OTF_DEFPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefProcessGroup, - OTF_DEFPROCESSGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFPROCESSGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefAttributeList, - OTF_DEFATTRLIST_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFATTRLIST_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefProcessOrGroupAttributes, - OTF_DEFPROCESSORGROUPATTR_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFPROCESSORGROUPATTR_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefFunction, - OTF_DEFFUNCTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFFUNCTION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefFunctionGroup, - OTF_DEFFUNCTIONGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFFUNCTIONGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefCollectiveOperation, - OTF_DEFCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefCounter, - OTF_DEFCOUNTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFCOUNTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefCounterGroup, - OTF_DEFCOUNTERGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFCOUNTERGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefScl, - OTF_DEFSCL_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFSCL_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefSclFile, - OTF_DEFSCLFILE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFSCLFILE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefCreator, - OTF_DEFCREATOR_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFCREATOR_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefFile, - OTF_DEFFILE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFFILE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefFileGroup, - OTF_DEFFILEGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFFILEGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefKeyValue, - OTF_DEFKEYVALUE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFKEYVALUE_RECORD ); - - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_NoOp, - OTF_NOOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_NOOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_Enter, - OTF_ENTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_ENTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_Leave, - OTF_LEAVE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_LEAVE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_SendMsg, - OTF_SEND_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_SEND_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_RecvMsg, - OTF_RECEIVE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_RECEIVE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_Counter, - OTF_COUNTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_COUNTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_CollectiveOperation, - OTF_COLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_COLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_BeginCollectiveOperation, - OTF_BEGINCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_BEGINCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_EndCollectiveOperation, - OTF_ENDCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_ENDCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_EventComment, - OTF_EVENTCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_EVENTCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_BeginProcess, - OTF_BEGINPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_BEGINPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_EndProcess, - OTF_ENDPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_ENDPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_FileOperation, - OTF_FILEOPERATION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_FILEOPERATION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_BeginFileOperation, - OTF_BEGINFILEOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_BEGINFILEOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_EndFileOperation, - OTF_ENDFILEOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_ENDFILEOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_RMAPut, - OTF_RMAPUT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_RMAPUT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_RMAPutRemoteEnd, - OTF_RMAPUTRE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_RMAPUTRE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_RMAGet, - OTF_RMAGET_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_RMAGET_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_RMAEnd, - OTF_RMAEND_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_RMAEND_RECORD ); - - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_SnapshotComment, - OTF_SNAPSHOTCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_SNAPSHOTCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_EnterSnapshot, - OTF_ENTERSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_ENTERSNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_SendSnapshot, - OTF_SENDSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_SENDSNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_OpenFileSnapshot, - OTF_OPENFILESNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_OPENFILESNAPSHOT_RECORD ); - - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_BeginCollopSnapshot, - OTF_BEGINCOLLOPSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_BEGINCOLLOPSNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_BeginFileOpSnapshot, - OTF_BEGINFILEOPSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_BEGINFILEOPSNAPSHOT_RECORD ); - - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_SummaryComment, - OTF_SUMMARYCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_SUMMARYCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_FunctionSummary, - OTF_FUNCTIONSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_FUNCTIONSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_FunctionGroupSummary, - OTF_FUNCTIONGROUPSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_FUNCTIONGROUPSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_MessageSummary, - OTF_MESSAGESUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_MESSAGESUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_CollopSummary, - OTF_COLLOPSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_COLLOPSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_FileOperationSummary, - OTF_FILEOPERATIONSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_FILEOPERATIONSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_FileGroupOperationSummary, - OTF_FILEGROUPOPERATIONSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_FILEGROUPOPERATIONSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_DefMarker, - OTF_DEFMARKER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_DEFMARKER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) OTF_CopyHandler_Marker, - OTF_MARKER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, - OTF_MARKER_RECORD ); - - return 1; -} - diff --git a/externals/otf/otflib/OTF_HandlerArray.h b/externals/otf/otflib/OTF_HandlerArray.h deleted file mode 100644 index 953cc4a1770d0aa835c39aa962799862929e390b..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_HandlerArray.h +++ /dev/null @@ -1,620 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_HandlerArray.h - * - * @brief Provides read access to OTF traces which consist of multiple - * streams. - * - * \ingroup handler - * \ingroup ha - */ - -/** \defgroup handler Handler Interface - * - * In the following, the handler interfaces for all record types are - * specified. The signature of callback handler functions is equal to the - * signature of corresponding record write functions except for the first - * argument. The first argument common to all callback handler functions is - * \em userData -- a generic pointer to custom user data. The second common - * argument to all callback hander functions is \em stream which identifies the - * stream where the definition occurred. A stream parameter = 0 indicates a - * global definition which is the default. - */ - -/** - * \defgroup ha Handler Array Interface - * - * Using this interface you can setup a handler array for reading traces. - * - */ - -#ifndef OTF_HANDLERARRAY_H -#define OTF_HANDLERARRAY_H - - -#include "OTF_Writer.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** Generic function pointer for OTF record handlers. \ingroup ha*/ -typedef int (OTF_FunctionPointer) ( void *userData ); - - -/** Object structure which holds OTF record handlers. */ -struct struct_OTF_HandlerArray { - - /** Array of function pointer. */ - OTF_FunctionPointer** pointer; - - /** Array of first handler arguments. */ - void** firsthandlerarg; -}; - -/** Object type which holds OTF record handlers. \ingroup ha */ -typedef struct struct_OTF_HandlerArray OTF_HandlerArray; - - -/** Open a new array of handlers. \ingroup ha */ -OTF_HandlerArray* OTF_HandlerArray_open( void ); - -/** Close and delete a OTF_HandlerArray object. \ingroup ha */ -int OTF_HandlerArray_close( OTF_HandlerArray* handlers ); - -/** Assign the function pointer to your own handler of the given record - type. \ingroup ha */ -int OTF_HandlerArray_setHandler( OTF_HandlerArray* handlers, - OTF_FunctionPointer* pointer, uint32_t recordtype ); - -/** Assign the first argument to your own handler of the given record type. -\ingroup ha */ -int OTF_HandlerArray_setFirstHandlerArg( OTF_HandlerArray* handlers, - void* firsthandlerarg, uint32_t recordtype ); - -/** Provide copy handlers to every record type. \ingroup ha */ -int OTF_HandlerArray_getCopyHandler( OTF_HandlerArray* handlers, - OTF_Writer* writer ); - - -/* typdefs for OTF definition records *************************** */ - -/** @cond typedef */ - -/** the following lines are ignored by doxygen */ - -/* - the following part is also used to create the python wrapper automatically - - respect these rules to avoid problems while generating: - - write the definition macro as a comment (with a '#' placed in front) - one line above the typedef itself - - the use of the following datatypes is possible: char, uint8_t, uint32_t, uint64_t - - the first parameter must be a "void*" pointer - - to use pointer as parameter is very critical and requires some additional rules: - - pointer of type "char*" are allowed anytime - - pointer of type "uint32_t*" are allowed but the previous parameter must - be of type "uint32_t" and contain the number of elements that are in the array - the pointer references to - - pointer of type "void*" are allowed as the first parameter only - - - if you have to add a record that breaks one of the above-mentioned rules the generation - will skip this record and you manually have to update the python wrapper ( see - otflib_py/README_python for further information ) - - check and test the new record with the python interface to avoid bugs caused by the - automatic generation - - do not remove the following line, because it is necessary to generate the python wrapper - #START_GEN_PYWRAPPER -*/ - -/* # OTF_DEFINITIONCOMMENT_RECORD */ -typedef int (OTF_Handler_DefinitionComment) ( void* userData, - uint32_t stream, - const char* comment, - OTF_KeyValueList *list ); - -/* # OTF_DEFTIMERRESOLUTION_RECORD */ -typedef int (OTF_Handler_DefTimerResolution) ( void* userData, - uint32_t stream, - uint64_t ticksPerSecond, - OTF_KeyValueList *list ); - -/* # OTF_DEFPROCESS_RECORD */ -typedef int (OTF_Handler_DefProcess) ( void* userData, - uint32_t stream, - uint32_t process, - const char* name, - uint32_t parent, - OTF_KeyValueList *list ); - -/* # OTF_DEFPROCESSGROUP_RECORD */ -typedef int (OTF_Handler_DefProcessGroup) ( void* userData, - uint32_t stream, - uint32_t procGroup, - const char* name, - uint32_t numberOfProcs, - const uint32_t* procs, - OTF_KeyValueList *list ); - -/* # OTF_DEFATTRLIST_RECORD */ -typedef int (OTF_Handler_DefAttributeList) ( void* userData, - uint32_t stream, - uint32_t attr_token, - uint32_t num, - OTF_ATTR_TYPE* array, - OTF_KeyValueList *list ); - -/* # OTF_DEFPROCESSORGROUPATTR_RECORD */ -typedef int (OTF_Handler_DefProcessOrGroupAttributes) ( void* userData, - uint32_t stream, - uint32_t proc_token, - uint32_t attr_token, - OTF_KeyValueList *list ); - -/* # OTF_DEFFUNCTION_RECORD */ -typedef int (OTF_Handler_DefFunction) ( void* userData, - uint32_t stream, - uint32_t func, - const char* name, - uint32_t funcGroup, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_DEFFUNCTIONGROUP_RECORD */ -typedef int (OTF_Handler_DefFunctionGroup) ( void* userData, - uint32_t stream, - uint32_t funcGroup, - const char* name, - OTF_KeyValueList *list ); - -/* # OTF_DEFCOLLOP_RECORD */ -typedef int (OTF_Handler_DefCollectiveOperation) ( void* userData, - uint32_t stream, - uint32_t collOp, - const char* name, - uint32_t type, - OTF_KeyValueList *list ); - -/* # OTF_DEFCOUNTER_RECORD */ -typedef int (OTF_Handler_DefCounter) ( void* userData, - uint32_t stream, - uint32_t counter, - const char* name, - uint32_t properties, - uint32_t counterGroup, - const char* unit, - OTF_KeyValueList *list ); - -/* # OTF_DEFCOUNTERGROUP_RECORD */ -typedef int (OTF_Handler_DefCounterGroup) ( void* userData, - uint32_t stream, - uint32_t counterGroup, - const char* name, - OTF_KeyValueList *list ); - -/* # OTF_DEFSCL_RECORD */ -typedef int (OTF_Handler_DefScl) ( void* userData, - uint32_t stream, - uint32_t source, - uint32_t sourceFile, - uint32_t line, - OTF_KeyValueList *list ); - -/* # OTF_DEFSCLFILE_RECORD */ -typedef int (OTF_Handler_DefSclFile) ( void* userData, - uint32_t stream, - uint32_t sourceFile, - const char* name, - OTF_KeyValueList *list ); - -/* # OTF_DEFCREATOR_RECORD */ -typedef int (OTF_Handler_DefCreator) ( void* userData, - uint32_t stream, - const char* creator, - OTF_KeyValueList *list ); - -/* # OTF_DEFVERSION_RECORD */ -typedef int (OTF_Handler_DefVersion) ( void* userData, - uint32_t stream, - uint8_t major, - uint8_t minor, - uint8_t sub, - const char* string, - OTF_KeyValueList *list ); - -/* # OTF_DEFFILE_RECORD */ -typedef int (OTF_Handler_DefFile) ( void* userData, - uint32_t stream, - uint32_t token, - const char *name, - uint32_t group, - OTF_KeyValueList *list ); - -/* # OTF_DEFFILEGROUP_RECORD */ -typedef int (OTF_Handler_DefFileGroup) ( void* userData, - uint32_t stream, - uint32_t token, - const char *name, - OTF_KeyValueList *list ); - -/* # OTF_DEFKEYVALUE_RECORD */ -typedef int (OTF_Handler_DefKeyValue) ( void* userData, - uint32_t stream, - uint32_t key, - OTF_Type type, - const char *name, - const char *description, - OTF_KeyValueList *list ); - -/* typedefs for OTF event records ****************************************** */ - -/* # OTF_NOOP_RECORD */ -typedef int (OTF_Handler_NoOp) ( void* userData, - uint64_t time, - uint32_t process, - OTF_KeyValueList *list ); - -/* # OTF_ENTER_RECORD */ -typedef int (OTF_Handler_Enter) ( void* userData, - uint64_t time, - uint32_t function, - uint32_t process, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_LEAVE_RECORD */ -typedef int (OTF_Handler_Leave) ( void* userData, - uint64_t time, - uint32_t function, - uint32_t process, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_SEND_RECORD */ -typedef int (OTF_Handler_SendMsg) ( void* userData, - uint64_t time, - uint32_t sender, - uint32_t receiver, - uint32_t group, - uint32_t type, - uint32_t length, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_RECEIVE_RECORD */ -typedef int (OTF_Handler_RecvMsg) ( void* userData, - uint64_t time, - uint32_t recvProc, - uint32_t sendProc, - uint32_t group, - uint32_t type, - uint32_t length, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_COUNTER_RECORD */ -typedef int (OTF_Handler_Counter) ( void* userData, - uint64_t time, - uint32_t process, - uint32_t counter, - uint64_t value, - OTF_KeyValueList *list ); - -/* # OTF_COLLOP_RECORD */ -typedef int (OTF_Handler_CollectiveOperation) ( void* userData, - uint64_t time, - uint32_t process, - uint32_t collective, - uint32_t procGroup, - uint32_t rootProc, - uint32_t sent, - uint32_t received, - uint64_t duration, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_BEGINCOLLOP_RECORD */ -typedef int (OTF_Handler_BeginCollectiveOperation) ( void* userData, - uint64_t time, - uint32_t process, - uint32_t collOp, - uint64_t matchingId, - uint32_t procGroup, - uint32_t rootProc, - uint64_t sent, - uint64_t received, - uint32_t scltoken, - OTF_KeyValueList *list ); - -/* # OTF_ENDCOLLOP_RECORD */ -typedef int (OTF_Handler_EndCollectiveOperation) ( void* userData, - uint64_t time, - uint32_t process, - uint64_t matchingId, - OTF_KeyValueList *list ); - -/* # OTF_EVENTCOMMENT_RECORD */ -typedef int (OTF_Handler_EventComment) ( void* userData, - uint64_t time, - uint32_t process, - const char* comment, - OTF_KeyValueList *list ); - -/* # OTF_BEGINPROCESS_RECORD */ -typedef int (OTF_Handler_BeginProcess) ( void* userData, - uint64_t time, - uint32_t process, - OTF_KeyValueList *list ); - -/* # OTF_ENDPROCESS_RECORD */ -typedef int (OTF_Handler_EndProcess) ( void* userData, - uint64_t time, - uint32_t process, - OTF_KeyValueList *list ); - - -/* # OTF_FILEOPERATION_RECORD */ -typedef int (OTF_Handler_FileOperation) ( void* userData, - uint64_t time, - uint32_t fileid, - uint32_t process, - uint64_t handleid, - uint32_t operation, - uint64_t bytes, - uint64_t duration, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_BEGINFILEOP_RECORD */ -typedef int (OTF_Handler_BeginFileOperation) ( void* userData, - uint64_t time, - uint32_t process, - uint64_t matchingId, - uint32_t scltoken, - OTF_KeyValueList *list ); - -/* # OTF_ENDFILEOP_RECORD */ -typedef int (OTF_Handler_EndFileOperation) ( void* userData, - uint64_t time, - uint32_t process, - uint32_t fileid, - uint64_t matchingId, - uint64_t handleId, - uint32_t operation, - uint64_t bytes, - uint32_t scltoken, - OTF_KeyValueList *list ); - -/* # OTF_RMAPUT_RECORD */ -typedef int (OTF_Handler_RMAPut) ( void* userData, - uint64_t time, - uint32_t process, - uint32_t origin, - uint32_t target, - uint32_t communicator, - uint32_t tag, - uint64_t bytes, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_RMAPUTRE_RECORD */ -typedef int (OTF_Handler_RMAPutRemoteEnd) ( void* userData, - uint64_t time, - uint32_t process, - uint32_t origin, - uint32_t target, - uint32_t communicator, - uint32_t tag, - uint64_t bytes, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_RMAGET_RECORD */ -typedef int (OTF_Handler_RMAGet) ( void* userData, - uint64_t time, - uint32_t process, - uint32_t origin, - uint32_t target, - uint32_t communicator, - uint32_t tag, - uint64_t bytes, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_RMAEND_RECORD */ -typedef int (OTF_Handler_RMAEnd) ( void* userData, - uint64_t time, - uint32_t process, - uint32_t remote, - uint32_t communicator, - uint32_t tag, - uint32_t source, - OTF_KeyValueList *list ); - - -/* typedefs for OTF snapshot records *************************************** */ - - -/* # OTF_SNAPSHOTCOMMENT_RECORD */ -typedef int (OTF_Handler_SnapshotComment) ( void* userData, - uint64_t time, - uint32_t process, - const char* comment, - OTF_KeyValueList *list ); - -/* # OTF_ENTERSNAPSHOT_RECORD */ -typedef int (OTF_Handler_EnterSnapshot) ( void *userData, - uint64_t time, - uint64_t originaltime, - uint32_t function, - uint32_t process, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_SENDSNAPSHOT_RECORD */ -typedef int (OTF_Handler_SendSnapshot) ( void *userData, - uint64_t time, - uint64_t originaltime, - uint32_t sender, - uint32_t receiver, - uint32_t procGroup, - uint32_t tag, - uint32_t length, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_OPENFILESNAPSHOT_RECORD */ -typedef int (OTF_Handler_OpenFileSnapshot) ( void* userData, - uint64_t time, - uint64_t originaltime, - uint32_t fileid, - uint32_t process, - uint64_t handleid, - uint32_t source, - OTF_KeyValueList *list ); - -/* # OTF_BEGINCOLLOPSNAPSHOT_RECORD */ -typedef int (OTF_Handler_BeginCollopSnapshot) ( void* userData, - uint64_t time, - uint64_t originaltime, - uint32_t process, - uint32_t collOp, - uint64_t matchingId, - uint32_t procGroup, - uint32_t rootProc, - uint64_t sent, - uint64_t received, - uint32_t scltoken, - OTF_KeyValueList *list ); - -/* # OTF_BEGINFILEOPSNAPSHOT_RECORD */ -typedef int (OTF_Handler_BeginFileOpSnapshot) ( void* userData, - uint64_t time, - uint64_t originaltime, - uint32_t process, - uint64_t matchingId, - uint32_t scltoken, - OTF_KeyValueList *list ); - - -/* typedefs for OTF summary records **************************************** */ - - -/* # OTF_SUMMARYCOMMENT_RECORD */ -typedef int (OTF_Handler_SummaryComment) ( void* userData, - uint64_t time, - uint32_t process, - const char* comment, - OTF_KeyValueList *list ); - -/* # OTF_FUNCTIONSUMMARY_RECORD */ -typedef int (OTF_Handler_FunctionSummary) ( void* userData, - uint64_t time, - uint32_t function, - uint32_t process, - uint64_t invocations, - uint64_t exclTime, - uint64_t inclTime, - OTF_KeyValueList *list ); - -/* # OTF_FUNCTIONGROUPSUMMARY_RECORD */ -typedef int (OTF_Handler_FunctionGroupSummary) ( void* userData, - uint64_t time, - uint32_t funcGroup, - uint32_t process, - uint64_t invocations, - uint64_t exclTime, - uint64_t inclTime, - OTF_KeyValueList *list ); - -/* # OTF_MESSAGESUMMARY_RECORD */ -typedef int (OTF_Handler_MessageSummary) ( void* userData, - uint64_t time, - uint32_t process, - uint32_t peer, - uint32_t comm, - uint32_t type, - uint64_t sentNumber, - uint64_t receivedNumber, - uint64_t sentBytes, - uint64_t receivedBytes, - OTF_KeyValueList *list ); - -/* # OTF_COLLOPSUMMARY_RECORD */ -typedef int (OTF_Handler_CollopSummary) ( void *userData, - uint64_t time, - uint32_t process, - uint32_t comm, - uint32_t collective, - uint64_t sentNumber, - uint64_t receivedNumber, - uint64_t sentBytes, - uint64_t receivedBytes, - OTF_KeyValueList *list ); - -/* # OTF_FILEOPERATIONSUMMARY_RECORD */ -typedef int (OTF_Handler_FileOperationSummary) ( void* userData, - uint64_t time, - uint32_t fileid, - uint32_t process, - uint64_t nopen, - uint64_t nclose, - uint64_t nread, - uint64_t nwrite, - uint64_t nseek, - uint64_t bytesread, - uint64_t byteswrite, - OTF_KeyValueList *list ); - -/* # OTF_FILEGROUPOPERATIONSUMMARY_RECORD */ -typedef int (OTF_Handler_FileGroupOperationSummary) ( void* userData, - uint64_t time, - uint32_t groupid, - uint32_t process, - uint64_t nopen, - uint64_t nclose, - uint64_t nread, - uint64_t nwrite, - uint64_t nseek, - uint64_t bytesread, - uint64_t byteswrite, - OTF_KeyValueList *list ); - -/* # OTF_UNKNOWN_RECORD */ -typedef int (OTF_Handler_UnknownRecord) ( void *userData, - uint64_t time, - uint32_t process, - const char *record ); - - -/* typedefs for OTF marker records **************************************** */ - - -/* # OTF_DEFMARKER_RECORD */ -typedef int (OTF_Handler_DefMarker) ( void *userData, - uint32_t stream, - uint32_t token, - const char* name, - uint32_t type, - OTF_KeyValueList *list ); - -/* # OTF_MARKER_RECORD */ -typedef int (OTF_Handler_Marker) ( void *userData, - uint64_t time, - uint32_t process, - uint32_t token, - const char* text, - OTF_KeyValueList *list ); - -/** @endcond */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_HANDLERARRAY_H */ - diff --git a/externals/otf/otflib/OTF_KeyValue.c b/externals/otf/otflib/OTF_KeyValue.c deleted file mode 100644 index 596c2c674e62f8e261549931330be8b959982021..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_KeyValue.c +++ /dev/null @@ -1,717 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch, Johannes Spazier -*/ - -#include "OTF_KeyValue.h" -#include "OTF_Errno.h" - -#include <stdlib.h> -#include <string.h> - -uint8_t OTF_KeyValueList_getValue(OTF_KeyValueList *list, uint32_t key, OTF_Type otf_type, OTF_Value *otf_value); - - -OTF_KeyValueList *OTF_KeyValueList_new() { - - OTF_KeyValueList *list = (OTF_KeyValueList*) malloc( sizeof(OTF_KeyValueList) ); - - if (list == NULL) { - /* error: not enough memory left */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - return NULL; - } - - list->kvBegin = (OTF_KeyValuePairList*) malloc( sizeof(OTF_KeyValuePairList) ); - - if (list->kvBegin == NULL) { - /* error: not enough memory left */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - free(list); - - return NULL; - } - - list->kvBegin->kvNext = NULL; - - list->kvEnd = list->kvCurrent = list->kvBegin; - - list->count = 0; - list->size = 1; - - if( OTF_KeyValueList_realloc(list, 9) ) { - /* an error ocurred while realloc */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_KeyValueList_close(list); - return NULL; - } - - return list; -} - -uint8_t OTF_KeyValueList_close(OTF_KeyValueList* list) { - - OTF_KeyValuePairList *next; - OTF_KeyValuePairList *p; - - if (list == NULL) { - /* error */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no list has been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - return 1; - } - - p = list->kvBegin; - - while (p->kvNext != NULL) { - next = p->kvNext; - free(p); - p = next; - } - - free(p); - free(list); - - return 0; -} - -uint8_t OTF_KeyValueList_reset(OTF_KeyValueList* list) { - - /*OTF_KeyValuePairList *next; - OTF_KeyValuePairList *p; - int num = 0;*/ - - if ( list == NULL) { - /* error */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no list has been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - return 1; - } - - list->kvCurrent = list->kvBegin; - list->count = 0; - - - /* deallocate memory, reduce size. */ - /* this is likely slower than keep the allocated memory */ - -/* - p = list->kvBegin; - - while (p != NULL && num < 9) { - p = p->kvNext; - num++; - } - - list->size = 10; - list->kvEnd = p; - p = p->kvNext; - - while (p != NULL) { - next = p->kvNext; - free(p); - p = next; - } - - list->kvEnd->kvNext = NULL; -*/ - - return 0; -} - -uint8_t OTF_KeyValueList_realloc(OTF_KeyValueList* list, uint32_t num) { - - uint32_t i; - OTF_KeyValuePairList *p; - - if (list == NULL) { - /* error */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no list has been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - return 1; - } - - p = list->kvEnd; - - for( i=0; i<num; i++ ) { - p->kvNext = (OTF_KeyValuePairList*) malloc( sizeof(OTF_KeyValuePairList) ); - - if( p->kvNext == NULL) { - /* error: not enough memory left */ - /* maybe some memory was allocated before, therefore increase list */ - list->kvEnd = p; - list->size += i; - - return 1; - } - - p = p->kvNext; - p->kvNext = NULL; - } - - list->kvEnd = p; - - list->size += num; - - return 0; -} - -uint8_t OTF_KeyValueList_appendPair(OTF_KeyValueList* list, OTF_KeyValuePair pair) { - - OTF_KeyValuePairList *p; - uint32_t i; - - if (list == NULL) { - /* error */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no list has been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - return 255; - } - - p = list->kvBegin; - - /* check if key already exists */ - for ( i=0; i<list->count; i++) { - if ( p->kvPair.key == pair.key ) { - return 1; - } - p = p->kvNext; - } - - p = list->kvCurrent; - - if ( (list->size - list->count) <= 1 ) { - if( OTF_KeyValueList_realloc(list, 10) ) { - /* an error ocurred while realloc */ - if ( (list->size - list->count) < 1 ) { - /* if no memory left, return with error */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 255; - } - } - } - - p->kvPair = pair; - list->kvCurrent = p->kvNext; - list->count++; - - return 0; -} - - -uint8_t OTF_KeyValueList_appendChar(OTF_KeyValueList* list, uint32_t key, char value) { - - OTF_KeyValuePair pair; - - pair.key = key; - pair.type = OTF_CHAR; - pair.value.otf_char = value; - - return OTF_KeyValueList_appendPair(list, pair); -} - - -uint8_t OTF_KeyValueList_appendInt8(OTF_KeyValueList* list, uint32_t key, int8_t value) { - - OTF_KeyValuePair pair; - - pair.key = key; - pair.type = OTF_INT8; - pair.value.otf_int8 = value; - - return OTF_KeyValueList_appendPair(list, pair); -} - - -uint8_t OTF_KeyValueList_appendUint8(OTF_KeyValueList* list, uint32_t key, uint8_t value) { - - OTF_KeyValuePair pair; - - pair.key = key; - pair.type = OTF_UINT8; - pair.value.otf_uint8 = value; - - return OTF_KeyValueList_appendPair(list, pair); -} - - -uint8_t OTF_KeyValueList_appendInt16(OTF_KeyValueList* list, uint32_t key, int16_t value) { - - OTF_KeyValuePair pair; - - pair.key = key; - pair.type = OTF_INT16; - pair.value.otf_int16 = value; - - return OTF_KeyValueList_appendPair(list, pair); -} - - -uint8_t OTF_KeyValueList_appendUint16(OTF_KeyValueList* list, uint32_t key, uint16_t value) { - - OTF_KeyValuePair pair; - - pair.key = key; - pair.type = OTF_UINT16; - pair.value.otf_uint16 = value; - - return OTF_KeyValueList_appendPair(list, pair); -} - - -uint8_t OTF_KeyValueList_appendInt32(OTF_KeyValueList* list, uint32_t key, int32_t value) { - - OTF_KeyValuePair pair; - - pair.key = key; - pair.type = OTF_INT32; - pair.value.otf_int32 = value; - - return OTF_KeyValueList_appendPair(list, pair); -} - - -uint8_t OTF_KeyValueList_appendUint32(OTF_KeyValueList* list, uint32_t key, uint32_t value) { - - OTF_KeyValuePair pair; - - pair.key = key; - pair.type = OTF_UINT32; - pair.value.otf_uint32 = value; - - return OTF_KeyValueList_appendPair(list, pair); -} - - -uint8_t OTF_KeyValueList_appendInt64(OTF_KeyValueList* list, uint32_t key, int64_t value) { - - OTF_KeyValuePair pair; - - pair.key = key; - pair.type = OTF_INT64; - pair.value.otf_int64 = value; - - return OTF_KeyValueList_appendPair(list, pair); -} - - -uint8_t OTF_KeyValueList_appendUint64(OTF_KeyValueList* list, uint32_t key, uint64_t value) { - - OTF_KeyValuePair pair; - - pair.key = key; - pair.type = OTF_UINT64; - pair.value.otf_uint64 = value; - - return OTF_KeyValueList_appendPair(list, pair); -} - - -uint8_t OTF_KeyValueList_appendFloat(OTF_KeyValueList* list, uint32_t key, float value) { - - OTF_KeyValuePair pair; - - pair.key = key; - pair.type = OTF_FLOAT; - pair.value.otf_float = value; - - return OTF_KeyValueList_appendPair(list, pair); -} - - -uint8_t OTF_KeyValueList_appendDouble(OTF_KeyValueList* list, uint32_t key, double value) { - - OTF_KeyValuePair pair; - - pair.key = key; - pair.type = OTF_DOUBLE; - pair.value.otf_double = value; - - return OTF_KeyValueList_appendPair(list, pair); -} - - -uint8_t OTF_KeyValueList_appendByteArray(OTF_KeyValueList* list, uint32_t key, uint8_t *value, uint8_t len) { - - OTF_KeyValuePair pair; - - if (len > OTF_KEYVALUE_MAX_ARRAY_LEN) { - len = OTF_KEYVALUE_MAX_ARRAY_LEN; - } - - pair.key = key; - pair.type = OTF_BYTE_ARRAY; - - memcpy(pair.value.otf_byte_array.array, value, len); - pair.value.otf_byte_array.len = len; - - return OTF_KeyValueList_appendPair(list, pair); -} - - -uint8_t OTF_KeyValueList_appendKeyValueList(OTF_KeyValueList *dest_list, OTF_KeyValueList *source_list) { - - OTF_KeyValuePairList *p; - uint32_t i; - - if ( source_list == NULL) { - return 1; - } - - p = source_list->kvBegin; - - for( i = 0; i < source_list->count; i++ ) { - - if ( 255 == OTF_KeyValueList_appendPair(dest_list, p->kvPair) ) { - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "error while appending OTF_KeyValueList.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 1; - } - - p = p->kvNext; - } - - return 0; -} - - - -double OTF_Int64ToDouble(uint64_t value) { - double *d = (double*) &value; - - return *d; -} - -uint64_t OTF_DoubleToInt64(double value) { - uint64_t *i = (uint64_t*) &value; - - return *i; -} - -float OTF_Int32ToFloat(uint32_t value) { - float *d = (float*) &value; - - return *d; -} - -uint32_t OTF_FloatToInt32(float value) { - uint32_t *i = (uint32_t*) &value; - - return *i; -} - -uint8_t OTF_KeyValueList_getValue(OTF_KeyValueList *list, uint32_t key, OTF_Type otf_type, OTF_Value *otf_value) { - - OTF_KeyValuePairList *p; - uint32_t i; - - if (list == NULL) { - /* error */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no list has been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - return 255; - } - - p = list->kvBegin; - - /* search key */ - for ( i=0; i<list->count; i++) { - if ( p->kvPair.key == key ) { - if ( p->kvPair.type == otf_type) { - *otf_value = p->kvPair.value; - /* found matching key and type, all right */ - return 0; - } else { - /* type of found key differs */ - return 2; - } - } - p = p->kvNext; - } - - /* no key in list matches the searched key */ - return 1; - -} - -uint8_t OTF_KeyValueList_getChar(OTF_KeyValueList *list, uint32_t key, char *value) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_CHAR, &otf_value)) ) { - *value = otf_value.otf_char; - } - - return ret; - -} - -uint8_t OTF_KeyValueList_getInt8(OTF_KeyValueList *list, uint32_t key, int8_t *value) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_INT8, &otf_value)) ) { - *value = otf_value.otf_int8; - } - - return ret; - -} - -uint8_t OTF_KeyValueList_getUint8(OTF_KeyValueList *list, uint32_t key, uint8_t *value) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_UINT8, &otf_value)) ) { - *value = otf_value.otf_uint8; - } - - return ret; - -} - -uint8_t OTF_KeyValueList_getInt16(OTF_KeyValueList *list, uint32_t key, int16_t *value) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_INT16, &otf_value)) ) { - *value = otf_value.otf_int16; - } - - return ret; - -} - -uint8_t OTF_KeyValueList_getUint16(OTF_KeyValueList *list, uint32_t key, uint16_t *value) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_UINT16, &otf_value)) ) { - *value = otf_value.otf_uint16; - } - - return ret; - -} - -uint8_t OTF_KeyValueList_getInt32(OTF_KeyValueList *list, uint32_t key, int32_t *value) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_INT32, &otf_value)) ) { - *value = otf_value.otf_int32; - } - - return ret; - -} - -uint8_t OTF_KeyValueList_getUint32(OTF_KeyValueList *list, uint32_t key, uint32_t *value) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_UINT32, &otf_value)) ) { - *value = otf_value.otf_uint32; - } - - return ret; - -} - -uint8_t OTF_KeyValueList_getInt64(OTF_KeyValueList *list, uint32_t key, int64_t *value) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_INT64, &otf_value)) ) { - *value = otf_value.otf_int64; - } - - return ret; - -} - -uint8_t OTF_KeyValueList_getUint64(OTF_KeyValueList *list, uint32_t key, uint64_t *value) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_UINT64, &otf_value)) ) { - *value = otf_value.otf_uint64; - } - - return ret; - -} - -uint8_t OTF_KeyValueList_getFloat(OTF_KeyValueList *list, uint32_t key, float *value) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_FLOAT, &otf_value)) ) { - *value = otf_value.otf_float; - } - - return ret; - -} - -uint8_t OTF_KeyValueList_getDouble(OTF_KeyValueList *list, uint32_t key, double *value) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_DOUBLE, &otf_value)) ) { - *value = otf_value.otf_double; - } - - return ret; - -} - -uint8_t OTF_KeyValueList_getByteArray(OTF_KeyValueList *list, uint32_t key, uint8_t *value, uint8_t *len) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_BYTE_ARRAY, &otf_value)) ) { - *len = otf_value.otf_byte_array.len; - memcpy(value, otf_value.otf_byte_array.array, *len); - } - - return ret; - -} - -uint8_t OTF_KeyValueList_getArrayLength(OTF_KeyValueList *list, uint32_t key, uint8_t *len) { - - OTF_Value otf_value; - int ret; - - if( ! (ret = OTF_KeyValueList_getValue(list, key, OTF_BYTE_ARRAY, &otf_value)) ) { - *len = otf_value.otf_byte_array.len; - } - - return ret; - -} - -OTF_Type OTF_KeyValueList_getTypeForKey(OTF_KeyValueList *list, uint32_t key) { - - OTF_KeyValuePairList *p; - uint32_t i; - - if (list == NULL) { - /* error */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no list has been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return -2; - } - - p = list->kvBegin; - - /* search key */ - for ( i=0; i<list->count; i++) { - if ( p->kvPair.key == key ) { - /* found matching key, all right, return type */ - return p->kvPair.type; - } - p = p->kvNext; - } - - return -1; -} - -uint8_t OTF_KeyValueList_hasKey(OTF_KeyValueList *list, uint32_t key) { - - OTF_KeyValuePairList *p; - uint32_t i; - - if (list == NULL) { - /* error */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no list has been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 2; - } - - p = list->kvBegin; - - /* search key */ - for ( i=0; i<list->count; i++) { - if ( p->kvPair.key == key ) { - /* found matching key, all right, return true */ - return 0; - } - p = p->kvNext; - } - - /* key not found, return false */ - return 1; -} - -uint8_t OTF_KeyValueList_getKeyByIndex(OTF_KeyValueList *list, uint32_t index, uint32_t *key) { - - OTF_KeyValuePairList *p; - uint32_t i; - - if (list == NULL) { - /* error */ - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no list has been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 2; - } - - if (index >= list->count) { - /* no key for this index */ - return 1; - } - - p = list->kvBegin; - - /* go to key */ - for ( i=0; i<index; i++) { - p = p->kvNext; - } - - /* save found key for index */ - *key = p->kvPair.key; - - return 0; -} - -uint32_t OTF_KeyValueList_getCount(OTF_KeyValueList *list) { - - return list->count; -} - diff --git a/externals/otf/otflib/OTF_KeyValue.h b/externals/otf/otflib/OTF_KeyValue.h deleted file mode 100644 index 80dac1502d94387ec4168bc5e3280cd5d1519361..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_KeyValue.h +++ /dev/null @@ -1,866 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch, Johannes Spazier -*/ - -/** - * @file OTF_KeyValue.h - * - * @brief Provides an additional list of key value pairs that can be added to records. - * - * \ingroup keyvalue - */ - - -/** - * \defgroup keyvalue KeyValueList Interface - * - * Provides an additional list of key-value pairs that can be added to records. - * - * \section keyvalue_write_example A short Example of writing a KeyValueList - * - * You can append key-value pairs to an OTF_KeyValueList instance that can be added to any record. - * - * After one call to OTF_Writer_writeXxxKV() the given KeyValueList instance will be empty. - * - * \code - * #include <assert.h> - * #include "otf.h" - * - * int main( int argc, char** argv ) { - * - * OTF_FileManager* manager; - * OTF_Writer* writer; - * OTF_KeyValueList* KeyValueList; - * - * manager= OTF_FileManager_open( 100 ); - * assert( manager ); - * - * writer = OTF_Writer_open( "mytrace", 1, manager ); - * assert( writer ); - * \endcode - * - * Initialize the prior declared OTF_KeyValueList. - * - * \code - * KeyValueList = OTF_KeyValueList_new(); - * \endcode - * - * Write a DefKeyValue record that assigns key=1 to name="first_arg" with description="first argument of function" and type=OTF_INT32. - * \code - * OTF_Writer_writeDefKeyValue( writer, 0, 1, OTF_INT32, "first_arg", "first argument of function" ); - * \endcode - * - * Append a signed integer for key=1 to the initialized KeyValueList. - * \code - * OTF_KeyValueList_appendInt32( KeyValueList, 1, 25); - * \endcode - * - * Write the entries of the KeyValueList together with the enter record. - * Afterwards the KeyValueList will be empty! - * \code - * OTF_Writer_writeEnterKV( writer, 10000, 100, 1, 0, KeyValueList ); - * \endcode - * - * Clean up before exiting the program. Close the OTF_KeyValueList. - * \code - * OTF_KeyValueList_close( KeyValueList ); - * OTF_Writer_close( writer ); - * OTF_FileManager_close( manager ); - * - * return 0; - * } - * \endcode - * - * Compile this using $ gcc -o write write.c `otfconfig --libs`. - * - * - * \section keyvalue_read_example A short Example of reading from a KeyValueList - * - * \code - * #include <assert.h> - * #include <stdio.h> - * #include <string.h> - * #include "otf.h" - * - * int global_key = 0; - * - * \endcode - * - * Define a callback to read all DefKeyValue records. - * \code - * int handleDefKeyValue( void* userData, uint32_t stream, uint32_t key, OTF_Type type, const char* name, const char *description ) { - * \endcode - * - * Find out which key you are looking for. - * \code - * if( strcmp( name, "first_arg") == 0 ) { - * global_key = key; - * } - * - * return OTF_RETURN_OK; - * } - * \endcode - * - * Define a callback to read all enter records. - * \code - * int handleEnter (void *userData, uint64_t time, uint32_t function, uint32_t process, uint32_t source, OTF_KeyValueList *list) { - * - * int value; - * - * \endcode - * - * Ask for a key value pair with key=global_key. Save the value in variable "value". - * \code - * switch( OTF_KeyValueList_getInt32( list, global_key, &value) ) { - * case 0: - * printf("We entered function %u with argument %d\n", function, value); - * break; - * case 1: - * printf("We entered function %u with no argument.\n", function); - * break; - * default: - * printf("An error occurred while asking for key value pair.\n"); - * } - * - * return OTF_RETURN_OK; - * } - * - * \endcode - * - * main() includes the common instructions to read an .otf-file. - * \code - * int main( int argc, char** argv ) { - * - * OTF_FileManager* manager; - * OTF_Reader* reader; - * OTF_HandlerArray* handlers; - * - * manager= OTF_FileManager_open( 100 ); - * assert( manager ); - * - * handlers = OTF_HandlerArray_open(); - * assert( handlers ); - * - * reader = OTF_Reader_open( "mytrace", manager ); - * assert( reader ); - * - * OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefKeyValue, OTF_DEFKEYVALUE_RECORD ); - * OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleEnter, OTF_ENTER_RECORD ); - * - * OTF_Reader_readDefinitions( reader, handlers ); - * OTF_Reader_readEvents( reader, handlers ); - * - * OTF_Reader_close( reader ); - * OTF_HandlerArray_close( handlers ); - * OTF_FileManager_close( manager ); - * - * return 0; - * } - * \endcode - * - * Compile this using $ gcc -o read read.c `otfconfig --libs`. - * - */ - -#ifndef OTF_KEYVALUE_H -#define OTF_KEYVALUE_H - -#include "OTF_inttypes.h" -#include "OTF_Definitions.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/** An enum which holds all OTF datatypes that are relevant for OTF_KeyValueList. \ingroup miscellaneous */ -typedef enum OTF_Type_enum { - OTF_CHAR = 0, /**< */ - OTF_INT8 = 1, /**< */ - OTF_UINT8 = 2, /**< */ - OTF_INT16 = 3, /**< */ - OTF_UINT16 = 4, /**< */ - OTF_INT32 = 5, /**< */ - OTF_UINT32 = 6, /**< */ - OTF_INT64 = 7, /**< */ - OTF_UINT64 = 8, /**< */ - OTF_FLOAT = 9, /**< */ - OTF_DOUBLE = 10, /**< */ - OTF_BYTE_ARRAY = 11 /**< */ -} OTF_Type; - -/** @cond OTF_KeyValue */ - -/** the following lines are ignored by doxygen */ - -typedef struct byte_array_struct { - uint8_t array[OTF_KEYVALUE_MAX_ARRAY_LEN]; - uint8_t len; -} byte_array; - -typedef union OTF_Value_union { - char otf_char; - int8_t otf_int8; - uint8_t otf_uint8; - int16_t otf_int16; - uint16_t otf_uint16; - int32_t otf_int32; - uint32_t otf_uint32; - int64_t otf_int64; - uint64_t otf_uint64; - float otf_float; - double otf_double; - byte_array otf_byte_array; -} OTF_Value; - -typedef struct OTF_KeyValuePair_struct { - uint32_t key; - OTF_Type type; - OTF_Value value; -} OTF_KeyValuePair; - -typedef struct OTF_KeyValuePairList_struct { - OTF_KeyValuePair kvPair; - struct OTF_KeyValuePairList_struct *kvNext; -} OTF_KeyValuePairList; - -struct OTF_KeyValueList_struct { - uint32_t count; - uint32_t size; - OTF_KeyValuePairList *kvBegin; - OTF_KeyValuePairList *kvEnd; - OTF_KeyValuePairList *kvCurrent; -}; - -/** @endcond */ - -/** Object type which holds an OTF KeyValueList.*/ -typedef struct OTF_KeyValueList_struct OTF_KeyValueList; - -/** - * Create a new OTF_KeyValueList instance. - * - * @return Initialized OTF_KeyValueList instance or NULL if an error - * occurred. - * - * \ingroup keyvalue - */ -OTF_KeyValueList *OTF_KeyValueList_new(void); - - -/** - * Close an OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @return 0 if instance was closed successfully and 1 otherwise. - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_close(OTF_KeyValueList* list); - - -/** - * Reset an OTF_KeyValueList instance without deallocating memory. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @return 0 on success, 1 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_reset(OTF_KeyValueList* list); - - -/** - * Expand an OTF_KeyValueList by allocating more memory. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param num Number of elements for which memory should be allocated. - * - * @return 0 on success, 1 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_realloc(OTF_KeyValueList* list, uint32_t num); - - -/** - * Append an OTF_KeyValuePair to a given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param pair An initialized OTF_KeyValuePair object. - * - * @return 0 on success, 1 if pair already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendPair(OTF_KeyValueList* list, OTF_KeyValuePair pair); - - -/** - * Append a character to a given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the KeyValueList. - * - * @param value A character that should be appended to the KeyValueList. - * - * @return 0 on success, 1 if key already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendChar(OTF_KeyValueList* list, uint32_t key, char value); - - -/** - * Append a signed integer of 8 bit to a OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the KeyValueList. - * - * @param value A signed integer of 8 bit that should be appended to the KeyValueList. - * - * @return 0 on success, 1 if key already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendInt8(OTF_KeyValueList* list, uint32_t key, int8_t value); - - -/** - * Append an unsigned integer of 8 bit to a OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the KeyValueList. - * - * @param value An unsigned integer of 8 bit that should be appended to the KeyValueList. - * - * @return 0 on success, 1 if key already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendUint8(OTF_KeyValueList* list, uint32_t key, uint8_t value); - - -/** - * Append a signed integer of 16 bit to a OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the KeyValueList. - * - * @param value A signed integer of 16 bit that should be appended to the KeyValueList. - * - * @return 0 on success, 1 if key already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendInt16(OTF_KeyValueList* list, uint32_t key, int16_t value); - - -/** - * Append an unsigned integer of 16 bit to a OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the KeyValueList. - * - * @param value An unsigned integer of 16 bit that should be appended to the KeyValueList. - * - * @return 0 on success, 1 if key already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendUint16(OTF_KeyValueList* list, uint32_t key, uint16_t value); - - -/** - * Append a signed integer of 32 bit to a OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the KeyValueList. - * - * @param value A signed integer of 32 bit that should be appended to the KeyValueList. - * - * @return 0 on success, 1 if key already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendInt32(OTF_KeyValueList* list, uint32_t key, int32_t value); - - -/** - * Append an unsigned integer of 32 bit to a OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the KeyValueList. - * - * @param value An unsigned integer of 32 bit that should be appended to the KeyValueList. - * - * @return 0 on success, 1 if key already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendUint32(OTF_KeyValueList* list, uint32_t key, uint32_t value); - - -/** - * Append a signed integer of 64 bit to a OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the KeyValueList. - * - * @param value A signed integer of 64 bit that should be appended to the KeyValueList. - * - * @return 0 on success, 1 if key already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendInt64(OTF_KeyValueList* list, uint32_t key, int64_t value); - - -/** - * Append an unsigned integer of 64 bit to a given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the KeyValueList. - * - * @param value An unsigned integer of 64 bit that should be appended to the KeyValueList. - * - * @return 0 on success, 1 if key already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendUint64(OTF_KeyValueList* list, uint32_t key, uint64_t value); - - -/** - * Append a float to a given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the KeyValueList. - * - * @param value A float that should be appended to the KeyValueList. - * - * @return 0 on success, 1 if key already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendFloat(OTF_KeyValueList* list, uint32_t key, float value); - - -/** - * Append a double to a given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the KeyValueList. - * - * @param value A double that should be appended to the KeyValueList. - * - * @return 0 on success, 1 if key already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendDouble(OTF_KeyValueList* list, uint32_t key, double value); - - -/** - * Append a byte array to a given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the KeyValueList. - * - * @param value Pointer to a byte array that should be appended to the KeyValueList. - * - * @param len Lenght of byte array (max OTF_KEYVALUE_MAX_ARRAY_LEN Byte). - * - * @return 0 on success, 1 if key already in list and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendByteArray(OTF_KeyValueList* list, uint32_t key, uint8_t *value, uint8_t len); - - -/** - * Append an existing OTF_KeyValueList to a given OTF_KeyValueList instance. - * - * @param dest_list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param source_list Pointer to an initialized OTF_KeyValueList instance that shall be appended to the given KeyValueList. - * See also OTF_KeyValueList_new(); - * - * @return 0 on success, 1 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_appendKeyValueList(OTF_KeyValueList* dest_list, OTF_KeyValueList *source_list); - - -/** - * Read a character from the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param value Pointer to a char array, where the result is saved. - * - * @param key An unique id that identifies the value in the OTF_KeyValueList. - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getChar(OTF_KeyValueList *list, uint32_t key, char *value); - - -/** - * Read a signed integer of 8 bit from the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the OTF_KeyValueList. - * - * @param value Pointer to a signed integer of 8 bit, where the result is saved. - - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getInt8(OTF_KeyValueList *list, uint32_t key, int8_t *value); - - -/** - * Read an unsigned integer of 8 bit from the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the OTF_KeyValueList. - * - * @param value Pointer to an unsigned integer of 8 bit, where the result is saved. - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getUint8(OTF_KeyValueList *list, uint32_t key, uint8_t *value); - - -/** - * Read a signed integer of 16 bit from the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the OTF_KeyValueList. - * - * @param value Pointer to a signed integer of 16 bit, where the result is saved. - - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getInt16(OTF_KeyValueList *list, uint32_t key, int16_t *value); - - -/** - * Read an unsigned integer of 16 bit from the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the OTF_KeyValueList. - * - * @param value Pointer to an unsigned integer of 16 bit, where the result is saved. - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getUint16(OTF_KeyValueList *list, uint32_t key, uint16_t *value); - - -/** - * Read a signed integer of 32 bit from the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the OTF_KeyValueList. - * - * @param value Pointer to a signed integer of 32 bit, where the result is saved. - - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getInt32(OTF_KeyValueList *list, uint32_t key, int32_t *value); - - -/** - * Read an unsigned integer of 32 bit from the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the OTF_KeyValueList. - * - * @param value Pointer to an unsigned integer of 32 bit, where the result is saved. - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getUint32(OTF_KeyValueList *list, uint32_t key, uint32_t *value); - - -/** - * Read a signed integer of 64 bit from the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * @param key An unique id that identifies the value in the OTF_KeyValueList. - * - * - * @param value Pointer to a signed integer of 64 bit, where the result is saved. - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getInt64(OTF_KeyValueList *list, uint32_t key, int64_t *value); - - -/** - * Read an unsigned integer of 64 bit from the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * @param key An unique id that identifies the value in the OTF_KeyValueList. - * - * - * @param value Pointer to an unsigned integer of 64 bit, where the result is saved. - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getUint64(OTF_KeyValueList *list, uint32_t key, uint64_t *value); - - -/** - * Read a float from the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the OTF_KeyValueList. - * - * @param value Pointer to a float, where the result is saved. - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getFloat(OTF_KeyValueList *list, uint32_t key, float *value); - - -/** - * Read a double from the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the OTF_KeyValueList. - * - * @param value Pointer to a double, where the result is saved. - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getDouble(OTF_KeyValueList *list, uint32_t key, double *value); - - -/** - * Read a byte array from the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the value in the OTF_KeyValueList. - * - * @param value Pointer to a byte array, where the result is saved. - * - * @param len Pointer to an integer, where the lenght of array is saved. - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getByteArray(OTF_KeyValueList *list, uint32_t key, uint8_t *value, uint8_t *len); - - -/** - * Provides the lenght of a byte array in an OTF_KeyValueList instance by given key. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the pair in the OTF_KeyValueList. - * - * @param len Return value for the array length. - * - * @return 0 on success, 1 if key not found, 2 if type differs - * and 255 if an error occurs - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_getArrayLength(OTF_KeyValueList *list, uint32_t key, uint8_t *len); - - -/** - * Search for key in given OTF_KeyValueList instance and return its type. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key An unique id that identifies the pair in the OTF_KeyValueList. - * - * @return \sa OTF_Type on success, -1 if key not found and -2 if an error occurs. - * - * \ingroup keyvalue - */ -OTF_Type OTF_KeyValueList_getTypeForKey(OTF_KeyValueList *list, uint32_t key); - - -/** - * Search for key in the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @param key Token that shall be searched in the OTF_KeyValueList. - * - * @return 0 on success, -1 if key not found and -2 if an error occurs. - * - * \ingroup keyvalue - */ -uint8_t OTF_KeyValueList_hasKey(OTF_KeyValueList *list, uint32_t key); - - -/** - * Search for a key at the given index position. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * @param index Index position in the OTF_KeyValueList. - * - * @param key Return value for the found key. - * - * @return 0 on success, 1 if index not in list - * - * \ingroup keyvalue -*/ -uint8_t OTF_KeyValueList_getKeyByIndex(OTF_KeyValueList *list, uint32_t index, uint32_t *key); - - -/** - * Returns the number of elements in the given OTF_KeyValueList instance. - * - * @param list Pointer to an initialized OTF_KeyValueList object. See - * also OTF_KeyValueList_new(). - * - * @return Number of elements currently in list. - * - * \ingroup keyvalue -*/ -uint32_t OTF_KeyValueList_getCount(OTF_KeyValueList *list); - - -/** - * Convert an integer of 32 bit to a float. - * - * \ingroup keyvalue - */ -float OTF_Int32ToFloat(uint32_t value); - - -/** - * Convert a float to an integer of 32 bit. - * - * \ingroup keyvalue - */ -uint32_t OTF_FloatToInt32(float value); - - -/** - * Convert an integer of 64 bit to a double. - * - * \ingroup keyvalue - */ -double OTF_Int64ToDouble(uint64_t value); - - -/** - * Convert a double to a signed integer of 64 bit. - * - * \ingroup keyvalue - */ -uint64_t OTF_DoubleToInt64(double value); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_KEYVALUE_H */ - - diff --git a/externals/otf/otflib/OTF_Keywords.h b/externals/otf/otflib/OTF_Keywords.h deleted file mode 100644 index d7837395a4538830ae5a58f46a92c0aa633912e1..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Keywords.h +++ /dev/null @@ -1,434 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_Keywords.h - * - * @brief All record format keywords are located in this file. - * - * \ingroup internal - */ - - -#ifndef OTF_KEYWORDS_H -#define OTF_KEYWORDS_H - -#include "OTF_KeyValue.h" - -/* - -define all record format keywords here in order to have a single -spot for them. - -the keywords identifying record types must follow some special rules: - -1) all keywords are UPPER CASE - -2) no keyword must be equal to another keyword, prefixes are allowed though - -3) all definition records and only them have the prefix "DEF" or "D" - -4) all summary records and only them have the prefix "SUM" or "S" - -5) all status records and only them have the prefix "T" (better ideas?) - -7) the prefixes for definition, summary resp. status record types are - extra, the don't go into the specific definitions - see below - -8) there is always a long and a short version for every keyword marked with - _L_ and _S_. both versions might be equal, but always they have the - same first letter given by an additional macro marked with _F_ - -- white spaces after the keyword should be included in the keyword - -*/ - - -/* *** general keywords *** */ - - -#define OTF_KEYWORD_PROCESS_CHAR '*' - - -/* *** definition record keywords *** */ - -#define OTF_KEYWORD_L_DEF_PREFIX "DEF" -#define OTF_KEYWORD_S_DEF_PREFIX "D" - -#define OTF_KEYWORD_L_DEFTIMERRESOLUTION "TIMERRESOLUTION" -#define OTF_KEYWORD_S_DEFTIMERRESOLUTION "TR" -#define OTF_KEYWORD_F_DEFTIMERRESOLUTION 'T' - -#define OTF_KEYWORD_L_DEFPROCESS "PROCESS" -#define OTF_KEYWORD_S_DEFPROCESS "P" -#define OTF_KEYWORD_F_DEFPROCESS 'P' - -#define OTF_KEYWORD_L_DEFPROCESSGROUP "PROCESSGROUP" -#define OTF_KEYWORD_S_DEFPROCESSGROUP "PG" -#define OTF_KEYWORD_F_DEFPROCESSGROUP 'P' - -#define OTF_KEYWORD_L_DEFATTRLIST "ATTRIBUTELIST" -#define OTF_KEYWORD_S_DEFATTRLIST "A" -#define OTF_KEYWORD_F_DEFATTRLIST 'A' - -#define OTF_KEYWORD_L_DEFPROCESSORGROUPATTR "PROCESSORGROUPATTR" -#define OTF_KEYWORD_S_DEFPROCESSORGROUPATTR "PGA" -#define OTF_KEYWORD_F_DEFPROCESSORGROUPATTR 'P' - -#define OTF_KEYWORD_L_DEFFUNCTION "FUNCTION" -#define OTF_KEYWORD_S_DEFFUNCTION "F" -#define OTF_KEYWORD_F_DEFFUNCTION 'F' - -#define OTF_KEYWORD_L_DEFFUNCTIONGROUP "FUNCTIONGROUP" -#define OTF_KEYWORD_S_DEFFUNCTIONGROUP "FG" -#define OTF_KEYWORD_F_DEFFUNCTIONGROUP 'F' - -#define OTF_KEYWORD_L_DEFCOLLOP "COLLOP" -#define OTF_KEYWORD_S_DEFCOLLOP "CO" -#define OTF_KEYWORD_F_DEFCOLLOP 'C' - -#define OTF_KEYWORD_L_DEFCOUNTER "COUNTER" -#define OTF_KEYWORD_S_DEFCOUNTER "CNT" -#define OTF_KEYWORD_F_DEFCOUNTER 'C' - -#define OTF_KEYWORD_L_DEFCOUNTERGROUP "COUNTERGROUP" -#define OTF_KEYWORD_S_DEFCOUNTERGROUP "CG" -#define OTF_KEYWORD_F_DEFCOUNTERGROUP 'C' - -#define OTF_KEYWORD_L_DEFINITIONCOMMENT "COMMENT" -#define OTF_KEYWORD_S_DEFINITIONCOMMENT "CMT" -#define OTF_KEYWORD_F_DEFINITIONCOMMENT 'C' - -#define OTF_KEYWORD_L_DEFSCL "SCL" -#define OTF_KEYWORD_S_DEFSCL "S" -#define OTF_KEYWORD_F_DEFSCL 'S' - -#define OTF_KEYWORD_L_DEFSCLFILE "SCLFILE" -#define OTF_KEYWORD_S_DEFSCLFILE "SF" -#define OTF_KEYWORD_F_DEFSCLFILE 'S' - -#define OTF_KEYWORD_L_DEFVERSION "VERSION" -#define OTF_KEYWORD_S_DEFVERSION "V" -#define OTF_KEYWORD_F_DEFVERSION 'V' - -#define OTF_KEYWORD_L_DEFCREATOR "CREATOR" -#define OTF_KEYWORD_S_DEFCREATOR "CR" -#define OTF_KEYWORD_F_DEFCREATOR 'C' - -#define OTF_KEYWORD_L_DEFFILE "FILE" -#define OTF_KEYWORD_S_DEFFILE "FL" -#define OTF_KEYWORD_F_DEFFILE 'F' - -#define OTF_KEYWORD_L_DEFFILEGROUP "FILEGROUP" -#define OTF_KEYWORD_S_DEFFILEGROUP "FLG" -#define OTF_KEYWORD_F_DEFFILEGROUP 'F' - -#define OTF_KEYWORD_L_DEFKEYVALUE "KEYVALUE" -#define OTF_KEYWORD_S_DEFKEYVALUE "K" -#define OTF_KEYWORD_F_DEFKEYVALUE 'K' - -/* *** event record keywords *** */ - -#define OTF_KEYWORD_L_NOOP "NOOP" -#define OTF_KEYWORD_S_NOOP "N" -#define OTF_KEYWORD_F_NOOP 'N' - -#define OTF_KEYWORD_L_ENTER "ENTER" -#define OTF_KEYWORD_S_ENTER "E" -#define OTF_KEYWORD_F_ENTER 'E' - -#define OTF_KEYWORD_L_LEAVE "LEAVE" -#define OTF_KEYWORD_S_LEAVE "L" -#define OTF_KEYWORD_F_LEAVE 'L' - -#define OTF_KEYWORD_L_RECEIVE "RECEIVE" -#define OTF_KEYWORD_S_RECEIVE "R" -#define OTF_KEYWORD_F_RECEIVE 'R' - -#define OTF_KEYWORD_L_SEND "SEND" -#define OTF_KEYWORD_S_SEND "S" -#define OTF_KEYWORD_F_SEND 'S' - -#define OTF_KEYWORD_L_COUNTER "COUNTER" -#define OTF_KEYWORD_S_COUNTER "CNT" -#define OTF_KEYWORD_F_COUNTER 'C' - -#define OTF_KEYWORD_L_COLLECTIVEOPERATION "COLLOP" -#define OTF_KEYWORD_S_COLLECTIVEOPERATION "COP" -#define OTF_KEYWORD_F_COLLECTIVEOPERATION 'C' - -#define OTF_KEYWORD_L_EVENTCOMMENT "#EVTCOMMENT" -#define OTF_KEYWORD_S_EVENTCOMMENT "#" -#define OTF_KEYWORD_F_EVENTCOMMENT '#' - -#define OTF_KEYWORD_L_BEGINPROCESS "PROCESSBEGIN" -#define OTF_KEYWORD_S_BEGINPROCESS "PB" -#define OTF_KEYWORD_F_BEGINPROCESS 'P' - -#define OTF_KEYWORD_L_ENDPROCESS "PROCESSEND" -#define OTF_KEYWORD_S_ENDPROCESS "PE" -#define OTF_KEYWORD_F_ENDPROCESS 'P' - -#define OTF_KEYWORD_L_FILEOPERATION "FILEOP" -#define OTF_KEYWORD_S_FILEOPERATION "F" -#define OTF_KEYWORD_F_FILEOPERATION 'F' - -#define OTF_KEYWORD_L_RMAPUT "TRMAPUT" -#define OTF_KEYWORD_S_RMAPUT "T" -#define OTF_KEYWORD_F_RMAPUT 'T' - -#define OTF_KEYWORD_L_RMAPUTRE "URMAPUTRE" -#define OTF_KEYWORD_S_RMAPUTRE "U" -#define OTF_KEYWORD_F_RMAPUTRE 'U' - -#define OTF_KEYWORD_L_RMAGET "GRMAGET" -#define OTF_KEYWORD_S_RMAGET "G" -#define OTF_KEYWORD_F_RMAGET 'G' - -#define OTF_KEYWORD_L_RMAEND "MRMAEND" -#define OTF_KEYWORD_S_RMAEND "M" -#define OTF_KEYWORD_F_RMAEND 'M' - -#define OTF_KEYWORD_L_BEGINCOLLECTIVEOPERATION "COLLOPBEGIN" -#define OTF_KEYWORD_S_BEGINCOLLECTIVEOPERATION "COPB" -#define OTF_KEYWORD_F_BEGINCOLLECTIVEOPERATION 'C' - -#define OTF_KEYWORD_L_ENDCOLLECTIVEOPERATION "COLLOPEND" -#define OTF_KEYWORD_S_ENDCOLLECTIVEOPERATION "COPE" -#define OTF_KEYWORD_F_ENDCOLLECTIVEOPERATION 'C' - -/* the OLD/NEW thing for begin as well to make begin and end handled the same */ - -#define OTF_KEYWORD_L_BEGINFILEOPERATION_OLD "FILEOPBEGIN" -#define OTF_KEYWORD_S_BEGINFILEOPERATION_OLD "FB" -#define OTF_KEYWORD_F_BEGINFILEOPERATION_OLD 'F' - -#define OTF_KEYWORD_L_BEGINFILEOPERATION_NEW "FILEOPBEGINNEW" -#define OTF_KEYWORD_S_BEGINFILEOPERATION_NEW "FA" -#define OTF_KEYWORD_F_BEGINFILEOPERATION_NEW 'F' - -/* the OLD/NEW thing fixes upward compatibility after changing the record contents */ -#define OTF_KEYWORD_L_ENDFILEOPERATION_OLD "FILEOPEND" -#define OTF_KEYWORD_S_ENDFILEOPERATION_OLD "FE" -#define OTF_KEYWORD_F_ENDFILEOPERATION_OLD 'F' - -#define OTF_KEYWORD_L_ENDFILEOPERATION_NEW "FILEOPENDNEW" -#define OTF_KEYWORD_S_ENDFILEOPERATION_NEW "FF" -#define OTF_KEYWORD_F_ENDFILEOPERATION_NEW 'F' - -/* *** summary record keywords *** */ - - -#define OTF_KEYWORD_L_SUM_PREFIX "SUM" -#define OTF_KEYWORD_S_SUM_PREFIX "S" -#define OTF_KEYWORD_F_SUM_PREFIX 'S' - -#define OTF_KEYWORD_L_SUMFUNCTION "FUNCTION" -#define OTF_KEYWORD_S_SUMFUNCTION "F" -#define OTF_KEYWORD_F_SUMFUNCTION 'F' - -#define OTF_KEYWORD_L_SUMFUNCTIONGROUP "FUNCTIONGROUP" -#define OTF_KEYWORD_S_SUMFUNCTIONGROUP "G" -#define OTF_KEYWORD_F_SUMFUNCTIONGROUP 'G' - -#define OTF_KEYWORD_L_SUMMESSAGE "MESSAGE" -#define OTF_KEYWORD_S_SUMMESSAGE "M" -#define OTF_KEYWORD_F_SUMMESSAGE 'M' - -#define OTF_KEYWORD_L_COLLOPMESSAGE "COLLMESSAGE" -#define OTF_KEYWORD_S_COLLOPMESSAGE "CO" -#define OTF_KEYWORD_F_COLLOPMESSAGE 'C' - -#define OTF_KEYWORD_L_SUMCOMMENT "COMMENT" -#define OTF_KEYWORD_S_SUMCOMMENT "C" -#define OTF_KEYWORD_F_SUMCOMMENT 'C' - -#define OTF_KEYWORD_L_SUMFILEOPERATION "FILEOPERATION" -#define OTF_KEYWORD_S_SUMFILEOPERATION "FL" -#define OTF_KEYWORD_F_SUMFILEOPERATION 'F' - -#define OTF_KEYWORD_L_SUMFILEGROUPOPERATION "FILEGROUPOPERATION" -#define OTF_KEYWORD_S_SUMFILEGROUPOPERATION "FLG" -#define OTF_KEYWORD_F_SUMFILEGROUPOPERATION 'F' - -/* *** status record keywords *** */ - - -#define OTF_KEYWORD_L_STATUS_PREFIX "T" -#define OTF_KEYWORD_S_STATUS_PREFIX "T" - - -/* *** snapshot keywords */ - - -#define OTF_KEYWORD_L_SNAPSHOT_PREFIX "T" -#define OTF_KEYWORD_S_SNAPSHOT_PREFIX "T" -#define OTF_KEYWORD_F_SNAPSHOT_PREFIX 'T' - -#define OTF_KEYWORD_L_SNAPSHOT_ENTER "ENTER" -#define OTF_KEYWORD_S_SNAPSHOT_ENTER "E" -#define OTF_KEYWORD_F_SNAPSHOT_ENTER 'E' - -#define OTF_KEYWORD_L_SNAPSHOT_SEND "SEND" -#define OTF_KEYWORD_S_SNAPSHOT_SEND "S" -#define OTF_KEYWORD_F_SNAPSHOT_SEND 'S' - -#define OTF_KEYWORD_L_SNAPSHOT_COMMENT "COMMENT" -#define OTF_KEYWORD_S_SNAPSHOT_COMMENT "C" -#define OTF_KEYWORD_F_SNAPSHOT_COMMENT 'C' - -#define OTF_KEYWORD_L_SNAPSHOT_OPENFILE "OPENFILE" -#define OTF_KEYWORD_S_SNAPSHOT_OPENFILE "OF" -#define OTF_KEYWORD_F_SNAPSHOT_OPENFILE 'O' - -#define OTF_KEYWORD_L_SNAPSHOT_BEGINCOLLOP "BEGINCOLLOP" -#define OTF_KEYWORD_S_SNAPSHOT_BEGINCOLLOP "BC" -#define OTF_KEYWORD_F_SNAPSHOT_BEGINCOLLOP 'B' - -#define OTF_KEYWORD_L_SNAPSHOT_BEGINFILEOP "BEGINFILEOP" -#define OTF_KEYWORD_S_SNAPSHOT_BEGINFILEOP "BF" -#define OTF_KEYWORD_F_SNAPSHOT_BEGINFILEOP 'B' - -/* *** marker keywords */ - - -#define OTF_KEYWORD_L_MARKER_PREFIX "MARKER" -#define OTF_KEYWORD_S_MARKER_PREFIX "M" -#define OTF_KEYWORD_F_MARKER_PREFIX 'M' - -#define OTF_KEYWORD_L_MARKER_DEFMARKER "DEF" -#define OTF_KEYWORD_S_MARKER_DEFMARKER "D" -#define OTF_KEYWORD_F_MARKER_DEFMARKER 'D' - -#define OTF_KEYWORD_L_MARKER_MARKERSPOT "SPOT" -#define OTF_KEYWORD_S_MARKER_MARKERSPOT "S" -#define OTF_KEYWORD_F_MARKER_MARKERSPOT 'S' - - -/* *** keyvalue keywords *** */ -#define OTF_KEYWORD_L_KEYVALUE_PREFIX "KEY" -#define OTF_KEYWORD_S_KEYVALUE_PREFIX "K" -#define OTF_KEYWORD_F_KEYVALUE_PREFIX 'K' - - -/* *** local keywords *** */ - - -#define OTF_KEYWORD_L_LOCAL_BYTES "BYTES" -#define OTF_KEYWORD_S_LOCAL_BYTES "B" - -#define OTF_KEYWORD_L_LOCAL_BYTESREAD "BYTESREAD" -#define OTF_KEYWORD_S_LOCAL_BYTESREAD "BR" - -#define OTF_KEYWORD_L_LOCAL_BYTESWRITE "BYTESWRITE" -#define OTF_KEYWORD_S_LOCAL_BYTESWRITE "BW" - -#define OTF_KEYWORD_L_LOCAL_COLLECTIVE "COLL" -#define OTF_KEYWORD_S_LOCAL_COLLECTIVE "CL" - -#define OTF_KEYWORD_L_LOCAL_COMMUNICATOR "COMM" -#define OTF_KEYWORD_S_LOCAL_COMMUNICATOR "C" - -#define OTF_KEYWORD_L_LOCAL_COUNT "COUNT" -#define OTF_KEYWORD_S_LOCAL_COUNT "N" - -#define OTF_KEYWORD_L_LOCAL_DURATION "DUR" -#define OTF_KEYWORD_S_LOCAL_DURATION "D" - -#define OTF_KEYWORD_L_LOCAL_EXCLTIME "EXCL" -#define OTF_KEYWORD_S_LOCAL_EXCLTIME "E" - -#define OTF_KEYWORD_L_LOCAL_FILE "FILE" -#define OTF_KEYWORD_S_LOCAL_FILE "F" - -#define OTF_KEYWORD_L_LOCAL_GROUP "GROUP" -#define OTF_KEYWORD_S_LOCAL_GROUP "G" - -#define OTF_KEYWORD_L_LOCAL_HANDLEID "HANDLEID" -#define OTF_KEYWORD_S_LOCAL_HANDLEID "H" - -#define OTF_KEYWORD_L_LOCAL_INCLTIME "INCL" -#define OTF_KEYWORD_S_LOCAL_INCLTIME "I" - -#define OTF_KEYWORD_L_LOCAL_LENGTH "LEN" -#define OTF_KEYWORD_S_LOCAL_LENGTH "L" - -#define OTF_KEYWORD_L_LOCAL_LINE "LINE" -#define OTF_KEYWORD_S_LOCAL_LINE "LN" - -#define OTF_KEYWORD_L_LOCAL_MATCHID "MATCHID" -#define OTF_KEYWORD_S_LOCAL_MATCHID "MI" - -#define OTF_KEYWORD_L_LOCAL_MEMBERS "MEMBERS" -#define OTF_KEYWORD_S_LOCAL_MEMBERS "M" - -#define OTF_KEYWORD_L_LOCAL_NAME "NAME" -#define OTF_KEYWORD_S_LOCAL_NAME "NM" - -#define OTF_KEYWORD_L_LOCAL_NUMBERSENT "NUMSENT" -#define OTF_KEYWORD_S_LOCAL_NUMBERSENT "NS" - -#define OTF_KEYWORD_L_LOCAL_NUMBERCLOSE "NUMCLOSE" -#define OTF_KEYWORD_S_LOCAL_NUMBERCLOSE "NC" - -#define OTF_KEYWORD_L_LOCAL_NUMBERREAD "NUMREAD" -#define OTF_KEYWORD_S_LOCAL_NUMBERREAD "NRD" - -#define OTF_KEYWORD_L_LOCAL_NUMBERRECVD "NUMRECVD" -#define OTF_KEYWORD_S_LOCAL_NUMBERRECVD "NR" - -#define OTF_KEYWORD_L_LOCAL_NUMBERSEEK "NUMSEEK" -#define OTF_KEYWORD_S_LOCAL_NUMBERSEEK "NSK" - -#define OTF_KEYWORD_L_LOCAL_NUMBEROPEN "NUMOPEN" -#define OTF_KEYWORD_S_LOCAL_NUMBEROPEN "NO" - -#define OTF_KEYWORD_L_LOCAL_NUMBERWRITE "NUMWRITTEN" -#define OTF_KEYWORD_S_LOCAL_NUMBERWRITE "NW" - -#define OTF_KEYWORD_L_LOCAL_OPERATION "OPERATION" -#define OTF_KEYWORD_S_LOCAL_OPERATION "OP" - -#define OTF_KEYWORD_L_LOCAL_OTIME "OTIME" -#define OTF_KEYWORD_S_LOCAL_OTIME "O" - -#define OTF_KEYWORD_L_LOCAL_PARENT "PARENT" -#define OTF_KEYWORD_S_LOCAL_PARENT "PT" - -#define OTF_KEYWORD_L_LOCAL_PROPERTIES "PROPERTIES" -#define OTF_KEYWORD_S_LOCAL_PROPERTIES "P" - -#define OTF_KEYWORD_L_LOCAL_RECVD "RECVD" -#define OTF_KEYWORD_S_LOCAL_RECVD "R" - -#define OTF_KEYWORD_L_LOCAL_ROOT "ROOT" -#define OTF_KEYWORD_S_LOCAL_ROOT "RT" - -#define OTF_KEYWORD_L_LOCAL_SCL "SCL" -#define OTF_KEYWORD_S_LOCAL_SCL "X" - -#define OTF_KEYWORD_L_LOCAL_SENT "SENT" -#define OTF_KEYWORD_S_LOCAL_SENT "S" - -#define OTF_KEYWORD_L_LOCAL_TAG "TAG" -#define OTF_KEYWORD_S_LOCAL_TAG "T" - -#define OTF_KEYWORD_L_LOCAL_TYPE "TYPE" -#define OTF_KEYWORD_S_LOCAL_TYPE "Y" - -#define OTF_KEYWORD_L_LOCAL_UNIT "UNIT" -#define OTF_KEYWORD_S_LOCAL_UNIT "U" - -#define OTF_KEYWORD_L_LOCAL_VALUE "VALUE" -#define OTF_KEYWORD_S_LOCAL_VALUE "V" - -#define OTF_KEYWORD_L_LOCAL_TIME "TIME" -#define OTF_KEYWORD_S_LOCAL_TIME "T" - -#define OTF_KEYWORD_L_LOCAL_PROCESS "PROCESS" -#define OTF_KEYWORD_S_LOCAL_PROCESS "P" - - -#endif /* OTF_KEYWORDS_H */ diff --git a/externals/otf/otflib/OTF_MasterControl.c b/externals/otf/otflib/OTF_MasterControl.c deleted file mode 100644 index 1385947164964da4fb635c4136dd787603d35582..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_MasterControl.c +++ /dev/null @@ -1,984 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "OTF_Platform.h" -#include "OTF_MasterControl.h" -#include "OTF_Errno.h" - - -/** constructor - internal use only */ -int OTF_MasterControl_init( OTF_MasterControl* mc ); - -/** destructor - internal use only */ -void OTF_MasterControl_finalize( OTF_MasterControl* mc ); - -/** reset mapping to empty, keep file manager manager reference */ -void OTF_MasterControl_reset( OTF_MasterControl* mc ); - - -/** Get the map entry with the given argument. If not yet there, create it - - internal use only */ -OTF_MapEntry* OTF_MasterControl_getMapEntry( OTF_MasterControl* mc, - uint32_t argument ); - -/** Insert a new map entry with given argument at specified pos - - internal use only, called by OTF_MasterControl_getMapEntry() */ -OTF_MapEntry* OTF_MasterControl_insertMapEntry( OTF_MasterControl* mc, - uint32_t argument, uint32_t pos ); - -/** Insert the value into the map entry. */ -int OTF_MapEntry_insertValue( OTF_MapEntry* mc, uint32_t value ); - - -/** Insert a new reverse map entry value -> argument - the given mapping _must_not_ be included so far - return 1 on success, 0 if duplicate - - internal use only */ -int OTF_MasterControl_insertRMapEntry( OTF_MasterControl* mc, - uint32_t value, uint32_t argument ); - - -/* ************************************************************************** */ - - -int OTF_MasterControl_init( OTF_MasterControl* mc ) { - - - mc->n= 0; - mc->s= 0; - mc->map= NULL; - - mc->rn= 0; - mc->rs= 0; - mc->rmap= NULL; - - mc->manager= NULL; - - return 1; -} - - -void OTF_MasterControl_finalize( OTF_MasterControl* mc ) { - - - uint32_t i; - - - for ( i= 0; i < mc->n; i++ ) { - - free( mc->map[i].values ); - } - - free( mc->map ); - mc->map= NULL; - free( mc->rmap ); - mc->rmap= NULL; -} - - -void OTF_MasterControl_reset( OTF_MasterControl* mc ) { - - - uint32_t i; - - - for ( i= 0; i < mc->n; i++ ) { - - free( mc->map[i].values ); - } - - free( mc->map ); - mc->n= 0; - mc->s= 0; - mc->map= NULL; - - free( mc->rmap ); - mc->rn= 0; - mc->rs= 0; - mc->rmap= NULL; -} - - -void OTF_MasterControl_finish( OTF_MasterControl* mc ) { - - - OTF_MasterControl_close( mc ); - - OTF_fprintf( stderr, "OTF_MasterControl_finish() deprecated, " - "use OTF_MasterControl_close() instead\n" ); -} - - -void OTF_MasterControl_close( OTF_MasterControl* mc ) { - - - OTF_MasterControl_finalize( mc ); - - free( mc ); - mc = NULL; -} - - -int OTF_MasterControl_read( OTF_MasterControl* mc, const char* namestub ) { - - - char* filename; - OTF_RBuffer* buffer; - - uint32_t argument; - uint32_t value; - - int r; - - - /* OTF_fprintf( stderr, "OTF_MasterControl_read()\n" ); */ - - if( NULL == mc ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "master control has not been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - /* finalize + init == reset */ - OTF_MasterControl_reset( mc ); - - filename = OTF_getFilename( namestub, - 0 /* id */, - OTF_FILETYPE_MASTER /* type */, - 0, NULL ); - - if ( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_getFilename() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - -/* - if ( ! OTF_fileExists( filename ) ) { - - OTF_fprintf( stderr, "ERROR in '%s'.c: " - "Invalid input file '%s'\n", __FUNCTION__, filename ); - return 0; - } -*/ - - buffer = OTF_RBuffer_open( filename, mc->manager ); - if( NULL == buffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "could not open file \"%s\" for reading.\n", - __FUNCTION__, __FILE__, __LINE__, filename ); - - free( filename ); - filename = NULL; - - return 0; - } - - OTF_RBuffer_setSize( buffer, 1024 ); - - /* OTF_fprintf( stderr, "filename=%s\n", filename ); */ - - free( filename ); - filename = NULL; - - /* must not use getRecord here! */ - while ( OTF_RBuffer_guaranteeRecord( buffer ) ) { - - /* - OTF_RBuffer_printRecord( buffer ); - */ - - /* read argument */ - argument= OTF_RBuffer_readUint32( buffer ); - if ( ! OTF_RBuffer_testChar( buffer, ':' ) ) { - - OTF_RBuffer_readNewline( buffer ); - continue; - } - - /* OTF_fprintf( stderr ,"arg= %x\n", argument ); */ - - do { - - value= OTF_RBuffer_readUint32( buffer ); - - /* OTF_fprintf( stderr ," v= %x\n", value ); */ - - r= OTF_MasterControl_append( mc, argument, value ); - if ( 0 == r ) { - - OTF_fprintf( stderr ,"OTF_MasterControl_read() " - "ERROR: appending (%u,%u)\n", - argument, value ); - } - - } while ( OTF_RBuffer_testChar( buffer, ',' ) ); - - - OTF_RBuffer_readNewline( buffer ); - } - - OTF_RBuffer_close( buffer ); - - return 1; -} - - -OTF_MasterControl* OTF_MasterControl_new( OTF_FileManager* manager ) { - - - OTF_MasterControl* ret; - - - ret= (OTF_MasterControl*) malloc( sizeof(OTF_MasterControl) ); - if( NULL == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - OTF_MasterControl_init( ret ); - - if( NULL == manager ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "manager has not been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( ret ); - ret= NULL; - - return NULL; - } - ret->manager= manager; - - return ret; -} - - -OTF_MapEntry* OTF_MasterControl_insertMapEntry( OTF_MasterControl* mc, - uint32_t argument, uint32_t pos ) { - - - unsigned int i; - - - /* realloc ? */ - if ( mc->n >= mc->s ) { - - mc->s= ( mc->s > 0 ) ? ( 2* mc->s ) : 10; - mc->map= (OTF_MapEntry*) realloc( mc->map, - mc->s * sizeof(OTF_MapEntry) ); - if( NULL == mc->map ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - } - - /* move all entries at >= pos one up */ - for ( i= mc->n; i > pos; i-- ) { - - memcpy( &(mc->map[i]), &(mc->map[i-1]), sizeof(OTF_MapEntry) ); - } - - /* insert new entry */ - mc->map[pos].argument= argument; - mc->map[pos].n= 0; - mc->map[pos].s= 0; - mc->map[pos].values= NULL; - - mc->n++; - - return &(mc->map[pos]); -} - - -OTF_MapEntry* OTF_MasterControl_getMapEntry( OTF_MasterControl* mc, - uint32_t argument ) { - - - unsigned int a= 0; - unsigned int b= mc->n; - unsigned int c; - - - if ( 0 == mc->n ) { - - /* empty list, insert at 0 */ - - return OTF_MasterControl_insertMapEntry( mc, argument, 0 ); - } - - - if ( mc->map[a].argument > argument ) { - - /* insert at very beginning */ - - return OTF_MasterControl_insertMapEntry( mc, argument, 0 ); - } - - if ( mc->map[b-1].argument < argument ) { - - /* insert at very end */ - - return OTF_MasterControl_insertMapEntry( mc, argument, b ); - } - - - if ( mc->map[a].argument == argument ) { - - /* found at a */ - - return &( mc->map[a] ); - } - - if ( mc->map[b-1].argument == argument ) { - - /* found at b */ - - return &( mc->map[b-1] ); - } - - - /* some where in [a,b), do binary search */ - - - while ( 1 ) { - - if ( b-1 == a ) { - - /* not found, insert at a+1 == b */ - return OTF_MasterControl_insertMapEntry( mc, argument, b ); - } - - c= ( a + b ) / 2; - - if ( mc->map[c].argument == argument ) { - - /* found at c */ - - return &( mc->map[c] ); - } - - if ( mc->map[c].argument < argument ) { - - a= c; - - } else /* if ( mc->map[c].argument > argument ) */ { - - b= c; - } - } -} - - -int OTF_MapEntry_insertValue( OTF_MapEntry* mc, uint32_t value ) { - - - unsigned int i; - unsigned int j; - unsigned int last; - unsigned int middle; - - - /* realloc ? */ - if ( mc->n >= mc->s ) { - - mc->s= ( mc->s > 0 ) ? ( 2* mc->s ) : 10; - mc->values= (uint32_t*) realloc( mc->values, - mc->s * sizeof(uint32_t) ); - if( NULL == mc->values ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - } - - - /* first entry */ - if ( mc->n == 0 ) { - - mc->values[0] = value; - mc->n++; - return 1; - } - - /* search sorted list binary, - move remaining entries, insert*/ - - i = 0; - last = mc->n-1; - - while ( i < last+1 ) { - - middle = ( i + last ) / 2; - - if( mc->values[middle] < value ) { - - i = middle + 1; - - } else if( mc->values[middle] > value ) { - - last = middle - 1; - - } else { - - /* ERROR: value already there */ - return 0; - } - } - - /* move al entries at > i one up */ - for ( j= mc->n; j > i; j-- ) { - - mc->values[j]= mc->values[j-1]; - } - - mc->values[i]= value; - - mc->n++; - - return 1; -} - - -int OTF_MasterControl_insertRMapEntry( OTF_MasterControl* mc, - uint32_t rargument, uint32_t rvalue ) { - - - unsigned int i; - unsigned int j; - unsigned int last; - unsigned int middle; - - - /* realloc ? */ - if ( mc->rn >= mc->rs ) { - - mc->rs= ( mc->rs > 0 ) ? ( 2* mc->rs ) : 10; - mc->rmap= (OTF_Pair*) realloc( mc->rmap, - mc->rs * sizeof(OTF_Pair) ); - if( NULL == mc->rmap ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - } - - /* search sorted list binary, move remaining entries, insert*/ - - i = 0; - last = mc->rn-1; - - while ( i < last+1 ) { - - middle = ( i + last ) / 2; - - if ( mc->rmap[middle].argument < rargument ) { - - i = middle + 1; - - } else if( mc->rmap[middle].argument > rargument ) { - - last = middle - 1; - - } else { - - /* ERROR: value already there */ - return 0; - } - } - - /* move al entries at > i one up */ - for ( j= mc->rn; j > i; j-- ) { - - mc->rmap[j].argument= mc->rmap[j-1].argument; - mc->rmap[j].value= mc->rmap[j-1].value; - } - - mc->rmap[i].argument= rargument; - mc->rmap[i].value= rvalue; - - mc->rn++; - - return 1; -} - - -int OTF_MasterControl_append( OTF_MasterControl* mc, - uint32_t argument, uint32_t value ) { - - - int ret; - OTF_MapEntry* entry; - - - if ( 0 == argument || ((uint32_t) -1) == argument ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "invalid argument value %x.\n", - __FUNCTION__, __FILE__, __LINE__, argument ); - - return 0; - } - - /* insert into reverse mapping first, abort if value is - already there in rmap. it is important to check rmap first! */ - ret= OTF_MasterControl_insertRMapEntry( mc, value, argument ); - - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_insertRMapEntry() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - - entry = OTF_MasterControl_getMapEntry( mc, argument ); - if( NULL == entry ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_getMapEntry() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - return OTF_MapEntry_insertValue( entry, value ); -} - - -int OTF_MasterControl_appendList( OTF_MasterControl* mc, uint32_t argument, - uint32_t l, uint32_t* values ) { - - - uint32_t i; - int ret= 1; - - - for ( i= 0; i < l; i++ ) { - - ret&= OTF_MasterControl_append( mc, argument, values[i] ); - } - - return ret; -} - - -uint32_t OTF_MasterControl_mapReverse( OTF_MasterControl* mc, - uint32_t value ) { - - - /* find value in reverse list */ - - unsigned int a; - unsigned int b; - unsigned int c; - - a= 0; - b= mc->rn; - - /* - OTF_fprintf( stderr, "OTF_MasterControl_mapReverse\n" ); - for ( c= a; c < b; ++c ) { - - OTF_fprintf( stderr, " %u: %u\n", - mc->rmap[c].argument, - mc->rmap[c].value ); - } - */ - - if ( 0 >= mc->rn ) { - - return 0; - } - - if ( value == mc->rmap[a].argument ) { - - return mc->rmap[a].value; - } - - if ( value == mc->rmap[b-1].argument ) { - - return mc->rmap[b-1].value; - } - - while ( a < b ) { - - c= ( a + b ) / 2; - - if ( value == mc->rmap[c].argument ) { - - /* found */ - return mc->rmap[c].value; - } - - if ( value < mc->rmap[c].argument ) { - - /* [a,c) */ - b= c; - - } else { - - /* [c+1,b) */ - a= c+1; - } - } - - return 0; -} - - - -int OTF_MasterControl_write( OTF_MasterControl* mc, const char* namestub ) { - - - char* filename= NULL; - - unsigned int i; - unsigned int j; - OTF_MapEntry* e; - OTF_WBuffer* buffer; - - - filename= OTF_getFilename( namestub, - 0 /* id */, OTF_FILETYPE_MASTER /* type */, - 0, NULL ); - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_getFilename() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - buffer = OTF_WBuffer_open( filename, mc->manager ); - if ( NULL == buffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_open( %s ) failed.\n", - __FUNCTION__, __FILE__, __LINE__, filename ); - - return 0; - } - - OTF_WBuffer_setSize( buffer, 1024 ); - - free( filename ); - filename = NULL; - - - for ( i= 0; i < mc->n; i++ ) { - - e= &(mc->map[i]); - - OTF_WBuffer_writeUint32( buffer, e->argument ); - OTF_WBuffer_writeChar( buffer, ':' ); - - if ( 0 < e->n ) { - - OTF_WBuffer_writeUint32( buffer, e->values[0] ); - } - - for ( j= 1; j < e->n; j++ ) { - - OTF_WBuffer_writeChar( buffer, ',' ); - OTF_WBuffer_writeUint32( buffer, e->values[j] ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - OTF_WBuffer_close( buffer ); - - return 1; -} - - -int OTF_MasterControl_check( OTF_MasterControl* mc ) { - - - unsigned int i; - unsigned int j; - OTF_MapEntry* e; - - - /* check if everything is properly sorted */ - - /* map sorted? */ - for ( i= 1; i < mc->n; i++ ) { - - if ( mc->map[i].argument <= mc->map[i-1].argument ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "map not sorted at %u.\n", - __FUNCTION__, __FILE__, __LINE__, i ); - - return 0; - } - } - - - /* map[x] sorted? */ - for ( i= 0; i < mc->n; i++ ) { - - e= &(mc->map[i]); - - for ( j= 1; j < e->n; j++ ) { - - if ( e->values[j] <= e->values[j-1] ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "map[%u] not sorted at %u.\n", - __FUNCTION__, __FILE__, __LINE__, i, j ); - - return 0; - } - } - } - - /* rmap sorted */ - for ( i= 1; i < mc->rn; i++ ) { - - if ( mc->rmap[i].argument <= mc->rmap[i-1].argument ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "rmap not sorted at %u.\n", - __FUNCTION__, __FILE__, __LINE__, i ); - - return 0; - } - } - - return 1; -} - - -void OTF_MasterControl_print( OTF_MasterControl* mc ) { - - - unsigned int i; - unsigned int j; - OTF_MapEntry* e; - - - OTF_fprintf( stderr, "map:\n" ); - for ( i= 0; i < mc->n; i++ ) { - - e= &(mc->map[i]); - - OTF_fprintf( stderr, "%x: ", e->argument ); - - for ( j= 0; j < e->n; j++ ) { - - OTF_fprintf( stderr, "%x ", e->values[j] ); - } - - OTF_fprintf( stderr, "\n" ); - } - - OTF_fprintf( stderr, "rmap:\n" ); - for ( i= 0; i < mc->rn; i++ ) { - - OTF_fprintf( stderr, "%x: %x\n", - mc->rmap[i].argument, mc->rmap[i].value ); - } -} - - -OTF_MapEntry* OTF_MasterControl_getEntry( OTF_MasterControl* mc, - uint32_t argument ) { - - - uint32_t i; - uint32_t last; - uint32_t middle; - - - if ( mc->n == 0 ) { - - return NULL; - } - - i = 0; - last = mc->n-1; - - while ( i < last+1 ) { - - middle = ( i + last ) / 2; - - if ( mc->map[middle].argument < argument ) { - - i = middle + 1; - - } else if ( mc->map[middle].argument > argument ) { - - last = middle - 1; - - } else { - - /* argument already there */ - return &( mc->map[middle] ); - } - } - - /* argument not found */ - - return NULL; -} - - -OTF_MapEntry* OTF_MasterControl_getEntryByIndex( OTF_MasterControl* mc, - uint32_t index ) { - - - if ( index < mc->n ) { - - return &( mc->map[index] ); - } - - return NULL; -} - - - -OTF_Pair* OTF_MasterControl_getREntryByIndex( OTF_MasterControl* mc, - uint32_t index ) { - - - if ( index < mc->rn ) { - - return &( mc->rmap[index] ); - } - - return NULL; -} - - -uint32_t OTF_MasterControl_getCount( OTF_MasterControl* mc ) { - - - return mc->n; -} - -uint32_t OTF_MasterControl_getrCount( OTF_MasterControl* mc ) { - - - return mc->rn; -} - - -uint32_t OTF_MasterControl_getValueCount( OTF_MasterControl* mc, - uint32_t argument ) { - - - OTF_MapEntry* entry= OTF_MasterControl_getEntry( mc, argument ); - - if ( NULL != entry ) { - - return entry->n; - } - - return 0; -} - - -uint32_t* OTF_MasterControl_getValues( OTF_MasterControl* mc, - uint32_t argument ) { - - - uint32_t i; - uint32_t last; - uint32_t middle; - - - if ( mc->n == 0 ) { - - return NULL; - } - - i = 0; - last = mc->n-1; - - while ( i < last+1 ) { - - middle = ( i + last ) / 2; - - if( mc->map[middle].argument < argument ) { - - i = middle + 1; - - } else if ( mc->map[middle].argument > argument ) { - - last = middle - 1; - - } else { - - return mc->map[middle].values; - } - } - - /* argument not found */ - - return NULL; -} - - -uint32_t OTF_MasterControl_getNewStreamId( OTF_MasterControl* mc ) { - - - uint32_t n= mc->n; - - /* return smallest possible stream id by default, 0 is reserved */ - uint32_t ret= 1; - - - if ( 0 < n ) { - - /* increment the current maximum argument by 1 */ - ret= mc->map[n-1].argument +1; - - /* catch the worst case where the 0 and (-1) are - already taken */ - - while ( NULL != OTF_MasterControl_getEntry(mc, ret ) || - 0 == ret || ((uint32_t) -1) == ret ) { - - ++ret; - } - } - - return ret; -} - - diff --git a/externals/otf/otflib/OTF_MasterControl.h b/externals/otf/otflib/OTF_MasterControl.h deleted file mode 100644 index d5c432fac6c395ad378a98186b35a6be76f59b01..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_MasterControl.h +++ /dev/null @@ -1,463 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_MasterControl.h - * - * @brief Provides access to process-stream-mapping, which are located in - * .otf files. - * - * \ingroup mc - */ - -/** \defgroup mc Master Control Interface - * - * This interface is dedicated to managing master control files ( *.otf ) - * A master control file contains a mapping from process streams - * to processes and vice versa. - * - * \section mc_example A simple Example - * - * This is example will create a simple mapping and read it again to - * show how reading and writing works with the master control file. - * - * The need for creating your own master control file arises when you are not - * using the highlevel reader/writer, but the stream reader/writer. - * - * - * \code - * #include <stdio.h> - * #include <assert.h> - * #include "otf.h" - * - * int main( int argc, char** argv ) { - * \endcode - * - * Declare a couple of variables. - * \code - * uint32_t streamcount; - * uint32_t a; - * uint32_t i; - * OTF_MapEntry* entry; - * OTF_FileManager* manager; - * OTF_MasterControl* mc; - * \endcode - * - * Initialize the file manager and the mastercontrol. - * \code - * manager= OTF_FileManager_open( 100 ); - * assert( manager ); - * - * mc = OTF_MasterControl_new( manager ); - * \endcode - * - * Add four processes (100,101,102,103) to two streams (1,2) - * \code - * OTF_MasterControl_append( mc, 1, 100 ); - * OTF_MasterControl_append( mc, 1, 101 ); - * OTF_MasterControl_append( mc, 2, 102 ); - * OTF_MasterControl_append( mc, 2, 103 ); - * \endcode - * - * Write everything to the file "mytrace.otf" - * and close the master control. - * \code - * OTF_MasterControl_write( mc, "mytrace" ); - * OTF_MasterControl_close( mc ); - * \endcode - * - * Now initialize the master control structure and read the - * newly written master control file. - * \code - * mc = OTF_MasterControl_new( manager ); - * OTF_MasterControl_read( mc, "mytrace" ); - * \endcode - * - * Visit all stream-process pairs and print them out - * \code - * streamcount = OTF_MasterControl_getCount( mc ); - * - * for( i = 0; i < streamcount; ++i ) { - * entry = OTF_MasterControl_getEntryByIndex( mc, i ); - * for( a = 0; a < entry->n; ++a ) { - * printf( " stream %u contains process %u\n", entry->argument, - * entry->values[a] ); - * } - * } - * \endcode - * - * Clean everything up before exiting the program - * \code - * OTF_MasterControl_close( mc ); - * - * - * return 0; - * } - * \endcode - * - * Compile this using $ gcc -o test test.c `otfconfig --libs`. - * - * The program will show this output: - * \verbatim - * stream 1 contains process 100 - * stream 1 contains process 101 - * stream 2 contains process 102 - * stream 2 contains process 103 \endverbatim - * - * */ - -#ifndef OTF_MASTERCONTROL_H -#define OTF_MASTERCONTROL_H - - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - - -#include "OTF_inttypes.h" - - -#include "OTF_File.h" -#include "OTF_Filenames.h" -#include "OTF_WBuffer.h" -#include "OTF_RBuffer.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** entry for 1:n mapping */ -struct struct_OTF_MapEntry { - - /** Unique argument ids. (stream ids) */ - uint32_t argument; - - /** Current number of entries in 'values'. */ - uint32_t n; - - /** Current size of array 'values'. */ - uint32_t s; - - /** List of size 's' containing 'n' sorted entries of unique value ids - (process ids). */ - uint32_t* values; -}; -/** entry for 1:n mapping \ingroup mc */ -typedef struct struct_OTF_MapEntry OTF_MapEntry; - - -/** entry for 1:1 mapping */ -struct struct_OTF_Pair { - - uint32_t argument; - uint32_t value; -}; -/** entry for 1:1 mapping \ingroup mc */ -typedef struct struct_OTF_Pair OTF_Pair; - - -/** Data structure that collects the information about which stream contains - which parts of a multi-file trace. This is supposed to be an 1:1 copy of - the information in the master control file. */ -struct struct_OTF_MasterControl { - - - /** Current number of entries in 'map'. */ - uint32_t n; - - /** Current size of array 'map'. */ - uint32_t s; - - /** Mapping from stream ids (argument) to process ids (values). - 1:n mapping since a stream can contain multiple processes. - This mapping is the authoritative source as listed in the master - control file. */ - OTF_MapEntry* map; - - - /** Current number of entries in 'rmap'. */ - uint32_t rn; - - /** Current size of array 'rmap'. */ - uint32_t rs; - - /** Reverse mapping to 'map'. this is an 1:1 mapping since every - process belongs to exactly one stream. - This recursive mapping is to be derived from the authoritative source - in 'map'. */ - OTF_Pair* rmap; - - /** file handle manager */ - OTF_FileManager* manager; -}; -/** master control object. This object contains all information of the master - * control file. \ingroup mc */ -typedef struct struct_OTF_MasterControl OTF_MasterControl; - - -/** - * Creates an empty OTF_MasterControl object. - * The returned object must be freed by OTF_MasterControl_close(). - * - * @param manager File handle manager. - * - * @return newly created master control object - * - * \ingroup mc - */ -OTF_MasterControl* OTF_MasterControl_new( OTF_FileManager* manager ); - - -/** - * INTERFACE CHANGED! - * Read a master control file according to namestub, reset the _existing_ - * OTF_MasterControl structure and fill it according to the file. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * - * @return 1 on success, 0 if an error occurs - * - * \ingroup mc - */ -int OTF_MasterControl_read(OTF_MasterControl* mc, const char* namestub ); - - -/** Destructor, delete OTF_MasterControl object. DEPRECATED \ingroup mc*/ -void OTF_MasterControl_finish( OTF_MasterControl* mc ); - -/** - * Deletes a OTF_MasterControl object. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * - * \ingroup mc - */ -void OTF_MasterControl_close( OTF_MasterControl* mc ); - -/** - * Append the mapping argument -> value to the master control structure, - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * @param argument Represents the stream identifier. - * @param value Represents the process identifier. - * - * @return 1 on sucess, 0 if an error occurs (e.g. the new pair - * conflicts with the current mapping). - * - * \ingroup mc - */ -int OTF_MasterControl_append( OTF_MasterControl* mc, - uint32_t argument, uint32_t value ); - - -/** - * Append the mapping argument -> ( list of l values ) to the master control - * structure. This is equal to calling 'OTF_MasterControl_append()' with every - * value in list separately. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * @param argument Represents the stream identifier. - * @param l Number of elements in the value array. - * @param values Array of process identifiers belonging to the stream. - * - * @return 1 on success, 0 if an error occurs (e.g. the new entries - * conflict with the current mapping). - * - * - * - * \ingroup mc - */ -int OTF_MasterControl_appendList( OTF_MasterControl* mc, uint32_t argument, - uint32_t l, uint32_t* values ); - - -/** - * Returns the argument to the given value. If no mapping was defined - * make up a new one. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * @param value Represents the process identifier. - * - * @return Argument to which the value belongs to. - * - * \ingroup mc - */ -uint32_t OTF_MasterControl_mapReverse( OTF_MasterControl* mc, uint32_t value ); - - -/** - * Writes a master control file with the current contents of the given - * object. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * @param namestub File name prefix which. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup mc - */ -int OTF_MasterControl_write( OTF_MasterControl* mc, const char* namestub ); - - -/** - * Checks if the current mapping is consistent in itself. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * - * @return 1 on success, 0 if the mapping is not consistent in itself. - * - * \ingroup mc - */ -int OTF_MasterControl_check( OTF_MasterControl* mc ); - - -/** - * Prints the mapping to stderr. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * - * \ingroup mc - */ -void OTF_MasterControl_print( OTF_MasterControl* mc ); - - -/** - * Returns the entry for the given argument. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * @param argument Represents the stream identifier. - * - * @return The map entry belonging to the argument, or NULL if an error - * occurs. - * - * \ingroup mc - */ -OTF_MapEntry* OTF_MasterControl_getEntry( OTF_MasterControl* mc, - uint32_t argument ); - - -/** - * Returns the entry for the given index. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * @param index Index of the entry to return. - * - * @return The map entry belonging to the index, or NULL if the index - * exceeds the mapping. - * - * \ingroup mc - */ -OTF_MapEntry* OTF_MasterControl_getEntryByIndex( OTF_MasterControl* mc, - uint32_t index ); - - -/** - * Returns a pair of value and argument for the given index. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * @param index Index of the pair in the reverse mapping. - * - * @return Pair of value and argument belonging - * to the index, or NULL if the index exceeds the reverse - * mapping. - * - * \ingroup mc - */ -OTF_Pair* OTF_MasterControl_getREntryByIndex( OTF_MasterControl* mc, - uint32_t index ); - - -/** - * Returns the number of arguments in the current list. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * - * @return Number of entrys in the current list. - * (equals the number of streams) - * - * \ingroup mc - */ -uint32_t OTF_MasterControl_getCount( OTF_MasterControl* mc ); - -/** - * Returns the number of arguments in current reverse list. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * - * @return Number of entrys in the current reverse list. - * (equals the number of processes) - * - * \ingroup mc - */ -uint32_t OTF_MasterControl_getrCount( OTF_MasterControl* mc ); - -/** - * Returns the number of values for the given argument. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * @param argument Represents the stream identifier. - * - * @return Number of values for the given argument, or - * 0 if the argument is unknown. - * - * \ingroup mc - */ -uint32_t OTF_MasterControl_getValueCount( OTF_MasterControl* mc, - uint32_t argument ); - - -/** - * Returns a pointer to the value array for 'argument'. Get size of list with - * 'OTF_MasterControl_getValueCount()'. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * @param argument Represents the stream identifier. - * - * @return Pointer to the value array for 'argument', or NULL if an - * error occurs. - * - * \ingroup mc - */ -uint32_t* OTF_MasterControl_getValues( OTF_MasterControl* mc, - uint32_t argument ); - - -/** - * Returns a previously unused argument. Of course, one cannot avoid - * collisions with arguments explicitly defined later on. - * - * @param mc Pointer to an initialized OTF_Mastercontrol object. See also - * OTF_MasterControl_new(). - * - * @return Unused argument. - * - * \ingroup mc - */ -uint32_t OTF_MasterControl_getNewStreamId( OTF_MasterControl* mc ); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_MASTERCONTROL_H */ - diff --git a/externals/otf/otflib/OTF_Parse.c b/externals/otf/otflib/OTF_Parse.c deleted file mode 100644 index 6fc5575cbb927f5eb1d30c1dd4b08bb27c611016..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Parse.c +++ /dev/null @@ -1,4812 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "OTF_Definitions.h" -#include "OTF_Platform.h" -#include "OTF_Parse.h" -#include "OTF_Keywords.h" -#include "OTF_Errno.h" - - -/* *** local headers *** **************************************************** */ - -/* *** Definition records *** ************************************* */ - - -/** This function reads a COMMENT record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefinitionComment( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFTIMERRESOLUTION record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefTimerResolution( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFPROCESS record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefProcess( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFPROCESSGROUP record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefProcessGroup( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFATTRLIST record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefAttributeList( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFPROCESSORGROUPATTR record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefProcessOrGroupAttributes( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFFUNCTION record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefFunction( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFFUNCTIONGROUP record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefFunctionGroup( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFCOLLOP record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefCollectiveOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFCOUNTER record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefCounter( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFCOUNTERGROUP record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefCounterGroup( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFSCL record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefScl( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFSCLFILE record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefSclFile( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFVERSION record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefVersion( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFCREATOR record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefCreator( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFFILE record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefFile( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** This function reads a DEFFILEGROUP record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefFileGroup( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -int OTF_Reader_readDefKeyValue( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - - -/* *** Event records *** ****************************************** */ - - -/** This function reads a NOOP record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readNoOp( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a COMMENT record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readEventComment( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a COUNTER record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readCounter( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads an ENTER record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readEnter( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a LEAVE record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readLeave( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a COLLECTIVEOPERATION record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readCollectiveOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a BEGINCOLLECTIVEOPERATION record from buffer, - parses the parameter of the record and calls the - appropriate handler.*/ -int OTF_Reader_readBeginCollectiveOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads an ENDCOLLECTIVEOPERATION record from buffer, - parses the parameter of the record and calls the - appropriate handler.*/ -int OTF_Reader_readEndCollectiveOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a RECVMSG record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readRecvMsg( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a SENDMSG record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readSendMsg( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a PROCESSBEGIN record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ - -int OTF_Reader_readBeginProcess( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a PROCESSEND record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readEndProcess( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a FILEOPERATION record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readFileOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a BEGINFILEOPERATION record from buffer, - parses the parameter of the record and calls the - appropriate handler.*/ -int OTF_Reader_readBeginFileOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads an ENDFILEOPERATION record from buffer, - parses the parameter of the record and calls the - appropriate handler.*/ -int OTF_Reader_readEndFileOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads an ENDFILEOPERATION record from buffer, - parses the parameter of the record and calls the - appropriate handler. THIS is for an older version but needs - to stay as a bug fix. */ -int OTF_Reader_readEndFileOperation_old( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a RMAPUT record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readRMAPut( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a RMAPUTRE record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readRMAPutRemoteEnd( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a RMAGET record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readRMAGet( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a RMAEND record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readRMAEnd( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - - -/* *** Snapshot records *** ****************************************** */ - - -/** This function reads a COMMENT record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readSnapshotComment( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a TENTER record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readEnterSnapshot( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a TSEND record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readSendSnapshot( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a TOPENFILE record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readOpenFileSnapshot( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a TBEGINCOLLOP record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readBeginCollopSnapshot( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - - -/** This function reads a TBEGINFILEOP record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readBeginFileOpSnapshot( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/* *** Summary records *** ****************************************** */ - - -/** This function reads a COMMENT record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readSummaryComment( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a SUMFUNCTION record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readFunctionSummary( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a SUMFUNCTIONGROUP record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readFunctionGroupSummary( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a SUMMESSAGE record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readMessageSummary( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a COLLOPMESSAGE record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readCollopSummary( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a SUMFILEOPERATION record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readFileOperationSummary( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** This function reads a SUMFILEGROUPOPERATION record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readFileGroupOperationSummary( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - - -/* *** Marker records *** ***************************************** */ - - -/** This function reads a DefMarker record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readDefMarker( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t stream ); - -/** This function reads a Marker record from buffer, - parse the parameter of the record and call the - appropriate handler.*/ -int OTF_Reader_readMarkerSpot( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - - -/* ************************************************************************* */ - - - -/* *** public function bodies *** ********************************* */ - - -int OTF_Reader_parseEventRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - /* - look at this code very carfully until you understand it!!! - - the order of cases depends on the first characters of the - 'OTF_KEYWORD_' macros - so changes there requires changes here! - - see comments in 'OTF_Keywords.h' also! - */ - - /* accept empty lines */ - OTF_RBuffer_skipSpaces( buffer ); - - switch( buffer->buffer[buffer->pos] ) { - - - case OTF_KEYWORD_F_EVENTCOMMENT /*'#'*/ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_EVENTCOMMENT ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_EVENTCOMMENT ) ) { - - OTF_RBuffer_skipKeyword( buffer ); - return OTF_Reader_readEventComment( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_KEYVALUE_PREFIX ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_KEYVALUE_PREFIX ) ) { - - OTF_RBuffer_skipKeyword( buffer ); - - return OTF_RBuffer_readKeyValueList( buffer ); - } - - break; - - case OTF_KEYWORD_F_NOOP /* 'N' */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_NOOP ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_NOOP ) ) { - - OTF_RBuffer_skipKeyword( buffer ); - return OTF_Reader_readNoOp( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_ENTER /* 'E' */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_ENTER ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_ENTER ) ) { - - OTF_RBuffer_skipKeyword( buffer ); - return OTF_Reader_readEnter( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_LEAVE /* 'L' */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LEAVE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LEAVE ) ) { - - OTF_RBuffer_skipKeyword( buffer ); - return OTF_Reader_readLeave( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_SEND /* 'S' */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_SEND ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_SEND ) ) { - - OTF_RBuffer_skipKeyword( buffer ); - return OTF_Reader_readSendMsg( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_RECEIVE /* 'R' */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_RECEIVE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_RECEIVE ) ) { - - return OTF_Reader_readRecvMsg( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_COUNTER /* 'C' */ : - /* case OTF_KEYWORD_F_COLLECTIVEOPERATION / * C * / : */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_COUNTER ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_COUNTER ) ) { - - return OTF_Reader_readCounter( buffer, handlers ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_COLLECTIVEOPERATION ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_COLLECTIVEOPERATION ) ) { - - OTF_RBuffer_skipKeyword( buffer ); - return OTF_Reader_readCollectiveOperation( buffer, handlers ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_BEGINCOLLECTIVEOPERATION ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_BEGINCOLLECTIVEOPERATION ) ) { - - OTF_RBuffer_skipKeyword( buffer ); - return OTF_Reader_readBeginCollectiveOperation( buffer, handlers ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_ENDCOLLECTIVEOPERATION ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_ENDCOLLECTIVEOPERATION ) ) { - - OTF_RBuffer_skipKeyword( buffer ); - return OTF_Reader_readEndCollectiveOperation( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_FILEOPERATION /* F */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_FILEOPERATION ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_FILEOPERATION ) ) { - - return OTF_Reader_readFileOperation( buffer, handlers ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_BEGINFILEOPERATION_NEW ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_BEGINFILEOPERATION_NEW ) ) { - - return OTF_Reader_readBeginFileOperation( buffer, handlers ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_ENDFILEOPERATION_NEW ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_ENDFILEOPERATION_NEW ) ) { - - return OTF_Reader_readEndFileOperation( buffer, handlers ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_BEGINFILEOPERATION_OLD ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_BEGINFILEOPERATION_OLD ) ) { - - return OTF_Reader_readBeginFileOperation( buffer, handlers ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_ENDFILEOPERATION_OLD ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_ENDFILEOPERATION_OLD ) ) { - - return OTF_Reader_readEndFileOperation_old( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_BEGINPROCESS /* 'P' */ : - /* case OTF_KEYWORD_F_ENDPROCESS / * 'P' * / : */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_BEGINPROCESS ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_BEGINPROCESS ) ) { - - return OTF_Reader_readBeginProcess( buffer, handlers ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_ENDPROCESS ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_ENDPROCESS ) ) { - - return OTF_Reader_readEndProcess( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_RMAPUT /* T */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_RMAPUT ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_RMAPUT ) ) { - - return OTF_Reader_readRMAPut( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_RMAPUTRE /* U */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_RMAPUTRE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_RMAPUTRE ) ) { - - return OTF_Reader_readRMAPutRemoteEnd( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_RMAGET /* G */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_RMAGET ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_RMAGET ) ) { - - return OTF_Reader_readRMAGet( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_RMAEND /* M */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_RMAEND ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_RMAEND ) ) { - - return OTF_Reader_readRMAEnd( buffer, handlers ); - } - - break; - - case '\n': - - /* accept empty lines */ - return OTF_RBuffer_readNewline( buffer ); - } - - - return OTF_Reader_readUnknownRecord( buffer, handlers ); -} - - -int OTF_Reader_parseDefRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - /* check prefix */ - if ( OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_L_DEF_PREFIX ) || - OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_S_DEF_PREFIX ) ) { - - /* fine */ - - } else if ( OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_L_KEYVALUE_PREFIX ) || - OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_S_KEYVALUE_PREFIX ) ) { - - return OTF_RBuffer_readKeyValueList( buffer ); - - } else if ( buffer->buffer[buffer->pos] == '\n' ) { - - return OTF_RBuffer_readNewline( buffer ); - - } else { - - return OTF_Reader_readUnknownDefRecord( buffer, handlers, streamid ); - } - - switch( buffer->buffer[buffer->pos] ) { - - case OTF_KEYWORD_F_DEFATTRLIST /* 'A' */ : - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_DEFATTRLIST ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_DEFATTRLIST ) ) { - - return OTF_Reader_readDefAttributeList( buffer, handlers, streamid ); - } - - break; - - /* case OTF_KEYWORD_F_DEFINITIONCOMMENT 'C' :*/ - /* case OTF_KEYWORD_F_DEFCOUNTER 'C' : */ - /* case OTF_KEYWORD_F_DEFCOUNTERGROUP 'C' : */ - /* case OTF_KEYWORD_F_DEFCOLLOP 'C' : */ - case OTF_KEYWORD_F_DEFCREATOR /* 'C' */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_DEFINITIONCOMMENT ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_DEFINITIONCOMMENT ) ) { - - OTF_RBuffer_skipKeyword( buffer ); - return OTF_Reader_readDefinitionComment( buffer, handlers, streamid ); - } - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_DEFCOUNTERGROUP ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_DEFCOUNTERGROUP ) ) { - - return OTF_Reader_readDefCounterGroup( buffer, handlers, streamid ); - - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_DEFCREATOR ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_DEFCREATOR ) ) { - - return OTF_Reader_readDefCreator( buffer, handlers, streamid ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_DEFCOLLOP ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_DEFCOLLOP ) ) { - - return OTF_Reader_readDefCollectiveOperation( buffer, handlers, streamid ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_DEFCOUNTER ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_DEFCOUNTER ) ) { - - return OTF_Reader_readDefCounter( buffer, handlers, streamid ); - } - - break; - - /* case OTF_KEYWORD_F_DEFFUNCTION 'F' : */ - /* case OTF_KEYWORD_F_DEFFFILE 'F' : */ - /* case OTF_KEYWORD_F_DEFFFILEGROUP 'F' : */ - case OTF_KEYWORD_F_DEFFUNCTIONGROUP /* 'F' */ : - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_DEFFUNCTIONGROUP ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_DEFFUNCTIONGROUP ) ) { - - return OTF_Reader_readDefFunctionGroup( buffer, handlers, streamid ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_DEFFUNCTION ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_DEFFUNCTION ) ) { - - return OTF_Reader_readDefFunction( buffer, handlers, streamid ); - } - - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_DEFFILEGROUP ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_DEFFILEGROUP ) ) { - - return OTF_Reader_readDefFileGroup( buffer, handlers, streamid ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_DEFFILE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_DEFFILE ) ) { - - return OTF_Reader_readDefFile( buffer, handlers, streamid ); - } - - - - break; - - - case OTF_KEYWORD_F_DEFKEYVALUE /* 'K' */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_DEFKEYVALUE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_DEFKEYVALUE ) ) { - - return OTF_Reader_readDefKeyValue( buffer, handlers, streamid ); - } - - break; - - - /* case OTF_KEYWORD_F_DEFPROCESSORGROUPATTR 'P' : */ - /* case OTF_KEYWORD_F_DEFPROCESS 'P' : */ - case OTF_KEYWORD_F_DEFPROCESSGROUP /* 'P' */ : - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_DEFPROCESSGROUP ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_DEFPROCESSGROUP ) ) { - - return OTF_Reader_readDefProcessGroup( buffer, handlers, streamid ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_DEFPROCESS ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_DEFPROCESS ) ) { - - return OTF_Reader_readDefProcess( buffer, handlers, streamid ); - } - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_DEFPROCESSORGROUPATTR ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_DEFPROCESSORGROUPATTR ) ) { - - return OTF_Reader_readDefProcessOrGroupAttributes( buffer, handlers, streamid ); - } - - break; - - /* case OTF_KEYWORD_F_DEFSCL 'S' : */ - case OTF_KEYWORD_F_DEFSCLFILE /* 'S' */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_DEFSCLFILE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_DEFSCLFILE ) ) { - - return OTF_Reader_readDefSclFile( buffer, handlers, streamid ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_DEFSCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_DEFSCL ) ) { - - return OTF_Reader_readDefScl( buffer, handlers, streamid ); - } - - break; - - case OTF_KEYWORD_F_DEFTIMERRESOLUTION /* 'T' */ : - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_DEFTIMERRESOLUTION ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_DEFTIMERRESOLUTION ) ) { - - return OTF_Reader_readDefTimerResolution( buffer, handlers, streamid ); - } - - break; - - case OTF_KEYWORD_F_DEFVERSION /* 'V' */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_DEFVERSION ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_DEFVERSION ) ) { - - return OTF_Reader_readDefVersion( buffer, handlers, streamid ); - } - - break; - } - - - return OTF_Reader_readUnknownDefRecord( buffer, handlers, streamid ); -} - - -int OTF_Reader_parseStatisticsRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - /* check prefix */ - if ( OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_L_SUM_PREFIX ) || - OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_S_SUM_PREFIX ) ) { - - /* fine */ - - } else if ( OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_L_KEYVALUE_PREFIX ) || - OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_S_KEYVALUE_PREFIX ) ) { - - return OTF_RBuffer_readKeyValueList( buffer ); - - } else if ( buffer->buffer[buffer->pos] == '\n' ) { - - return OTF_RBuffer_readNewline( buffer ); - - } else { - - return OTF_Reader_readUnknownRecord( buffer, handlers ); - } - - - switch( buffer->buffer[buffer->pos] ) { - - /* case OTF_KEYWORD_F_SUMFILEOPERATION 'F' : */ - /* case OTF_KEYWORD_F_SUMFILEGROUPOPERATION 'F' : */ - case OTF_KEYWORD_F_SUMFUNCTION /* 'F' */ : - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_SUMFUNCTION ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_SUMFUNCTION ) ) { - - return OTF_Reader_readFunctionSummary( buffer, handlers ); - } - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_SUMFILEGROUPOPERATION ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_SUMFILEGROUPOPERATION ) ) { - - return OTF_Reader_readFileGroupOperationSummary( buffer, handlers ); - } - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_SUMFILEOPERATION ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_SUMFILEOPERATION ) ) { - - return OTF_Reader_readFileOperationSummary( buffer, handlers ); - } - - /** This is necessary to read a FunctionGroupSummary record in long format, because - the first character of the long and short keyword differs. */ - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_SUMFUNCTIONGROUP ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_SUMFUNCTIONGROUP ) ) { - - return OTF_Reader_readFunctionGroupSummary( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_SUMFUNCTIONGROUP /* 'G' */ : - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_SUMFUNCTIONGROUP ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_SUMFUNCTIONGROUP ) ) { - - return OTF_Reader_readFunctionGroupSummary( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_SUMMESSAGE /* 'M' */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_SUMMESSAGE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_SUMMESSAGE ) ) { - - return OTF_Reader_readMessageSummary( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_SUMCOMMENT /* 'C' */ : - /*case OTF_KEYWORD_F_COLLOPMESSAGE*/ /* 'C' */ - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_SUMCOMMENT ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_SUMCOMMENT ) ) { - - return OTF_Reader_readSummaryComment( buffer, handlers ); - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_COLLOPMESSAGE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_COLLOPMESSAGE ) ) { - - return OTF_Reader_readCollopSummary( buffer, handlers ); - } - - break; - } - - - return OTF_Reader_readUnknownRecord( buffer, handlers ); -} - - -int OTF_Reader_parseSnapshotsRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - /* check prefix */ - if ( OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_L_SNAPSHOT_PREFIX ) || - OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_S_SNAPSHOT_PREFIX ) ) { - - /* fine */ - - } else if ( OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_L_KEYVALUE_PREFIX ) || - OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_S_KEYVALUE_PREFIX ) ) { - - return OTF_RBuffer_readKeyValueList( buffer ); - - } else if ( buffer->buffer[buffer->pos] == '\n' ) { - - return OTF_RBuffer_readNewline( buffer ); - - } else { - - return OTF_Reader_readUnknownRecord( buffer, handlers ); - } - - - switch( buffer->buffer[buffer->pos] ) { - - case OTF_KEYWORD_F_SNAPSHOT_ENTER /* 'E' */ : - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_ENTER ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_SNAPSHOT_ENTER ) ) { - - return OTF_Reader_readEnterSnapshot( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_SNAPSHOT_SEND /* 'S' */ : - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_SEND ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_SNAPSHOT_SEND ) ) { - - return OTF_Reader_readSendSnapshot( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_SNAPSHOT_OPENFILE /* 'O' */ : - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_OPENFILE ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_SNAPSHOT_OPENFILE ) ) { - - return OTF_Reader_readOpenFileSnapshot( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_SNAPSHOT_COMMENT /* 'C' */ : - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_COMMENT ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_SNAPSHOT_COMMENT ) ) { - - return OTF_Reader_readSnapshotComment( buffer, handlers ); - } - - break; - - case OTF_KEYWORD_F_SNAPSHOT_BEGINCOLLOP /* 'B' */ : - /*case OTF_KEYWORD_F_SNAPSHOT_BEGINFILEOP*/ /* 'F' */ - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_BEGINCOLLOP ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_SNAPSHOT_BEGINCOLLOP ) ) { - - return OTF_Reader_readBeginCollopSnapshot( buffer, handlers ); - - } - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_BEGINFILEOP ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_SNAPSHOT_BEGINFILEOP ) ) { - - return OTF_Reader_readBeginFileOpSnapshot( buffer, handlers ); - } - - break; - - } - - - return OTF_Reader_readUnknownRecord( buffer, handlers ); -} - - -int OTF_Reader_parseMarkerRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - /* check prefix */ - if ( OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_L_MARKER_PREFIX ) || - OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_S_MARKER_PREFIX ) ) { - - /* fine */ - - } else if ( OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_L_KEYVALUE_PREFIX ) || - OTF_RBuffer_testPrefix( buffer, OTF_KEYWORD_S_KEYVALUE_PREFIX ) ) { - - return OTF_RBuffer_readKeyValueList( buffer ); - - } else if ( buffer->buffer[buffer->pos] == '\n' ) { - - return OTF_RBuffer_readNewline( buffer ); - - } else { - - return OTF_Reader_readUnknownMarkerRecord( buffer, handlers, streamid ); - } - - switch( buffer->buffer[buffer->pos] ) { - - case OTF_KEYWORD_F_MARKER_DEFMARKER /* 'D' */ : - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_MARKER_DEFMARKER ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_MARKER_DEFMARKER ) ) { - - OTF_RBuffer_skipKeyword( buffer ); - return OTF_Reader_readDefMarker( buffer, handlers, streamid ); - } - - break; - - case OTF_KEYWORD_F_MARKER_MARKERSPOT /* 'S' */ : - - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_MARKER_MARKERSPOT ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_MARKER_MARKERSPOT ) ) { - - return OTF_Reader_readMarkerSpot( buffer, handlers ); - } - - break; - } - - return OTF_Reader_readUnknownMarkerRecord( buffer, handlers, streamid ); -} - - -/* *** local function bodies *** ********************************** */ - - -/* *** Definition records *** ************************************* */ - - -int OTF_Reader_readDefinitionComment( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - const char* comment; - - - if ( handlers->pointer[OTF_DEFINITIONCOMMENT_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - comment = OTF_RBuffer_readString( buffer ); - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefinitionComment*) - handlers->pointer[OTF_DEFINITIONCOMMENT_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFINITIONCOMMENT_RECORD], - streamid, comment, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - -int OTF_Reader_readDefTimerResolution( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint64_t ticksPerSecond; - - - if ( handlers->pointer[OTF_DEFTIMERRESOLUTION_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - ticksPerSecond = OTF_RBuffer_readUint64( buffer ); - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefTimerResolution*) - handlers->pointer[OTF_DEFTIMERRESOLUTION_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFTIMERRESOLUTION_RECORD], - streamid, ticksPerSecond, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readDefProcess( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint32_t deftoken; - uint32_t parent = 0; - const char* name; - - if ( handlers->pointer[OTF_DEFPROCESS_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - deftoken = OTF_RBuffer_readUint32( buffer ); - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - name = NULL; - parent = 0; - - } else { - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, "N" )/*deprecated keyword*/) { - - - name = OTF_RBuffer_readString( buffer ); - - if ( name == NULL ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - parent = 0; - - } else { - - /** check if the token matchs with the format - of the record */ - if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_LOCAL_PARENT ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_PARENT ) || - OTF_RBuffer_testKeyword( buffer, "P") - /*deprecated keyword*/) { - - parent = OTF_RBuffer_readUint32( buffer ); - } - } - - } else if ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_LOCAL_PARENT ) || - OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_PARENT ) || - OTF_RBuffer_testKeyword( buffer, "P") - /*deprecated keyword*/) { - - - parent = OTF_RBuffer_readUint32( buffer ); - name = NULL; - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefProcess*) - handlers->pointer[OTF_DEFPROCESS_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFPROCESS_RECORD], - streamid, deftoken, name, parent, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readDefProcessGroup( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - int ret; - uint32_t n; - uint32_t deftoken; - const char* name; - - - if ( handlers->pointer[OTF_DEFPROCESSGROUP_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - deftoken = OTF_RBuffer_readUint32( buffer ); - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_MEMBERS ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_MEMBERS ) ) { - - n= OTF_RBuffer_readArray( buffer, &(buffer->array), &(buffer->arraysize) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, "N" )/*deprecated keyword*/) { - - name = OTF_RBuffer_readString( buffer ); - - if ( name == NULL ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - ret= ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefProcessGroup*) - handlers->pointer[OTF_DEFPROCESSGROUP_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFPROCESSGROUP_RECORD], - streamid, deftoken, name, n, buffer->array, buffer->list ) ) ); - - return ret; - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - -int OTF_Reader_readDefAttributeList( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - int ret; - uint32_t num; - uint32_t attr_token; - - if ( handlers->pointer[OTF_DEFATTRLIST_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - attr_token = OTF_RBuffer_readUint32( buffer ); - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_MEMBERS ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_MEMBERS ) ) { - - num = OTF_RBuffer_readArray( buffer, &(buffer->array), &(buffer->arraysize) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - ret= ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefAttributeList*) - handlers->pointer[OTF_DEFATTRLIST_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFATTRLIST_RECORD], - streamid, attr_token, num, (OTF_ATTR_TYPE*)buffer->array, - buffer->list ) ) ); - - return ret; - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - -} - -int OTF_Reader_readDefProcessOrGroupAttributes( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - int ret; - uint32_t proc_token; - uint32_t attr_token; - - if ( handlers->pointer[OTF_DEFATTRLIST_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - proc_token = OTF_RBuffer_readUint32( buffer ); - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_VALUE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_VALUE ) ) { - - attr_token = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - ret= ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefProcessOrGroupAttributes*) - handlers->pointer[OTF_DEFPROCESSORGROUPATTR_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFPROCESSORGROUPATTR_RECORD], - streamid, proc_token, attr_token, buffer->list ) ) ); - - return ret; - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - -} - -int OTF_Reader_readDefFunction( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint32_t deftoken; - uint32_t group; - uint32_t scltoken; - const char* name; - - - if ( handlers->pointer[OTF_DEFFUNCTION_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - deftoken= OTF_RBuffer_readUint32( buffer ); - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_GROUP ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_GROUP ) ) { - - group= OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, "N" )/*deprecated keyword*/) { - - name= OTF_RBuffer_readString( buffer ); - - if ( NULL == name ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken= 0; - - } else { - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) - || OTF_RBuffer_testKeyword( buffer, "S" )/*deprecated keyword*/ - ) { - - scltoken= OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefFunction*) - handlers->pointer[OTF_DEFFUNCTION_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFFUNCTION_RECORD], - streamid, deftoken, name, group, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readDefFunctionGroup( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint32_t deftoken; - const char* name; - - - if ( handlers->pointer[OTF_DEFFUNCTIONGROUP_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - deftoken = OTF_RBuffer_readUint32( buffer ); - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, "N" )/*deprecated keyword*/) { - - - name = OTF_RBuffer_readString( buffer ); - - if ( name == NULL ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefFunctionGroup*) - handlers->pointer[OTF_DEFFUNCTIONGROUP_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFFUNCTIONGROUP_RECORD], - streamid, deftoken, name, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readDefCollectiveOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint32_t collOp; - const char* name; - uint32_t type; - - - if ( handlers->pointer[OTF_DEFCOLLOP_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - collOp = OTF_RBuffer_readUint32( buffer ); - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, "N" )/*deprecated keyword*/) { - - name = OTF_RBuffer_readString( buffer ); - - if ( name == NULL ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matches with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TYPE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TYPE ) || - OTF_RBuffer_testKeyword( buffer, "T")/*deprecated keyword*/) { - - type = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefCollectiveOperation*) - handlers->pointer[OTF_DEFCOLLOP_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFCOLLOP_RECORD], - streamid, collOp, name, type, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readDefCounter( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint32_t deftoken; - uint32_t properties; - uint32_t countergroup; - const char* unit; - const char* name; - - - if ( handlers->pointer[OTF_DEFCOUNTER_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - deftoken = OTF_RBuffer_readUint32( buffer ); - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_GROUP ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_GROUP ) ) { - - countergroup = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, "N" )/*deprecated keyword*/) { - - name = OTF_RBuffer_readString( buffer ); - - if ( name == NULL ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_PROPERTIES ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_PROPERTIES ) - ) { - - properties = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** WARNING: double reading is intentionally, because in former versions of otf - it wrote the group twice(bug) ... if it doesnt find this second group, it is simply - skipped */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_GROUP ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_GROUP ) - ) { - - countergroup = OTF_RBuffer_readUint32( buffer ); - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_UNIT) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_UNIT ) ) { - - unit = OTF_RBuffer_readString( buffer ); - - if ( unit == NULL ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefCounter*) - handlers->pointer[OTF_DEFCOUNTER_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFCOUNTER_RECORD], - streamid, deftoken, name, properties, countergroup, unit, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readDefCounterGroup( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint32_t deftoken; - const char* name; - - - if ( handlers->pointer[OTF_DEFCOUNTERGROUP_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - deftoken = OTF_RBuffer_readUint32( buffer ); - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, "N" )/*deprecated keyword*/) { - - - name = OTF_RBuffer_readString( buffer ); - - if ( name == NULL ) { - - PARSE_ERROR( buffer ); - - return 0; - } - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefCounterGroup*) - handlers->pointer[OTF_DEFCOUNTERGROUP_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFCOUNTERGROUP_RECORD], - streamid, deftoken, name, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readDefScl( OTF_RBuffer* buffer, OTF_HandlerArray* handlers, - uint32_t streamid ) { - - - uint32_t deftoken; - uint32_t sclfile; - uint32_t sclline; - - - if ( handlers->pointer[OTF_DEFSCL_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - deftoken = OTF_RBuffer_readUint32( buffer ); - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_FILE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_FILE ) ) { - - sclfile = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_LINE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_LINE ) || - OTF_RBuffer_testKeyword( buffer, "L" )/*deprecated keyword*/ ) { - - sclline = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefScl*) - handlers->pointer[OTF_DEFSCL_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFSCL_RECORD], - streamid, deftoken, sclfile, sclline, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readDefSclFile( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint32_t deftoken; - const char* filename; - - - if ( handlers->pointer[OTF_DEFSCLFILE_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - deftoken = OTF_RBuffer_readUint32( buffer ); - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, "N" )/*deprecated keyword*/) { - - - filename = OTF_RBuffer_readString( buffer ); - - if ( filename == NULL ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefSclFile*) - handlers->pointer[OTF_DEFSCLFILE_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFSCLFILE_RECORD], - streamid, deftoken, filename, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readDefVersion( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint8_t major; - uint8_t minor; - uint8_t sub; - const char* string; - - - if ( handlers->pointer[OTF_DEFVERSION_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - major = (uint8_t) OTF_RBuffer_readUint32( buffer ); - - if ( ! OTF_RBuffer_testChar( buffer, '.' ) ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - minor = (uint8_t) OTF_RBuffer_readUint32( buffer ); - - if ( ! OTF_RBuffer_testChar( buffer, '.' ) ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - sub = (uint8_t) OTF_RBuffer_readUint32( buffer ); - - string = OTF_RBuffer_readString( buffer ); - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefVersion*) - handlers->pointer[OTF_DEFVERSION_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFVERSION_RECORD], - streamid, major, minor, sub, string, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readDefCreator( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - const char* creator; - - - if ( handlers->pointer[OTF_DEFCREATOR_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - creator = OTF_RBuffer_readString( buffer ); - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefCreator*) - handlers->pointer[OTF_DEFCREATOR_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFCREATOR_RECORD], - streamid, creator, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readDefFile( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint32_t token; - const char* name; - uint32_t group; - - - if ( handlers->pointer[OTF_DEFFILE_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - - token= OTF_RBuffer_readUint32( buffer ); - - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NAME ) ) { - - name= OTF_RBuffer_readString( buffer ); - - if ( NULL == name ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_GROUP ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_GROUP ) ) { - - group= OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefFile*) - handlers->pointer[OTF_DEFFILE_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFFILE_RECORD], - streamid, token, name, group, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - -int OTF_Reader_readDefFileGroup( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint32_t token; - const char* name; - - - if ( handlers->pointer[OTF_DEFFILEGROUP_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - - token= OTF_RBuffer_readUint32( buffer ); - - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NAME ) ) { - - name= OTF_RBuffer_readString( buffer ); - - if ( NULL == name ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefFileGroup*) - handlers->pointer[OTF_DEFFILEGROUP_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFFILEGROUP_RECORD], - streamid, token, name, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - - - -} - -int OTF_Reader_readDefKeyValue( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint32_t key; - OTF_Type type; - const char* name; - const char* description; - - - if ( handlers->pointer[OTF_DEFKEYVALUE_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - - key= OTF_RBuffer_readUint32( buffer ); - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TYPE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TYPE ) ) { - - type= OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NAME ) ) { - - name= OTF_RBuffer_readString( buffer ); - - if ( NULL == name ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TAG ) ) { - - description= OTF_RBuffer_readString( buffer ); - - if ( NULL == description ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefKeyValue*) - handlers->pointer[OTF_DEFKEYVALUE_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFKEYVALUE_RECORD], - streamid, key, type, name, description, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - -/* *** Event records *** ****************************************** */ - - -int OTF_Reader_readEventComment( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - const char* comment; - - - if ( handlers->pointer[OTF_EVENTCOMMENT_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - comment = OTF_RBuffer_readString( buffer ); - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_EventComment*) - handlers->pointer[OTF_EVENTCOMMENT_RECORD] ) - ( handlers->firsthandlerarg[OTF_EVENTCOMMENT_RECORD], - buffer->time, buffer->process, comment, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readCounter( OTF_RBuffer* buffer, OTF_HandlerArray* handlers ) { - - - int ret= 1; - - int32_t counter_token; - uint64_t value; - - - if ( handlers->pointer[OTF_COUNTER_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - counter_token = OTF_RBuffer_readUint32( buffer ); - - ret= ret && - ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_VALUE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_VALUE ) ); - - value = OTF_RBuffer_readUint64( buffer ); - - ret= ret && OTF_RBuffer_readNewline( buffer ); - - if ( ret ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_Counter*) - handlers->pointer[OTF_COUNTER_RECORD] ) - ( handlers->firsthandlerarg[OTF_COUNTER_RECORD], - buffer->time, buffer->process, counter_token, value, buffer->list ) ) ); - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readNoOp( OTF_RBuffer* buffer, OTF_HandlerArray* handlers ) { - - if ( handlers->pointer[OTF_NOOP_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_NoOp*) - handlers->pointer[OTF_NOOP_RECORD] ) - ( handlers->firsthandlerarg[OTF_NOOP_RECORD], - buffer->time, buffer->process, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readEnter( OTF_RBuffer* buffer, OTF_HandlerArray* handlers ) { - - - uint32_t statetoken; - uint32_t scltoken; - - - if ( handlers->pointer[OTF_ENTER_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - statetoken = OTF_RBuffer_readUint32( buffer ); - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, "S" )/*deprecated keyword*/) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_Enter*) - handlers->pointer[OTF_ENTER_RECORD] ) - ( handlers->firsthandlerarg[OTF_ENTER_RECORD], - buffer->time, statetoken, buffer->process, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readCollectiveOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - uint32_t functionToken; - uint32_t communicator; - uint32_t rootprocess; - uint32_t sent; - uint32_t received; - uint32_t scltoken; - uint64_t duration; - - - if ( handlers->pointer[OTF_COLLOP_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - functionToken = OTF_RBuffer_readUint32( buffer ); - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_COMMUNICATOR ) - ) { - - communicator = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_ROOT ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_ROOT ) ) { - - rootprocess = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SENT ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SENT ) ) { - - sent = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_RECVD ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_RECVD ) ) { - - received = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_DURATION ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_DURATION ) ) { - - duration = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, "S" )/*deprecated keyword*/) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_CollectiveOperation*) - handlers->pointer[OTF_COLLOP_RECORD] ) - ( handlers->firsthandlerarg[OTF_COLLOP_RECORD], - buffer->time, buffer->process, functionToken, communicator, - rootprocess, sent, received, duration, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readBeginCollectiveOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) -{ - uint32_t collOp; - uint64_t matchingId; - uint32_t procGroup; - uint32_t rootProc; - uint64_t sent; - uint64_t received; - uint32_t scltoken; - - if( handlers->pointer[OTF_BEGINCOLLOP_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - collOp = OTF_RBuffer_readUint32( buffer ); - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_HANDLEID ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_HANDLEID ) ) { - - matchingId = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_COMMUNICATOR ) ) { - - procGroup = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_ROOT ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_ROOT ) ) { - - rootProc = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SENT ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_SENT ) ) { - - sent = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_RECVD ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_RECVD ) ) { - - received = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_SCL ) - || OTF_RBuffer_testKeyword( buffer, "S" )/*deprecated keyword*/) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_BeginCollectiveOperation*) - handlers->pointer[OTF_BEGINCOLLOP_RECORD] ) - ( handlers->firsthandlerarg[OTF_BEGINCOLLOP_RECORD], - buffer->time, buffer->process, collOp, matchingId, - procGroup, rootProc, sent, received, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readEndCollectiveOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) -{ - uint64_t matchingId; - - if( handlers->pointer[OTF_ENDCOLLOP_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - matchingId = OTF_RBuffer_readUint64( buffer ); - - if( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_EndCollectiveOperation*) - handlers->pointer[OTF_ENDCOLLOP_RECORD] ) - ( handlers->firsthandlerarg[OTF_ENDCOLLOP_RECORD], - buffer->time, buffer->process, matchingId, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readRecvMsg( OTF_RBuffer* buffer, OTF_HandlerArray* handlers ) { - - - uint32_t sender; - uint32_t communicator; - uint32_t msgtype; - uint32_t msglength; - uint32_t scltoken; - - - if ( handlers->pointer[OTF_RECEIVE_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - sender = OTF_RBuffer_readUint32( buffer ); - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_LENGTH ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_LENGTH ) ) { - - msglength = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TAG ) ) { - - msgtype = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_COMMUNICATOR ) - ) { - - communicator = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, "S" )/*deprecated keyword*/) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_RecvMsg*) - handlers->pointer[OTF_RECEIVE_RECORD] ) - ( handlers->firsthandlerarg[OTF_RECEIVE_RECORD], - buffer->time, buffer->process, sender, communicator, - msgtype, msglength, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readSendMsg( OTF_RBuffer* buffer, OTF_HandlerArray* handlers ) { - - - uint32_t receiver; - uint32_t communicator; - uint32_t msgtype; - uint32_t msglength; - uint32_t scltoken; - - - if ( handlers->pointer[OTF_SEND_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - receiver = OTF_RBuffer_readUint32( buffer ); - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_LENGTH ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_LENGTH ) ) { - - msglength = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TAG ) ) { - - msgtype = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_COMMUNICATOR ) - ) { - - communicator = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, "S" )/*deprecated keyword*/) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_SendMsg*) - handlers->pointer[OTF_SEND_RECORD] ) - ( handlers->firsthandlerarg[OTF_SEND_RECORD], - buffer->time, buffer->process, receiver, communicator, - msgtype, msglength, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readLeave( OTF_RBuffer* buffer, OTF_HandlerArray* handlers ) { - - - uint32_t statetoken; - uint32_t scltoken; - - - if ( handlers->pointer[OTF_LEAVE_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - statetoken = 0; - scltoken = 0; - - } else { - - statetoken = OTF_RBuffer_readUint32( buffer ); - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, "S" )/*deprecated keyword*/) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_Leave*) - handlers->pointer[OTF_LEAVE_RECORD] ) - ( handlers->firsthandlerarg[OTF_LEAVE_RECORD], - buffer->time, statetoken, buffer->process, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readBeginProcess( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - if ( handlers->pointer[OTF_BEGINPROCESS_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_BeginProcess*) - handlers->pointer[OTF_BEGINPROCESS_RECORD] ) - ( handlers->firsthandlerarg[OTF_BEGINPROCESS_RECORD], - buffer->time, buffer->process, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readEndProcess( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - if ( handlers->pointer[OTF_ENDPROCESS_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_EndProcess*) - handlers->pointer[OTF_ENDPROCESS_RECORD] ) - ( handlers->firsthandlerarg[OTF_ENDPROCESS_RECORD], - buffer->time, buffer->process, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readFileOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - uint32_t ret= 1; - - uint32_t fileid; - uint64_t handleid; - uint32_t operation; - uint64_t bytes; - uint64_t duration; - uint32_t source; - - if ( handlers->pointer[OTF_FILEOPERATION_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - - - fileid = OTF_RBuffer_readUint32( buffer ); - - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_HANDLEID ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_HANDLEID ) ); - handleid = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_OPERATION ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_OPERATION ) ); - operation = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTES ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_BYTES ) ); - bytes = OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_DURATION ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_DURATION ) ); - duration = OTF_RBuffer_readUint64( buffer ); - - if( 0 == ret ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - source = 0; - - } else { - - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) ) { - - source = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_FileOperation*) - handlers->pointer[OTF_FILEOPERATION_RECORD] ) - ( handlers->firsthandlerarg[OTF_FILEOPERATION_RECORD], - buffer->time, fileid, buffer->process, handleid, operation, bytes, - duration, source, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readBeginFileOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) -{ - uint64_t matchingId; - uint32_t scltoken; - - if( handlers->pointer[OTF_BEGINFILEOP_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - matchingId = OTF_RBuffer_readUint64( buffer ); - - if( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_SCL ) ) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_BeginFileOperation*) - handlers->pointer[OTF_BEGINFILEOP_RECORD] ) - ( handlers->firsthandlerarg[OTF_BEGINFILEOP_RECORD], - buffer->time, buffer->process, matchingId, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readEndFileOperation( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) -{ - uint32_t fileid; - uint64_t matchingId; - uint64_t handleId; - uint32_t operation; - uint64_t bytes; - uint32_t scltoken; - - if( handlers->pointer[OTF_ENDFILEOP_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - fileid = OTF_RBuffer_readUint32( buffer ); - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_MATCHID ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_MATCHID ) ) { - - matchingId = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_HANDLEID ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_HANDLEID ) ) { - - handleId = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_OPERATION) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_OPERATION) ) { - - operation = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTES) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_BYTES) ) { - - bytes = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - return 0; - } - - if( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_SCL ) ) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - return 0; - } - } - - if( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_EndFileOperation*) - handlers->pointer[OTF_ENDFILEOP_RECORD] ) - ( handlers->firsthandlerarg[OTF_ENDFILEOP_RECORD], - buffer->time, buffer->process, fileid, matchingId, - handleId, operation, bytes, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - return 0; - } -} - - -/* the OLD/NEW thing fixes upward compatibility after changing the record contents - - the new version is above, it will read the current version of the record - - the old version is just below this line, it will read the old version of this record - which misses one value */ - -int OTF_Reader_readEndFileOperation_old( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) -{ - uint32_t fileid; - uint64_t handleid; - uint32_t operation; - uint64_t bytes; - uint32_t scltoken; - - - if( handlers->pointer[OTF_ENDFILEOP_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - fileid = OTF_RBuffer_readUint32( buffer ); - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_HANDLEID ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_HANDLEID ) ) { - - handleid = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_OPERATION) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_OPERATION) ) { - - operation = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTES) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_BYTES) ) { - - bytes = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_SCL ) ) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_EndFileOperation*) - handlers->pointer[OTF_ENDFILEOP_RECORD] ) - ( handlers->firsthandlerarg[OTF_ENDFILEOP_RECORD], - buffer->time, buffer->process, fileid, - handleid /* matchingID */, - 0 /* handleID */, - operation, bytes, scltoken, buffer->list ) ) ); - - /* this odd code above fixes upward compatibility after changing the - record contents. in this case, the matchingID was missing, so we - decided to take the handleID as the mathingID and pretend there is no - handleID -- this is the only useful rescue in our opinion */ - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readRMAPut( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - uint32_t ret= 1; - - uint32_t origin; - uint32_t target; - uint32_t communicator; - uint32_t tag; - uint64_t bytes; - uint32_t scltoken; - - if ( handlers->pointer[OTF_RMAPUT_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - - - origin = OTF_RBuffer_readUint32( buffer ); - - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_PROCESS ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_PROCESS ) ); - target = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_COMMUNICATOR ) ); - communicator = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TAG ) ); - tag = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_LENGTH ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_LENGTH ) ); - bytes = OTF_RBuffer_readUint64( buffer ); - - if( 0 == ret ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) ) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_RMAPut*) - handlers->pointer[OTF_RMAPUT_RECORD] ) - ( handlers->firsthandlerarg[OTF_RMAPUT_RECORD], - buffer->time, buffer->process, origin, target, - communicator, tag, bytes, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readRMAPutRemoteEnd( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - uint32_t ret= 1; - - uint32_t origin; - uint32_t target; - uint32_t communicator; - uint32_t tag; - uint64_t bytes; - uint32_t scltoken; - - if ( handlers->pointer[OTF_RMAPUTRE_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - - - origin = OTF_RBuffer_readUint32( buffer ); - - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_PROCESS ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_PROCESS ) ); - target = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_COMMUNICATOR ) ); - communicator = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TAG ) ); - tag = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_LENGTH ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_LENGTH ) ); - bytes = OTF_RBuffer_readUint64( buffer ); - - if( 0 == ret ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) ) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_RMAPutRemoteEnd*) - handlers->pointer[OTF_RMAPUTRE_RECORD] ) - ( handlers->firsthandlerarg[OTF_RMAPUTRE_RECORD], - buffer->time, buffer->process, origin, target, - communicator, tag, bytes, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readRMAGet( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - uint32_t ret= 1; - - uint32_t origin; - uint32_t target; - uint32_t communicator; - uint32_t tag; - uint64_t bytes; - uint32_t scltoken; - - if ( handlers->pointer[OTF_RMAGET_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - - - origin = OTF_RBuffer_readUint32( buffer ); - - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_PROCESS ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_PROCESS ) ); - target = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_COMMUNICATOR ) ); - communicator = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TAG ) ); - tag = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_LENGTH ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_LENGTH ) ); - bytes = OTF_RBuffer_readUint64( buffer ); - - if( 0 == ret ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) ) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_RMAGet*) - handlers->pointer[OTF_RMAGET_RECORD] ) - ( handlers->firsthandlerarg[OTF_RMAGET_RECORD], - buffer->time, buffer->process, origin, target, - communicator, tag, bytes, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readRMAEnd( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - uint32_t ret= 1; - - uint32_t remote; - uint32_t communicator; - uint32_t tag; - uint32_t scltoken; - - if ( handlers->pointer[OTF_RMAEND_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - - - remote = OTF_RBuffer_readUint32( buffer ); - - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_COMMUNICATOR ) ); - communicator = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TAG ) ); - tag = OTF_RBuffer_readUint32( buffer ); - - if( 0 == ret ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) ) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_RMAEnd*) - handlers->pointer[OTF_RMAEND_RECORD] ) - ( handlers->firsthandlerarg[OTF_RMAEND_RECORD], - buffer->time, buffer->process, remote, communicator, - tag, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -/* *** Snapshot records *** ****************************************** */ - - -int OTF_Reader_readSnapshotComment( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - const char* comment; - - - if ( handlers->pointer[OTF_SNAPSHOTCOMMENT_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - comment = OTF_RBuffer_readString( buffer ); - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_SnapshotComment*) - handlers->pointer[OTF_SNAPSHOTCOMMENT_RECORD] ) - ( handlers->firsthandlerarg[OTF_SNAPSHOTCOMMENT_RECORD], - buffer->time, buffer->process, comment, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readEnterSnapshot( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - uint64_t originaltime; - uint32_t function; - uint32_t source; - - if ( NULL == handlers->pointer[OTF_ENTERSNAPSHOT_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - function= OTF_RBuffer_readUint32( buffer ); - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_OTIME) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_OTIME) ) { - - originaltime= OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - source = 0; - - } else { - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, "S" )/*deprecated keyword*/) { - - source = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_EnterSnapshot*) - handlers->pointer[OTF_ENTERSNAPSHOT_RECORD] ) - ( handlers->firsthandlerarg[OTF_ENTERSNAPSHOT_RECORD], - buffer->time, originaltime, function, buffer->process, - source, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - -int OTF_Reader_readSendSnapshot( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - int ret= 1; - - uint64_t originaltime; - uint32_t receiver; - uint32_t procGroup; - uint32_t tag; - uint32_t length; - uint32_t source; - - if ( NULL == handlers->pointer[OTF_SENDSNAPSHOT_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - receiver= OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_OTIME) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_OTIME) ); - originaltime= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_GROUP) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_GROUP) ); - procGroup= OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TAG) ); - tag= OTF_RBuffer_readUint32( buffer ); - - if ( 0 == ret ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_LENGTH) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_LENGTH) ) { - - length= OTF_RBuffer_readUint32( buffer ); - - } else { - - /* support for old tracefiles */ - length = 0; - - } - - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - source = 0; - - } else { - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, "S" )/*deprecated keyword*/) { - - source = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_SendSnapshot*) - handlers->pointer[OTF_SENDSNAPSHOT_RECORD] ) - ( handlers->firsthandlerarg[OTF_SENDSNAPSHOT_RECORD], - buffer->time, originaltime, buffer->process, receiver, - procGroup, tag, length, source, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readOpenFileSnapshot( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - uint64_t originaltime; - uint32_t fileid; - uint64_t handleid; - uint32_t source; - - - if ( NULL == handlers->pointer[OTF_OPENFILESNAPSHOT_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - - fileid= OTF_RBuffer_readUint32( buffer ); - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_OTIME) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_OTIME) ) { - - originaltime= OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_HANDLEID) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_HANDLEID) ) { - - handleid= OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( buffer->buffer[buffer->pos] == '\n' ) { - - source = 0; - - } else { - - /** check if the token matchs with the format of the record */ - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SCL ) || - OTF_RBuffer_testKeyword( buffer, "S" )/*deprecated keyword*/) { - - source = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_OpenFileSnapshot*) - handlers->pointer[OTF_OPENFILESNAPSHOT_RECORD] ) - ( handlers->firsthandlerarg[OTF_OPENFILESNAPSHOT_RECORD], - buffer->time, originaltime, fileid, buffer->process, - handleid, source, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - -} - - -int OTF_Reader_readBeginCollopSnapshot( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - uint64_t originaltime; - uint32_t collOp; - uint64_t matchingId; - uint32_t procGroup; - uint32_t rootProc; - uint64_t sent; - uint64_t received; - uint32_t scltoken; - - - if ( NULL == handlers->pointer[OTF_BEGINCOLLOPSNAPSHOT_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - - originaltime= OTF_RBuffer_readUint64( buffer ); - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_COLLECTIVE ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_COLLECTIVE ) ) { - - collOp = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_HANDLEID ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_HANDLEID ) ) { - - matchingId = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_GROUP ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_GROUP ) ) { - - procGroup = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_ROOT ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_ROOT ) ) { - - rootProc = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SENT ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_SENT ) ) { - - sent = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_RECVD ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_RECVD ) ) { - - received = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - if( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_SCL ) ) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_BeginCollopSnapshot*) - handlers->pointer[OTF_BEGINCOLLOPSNAPSHOT_RECORD] ) - ( handlers->firsthandlerarg[OTF_BEGINCOLLOPSNAPSHOT_RECORD], - buffer->time, originaltime, buffer->process, collOp, matchingId, - procGroup, rootProc, sent, received, scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - -} - -int OTF_Reader_readBeginFileOpSnapshot( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - uint64_t originaltime; - uint64_t matchingId; - uint32_t scltoken; - - if( handlers->pointer[OTF_BEGINFILEOPSNAPSHOT_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - originaltime = OTF_RBuffer_readUint64( buffer ); - - /** check if the token matches with the format of the record */ - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_MATCHID ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_MATCHID ) ) { - - matchingId = OTF_RBuffer_readUint64( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - - if( buffer->buffer[buffer->pos] == '\n' ) { - - scltoken = 0; - - } else { - - if( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ) - || OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_L_LOCAL_SCL ) ) { - - scltoken = OTF_RBuffer_readUint32( buffer ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - } - - if( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_BeginFileOpSnapshot*) - handlers->pointer[OTF_BEGINFILEOPSNAPSHOT_RECORD] ) - ( handlers->firsthandlerarg[OTF_BEGINFILEOPSNAPSHOT_RECORD], - buffer->time, originaltime, buffer->process, matchingId, - scltoken, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - -} - - - -/* *** Summary records *** ****************************************** */ - - -int OTF_Reader_readSummaryComment( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - const char* comment; - - - if ( handlers->pointer[OTF_SUMMARYCOMMENT_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - comment = OTF_RBuffer_readString( buffer ); - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_SummaryComment*) - handlers->pointer[OTF_SUMMARYCOMMENT_RECORD] ) - ( handlers->firsthandlerarg[OTF_SUMMARYCOMMENT_RECORD], - buffer->time, buffer->process, comment, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readFunctionSummary( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - int ret= 1; - - uint32_t function; - uint64_t count; - uint64_t excltime; - uint64_t incltime; - - - if ( NULL == handlers->pointer[OTF_FUNCTIONSUMMARY_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - /* read data items */ - - /* tested outside: - ret= ret && OTF_RBuffer_testKeyword( buffer, "SUMF" ); */ - - function= OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_COUNT ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_COUNT ) - || OTF_RBuffer_testKeyword( buffer, "C" )/*deprecated keyword*/); - count= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_EXCLTIME) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_EXCLTIME) ); - excltime= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_INCLTIME) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_INCLTIME) ); - incltime= OTF_RBuffer_readUint64( buffer ); - - ret= ret && OTF_RBuffer_readNewline( buffer ); - - if ( ret ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_FunctionSummary*) - handlers->pointer[OTF_FUNCTIONSUMMARY_RECORD] ) - ( handlers->firsthandlerarg[OTF_FUNCTIONSUMMARY_RECORD], - buffer->time, function, buffer->process, - count, excltime, incltime, buffer->list ) ) ); - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readFunctionGroupSummary( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - int ret= 1; - - uint32_t functiongroup; - uint64_t count; - uint64_t excltime; - uint64_t incltime; - - - if ( NULL == handlers->pointer[OTF_FUNCTIONGROUPSUMMARY_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - /* read data items */ - - /* tested outside: - ret= ret && OTF_RBuffer_testKeyword( buffer, "SUMG" ); */ - - functiongroup= OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_COUNT ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_COUNT ) - || OTF_RBuffer_testKeyword( buffer, "C" )/*deprecated keyword*/); - count= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_EXCLTIME) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_EXCLTIME) ); - excltime= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_INCLTIME) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_INCLTIME) ); - incltime= OTF_RBuffer_readUint64( buffer ); - - ret= ret && OTF_RBuffer_readNewline( buffer ); - - if ( ret ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_FunctionGroupSummary*) - handlers->pointer[OTF_FUNCTIONGROUPSUMMARY_RECORD] ) - ( handlers->firsthandlerarg[OTF_FUNCTIONGROUPSUMMARY_RECORD], - buffer->time, functiongroup, buffer->process, - count, excltime, incltime, buffer->list ) ) ); - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readMessageSummary( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - int ret= 1; - - uint32_t peer; - uint32_t comm; - uint32_t tag; - uint64_t number_sent; - uint64_t number_recvd; - uint64_t bytes_sent; - uint64_t bytes_recved; - - - if ( NULL == handlers->pointer[OTF_MESSAGESUMMARY_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - /* read data items */ - - /* tested outside: - OTF_RBuffer_testKeyword( buffer, "SUMM" ); */ - - peer= OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, - OTF_KEYWORD_S_LOCAL_COMMUNICATOR ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_COMMUNICATOR)); - comm= OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TAG ) || - OTF_RBuffer_testKeyword( buffer, "A" ) ); - tag= OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERSENT ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBERSENT ) ); - number_sent= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERRECVD ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBERRECVD ) ); - number_recvd= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SENT ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SENT ) ); - bytes_sent= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_RECVD ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_RECVD ) ); - bytes_recved= OTF_RBuffer_readUint64( buffer ); - - ret= ret && OTF_RBuffer_readNewline( buffer ); - - if ( ret ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_MessageSummary*) - handlers->pointer[OTF_MESSAGESUMMARY_RECORD] ) - ( handlers->firsthandlerarg[OTF_MESSAGESUMMARY_RECORD], - buffer->time, buffer->process, peer, comm, tag, - number_sent, number_recvd, bytes_sent, bytes_recved, buffer->list ) ) ); - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - -int OTF_Reader_readCollopSummary( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - int ret= 1; - - uint32_t comm; - uint32_t collective; - uint64_t number_sent; - uint64_t number_recved; - uint64_t bytes_sent; - uint64_t bytes_recved; - - if ( NULL == handlers->pointer[OTF_COLLOPSUMMARY_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - /* read data items */ - - /* tested outside: - OTF_RBuffer_testKeyword( buffer, "SUMM" ); */ - - comm = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_COLLECTIVE ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_COLLECTIVE ) ); - - collective = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERSENT ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBERSENT ) ); - number_sent= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERRECVD ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBERRECVD ) ); - number_recved= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_SENT ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_SENT ) ); - bytes_sent= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_RECVD ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_RECVD ) ); - bytes_recved= OTF_RBuffer_readUint64( buffer ); - - ret= ret && OTF_RBuffer_readNewline( buffer ); - - if ( ret ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_CollopSummary*) - handlers->pointer[OTF_COLLOPSUMMARY_RECORD] ) - ( handlers->firsthandlerarg[OTF_COLLOPSUMMARY_RECORD], - buffer->time, buffer->process, comm, collective, - number_sent, number_recved, bytes_sent, bytes_recved, buffer->list ) ) ); - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - -int OTF_Reader_readFileOperationSummary( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - uint32_t ret= 1; - - uint32_t fileid; - uint64_t nopen; - uint64_t nclose; - uint64_t nread; - uint64_t nwrite; - uint64_t nseek; - uint64_t bytesread; - uint64_t byteswrite; - - - if ( NULL == handlers->pointer[OTF_FILEOPERATIONSUMMARY_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - /* read data items */ - - fileid= OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBEROPEN ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBEROPEN ) ); - nopen= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERCLOSE ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBERCLOSE ) ); - nclose= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERREAD) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBERREAD) ); - nread= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERWRITE) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBERWRITE) ); - nwrite= OTF_RBuffer_readUint64( buffer ); - - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERSEEK ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBERSEEK ) ); - nseek= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTESREAD) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_BYTESREAD) ); - bytesread= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTESWRITE) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_BYTESWRITE) ); - byteswrite= OTF_RBuffer_readUint64( buffer ); - - ret= ret && OTF_RBuffer_readNewline( buffer ); - - if ( ret ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_FileOperationSummary*) - handlers->pointer[OTF_FILEOPERATIONSUMMARY_RECORD] ) - ( handlers->firsthandlerarg[OTF_FILEOPERATIONSUMMARY_RECORD], - buffer->time, fileid, buffer->process, nopen, nclose, - nread, nwrite, nseek, bytesread, byteswrite, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - - -int OTF_Reader_readFileGroupOperationSummary( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - - uint32_t ret= 1; - - uint32_t groupid; - uint64_t nopen; - uint64_t nclose; - uint64_t nread; - uint64_t nwrite; - uint64_t nseek; - uint64_t bytesread; - uint64_t byteswrite; - - - if ( NULL == handlers->pointer[OTF_FILEGROUPOPERATIONSUMMARY_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - /* read data items */ - - groupid= OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBEROPEN ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBEROPEN ) ); - nopen= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERCLOSE ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBERCLOSE ) ); - nclose= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERREAD) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBERREAD) ); - nread= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERWRITE) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBERWRITE) ); - nwrite= OTF_RBuffer_readUint64( buffer ); - - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERSEEK ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NUMBERSEEK ) ); - nseek= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTESREAD) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_BYTESREAD) ); - bytesread= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTESWRITE) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_BYTESWRITE) ); - byteswrite= OTF_RBuffer_readUint64( buffer ); - - ret= ret && OTF_RBuffer_readNewline( buffer ); - - if ( ret ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_FileGroupOperationSummary*) - handlers->pointer[OTF_FILEGROUPOPERATIONSUMMARY_RECORD] ) - ( handlers->firsthandlerarg[OTF_FILEGROUPOPERATIONSUMMARY_RECORD], - buffer->time, groupid, buffer->process, nopen, nclose, - nread, nwrite, nseek, bytesread, byteswrite, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -/* *** Marker records *** ******************************************* */ - - -int OTF_Reader_readDefMarker( OTF_RBuffer* buffer, OTF_HandlerArray* handlers, uint32_t streamid ) { - - - uint32_t ret= 1; - - uint32_t token; - const char* name; - uint32_t type; - - - if ( handlers->pointer[OTF_DEFMARKER_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - token = OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_NAME ) ); - - name= OTF_RBuffer_readString( buffer ); - - if ( name == NULL ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TYPE ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TYPE ) ); - - type = OTF_RBuffer_readUint32( buffer ); - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_DefMarker*) - handlers->pointer[OTF_DEFMARKER_RECORD] ) - ( handlers->firsthandlerarg[OTF_DEFMARKER_RECORD], streamid, - token, name, type, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - -int OTF_Reader_readMarkerSpot( OTF_RBuffer* buffer, OTF_HandlerArray* handlers ) { - - - uint32_t ret= 1; - - uint32_t token; - uint64_t time; - uint32_t process; - const char* text; - - - if ( handlers->pointer[OTF_MARKER_RECORD] == NULL ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - token= OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TIME ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TIME ) ); - time= OTF_RBuffer_readUint64( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_PROCESS ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_PROCESS ) ); - process= OTF_RBuffer_readUint32( buffer ); - - ret= ret && ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_VALUE ) - || OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_VALUE ) ); - text= OTF_RBuffer_readString( buffer ); - - if ( text == NULL ) { - - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - return ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_Marker*) - handlers->pointer[OTF_MARKER_RECORD] ) - ( handlers->firsthandlerarg[OTF_MARKER_RECORD], - time, process, token, text, buffer->list ) ) ); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } -} - - - -/* *** unknown records *** ****************************************** */ - - -int OTF_Reader_readUnknownRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ) { - - int ret; - char *string; - - if ( NULL == handlers->pointer[OTF_UNKNOWN_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - string= OTF_RBuffer_printRecord( buffer ); - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - ret= ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_UnknownRecord*) - handlers->pointer[OTF_UNKNOWN_RECORD] ) - ( handlers->firsthandlerarg[OTF_UNKNOWN_RECORD], - buffer->time, buffer->process, string ) ) ); - - free( string ); - string= NULL; - - /* don't check if newline is actually there - because this could be the very parse error */ - OTF_RBuffer_readNewline( buffer ); - - return ret; -} - - -int OTF_Reader_readUnknownDefRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - int ret; - char *string; - - if ( NULL == handlers->pointer[OTF_UNKNOWN_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - string= OTF_RBuffer_printRecord( buffer ); - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - ret= ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_UnknownRecord*) - handlers->pointer[OTF_UNKNOWN_RECORD]) - ( handlers->firsthandlerarg[OTF_UNKNOWN_RECORD], - (uint64_t) -1, streamid, string ) ) ); - - free( string ); - string= NULL; - - /* don't check if newline is actually there - because this could be the very parse error */ - OTF_RBuffer_readNewline( buffer ); - - return ret; -} - - -int OTF_Reader_readUnknownMarkerRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ) { - - int ret; - char *string; - - if ( NULL == handlers->pointer[OTF_UNKNOWN_RECORD] ) { - - return OTF_RBuffer_readNewline( buffer ); - } - - string= OTF_RBuffer_printRecord( buffer ); - - /* 0 is considered as the non-error return value of call-back handlers, - but the current function returns 0 on errors! */ - ret= ( OTF_RETURN_OK /*0*/ == ( ( - (OTF_Handler_UnknownRecord*) - handlers->pointer[OTF_UNKNOWN_RECORD]) - ( handlers->firsthandlerarg[OTF_UNKNOWN_RECORD], (uint64_t) 0, - streamid, string ) ) ); - - free( string ); - string= NULL; - - /* don't check if newline is actually there - because this could be the very parse error */ - OTF_RBuffer_readNewline( buffer ); - - return ret; -} - - diff --git a/externals/otf/otflib/OTF_Parse.h b/externals/otf/otflib/OTF_Parse.h deleted file mode 100644 index 681ba5fc16ecc87fc3f08f56a8311627352b1f8b..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Parse.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_Parse.h - * - * @brief All record parsing is located here. - * - * \ingroup internal - */ - -#ifndef OTF_PARSE_H -#define OTF_PARSE_H - - -#include "OTF_RStream.h" -#include "OTF_HandlerArray.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** Parse one event record from buffer and call the appropriate - function - internal use only. */ -int OTF_Reader_parseEventRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** Parse one definition record from buffer and call the appropriate - function - internal use only. */ -int OTF_Reader_parseDefRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -/** Parse one statisitc summary record from buffer and call the - appropriate function - internal use only. */ -int OTF_Reader_parseStatisticsRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** Parse one snapshot record from buffer and call the - appropriate function - internal use only. */ -int OTF_Reader_parseSnapshotsRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -/** Parse one marker record from buffer and call the appropriate - function - internal use only. */ -int OTF_Reader_parseMarkerRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - - -/* *** handle unknown records or parts of it - internal use only! ****** *** */ - -/* These functions are external because OTF_Reader uses them */ -int OTF_Reader_readUnknownRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers ); - -int OTF_Reader_readUnknownDefRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -int OTF_Reader_readUnknownMarkerRecord( OTF_RBuffer* buffer, - OTF_HandlerArray* handlers, uint32_t streamid ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_PARSE_H */ diff --git a/externals/otf/otflib/OTF_Platform.c b/externals/otf/otflib/OTF_Platform.c deleted file mode 100644 index 3fa0cdd750477ee0b50947bd3ce07c5cbb96ef60..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Platform.c +++ /dev/null @@ -1,302 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch - - Copyright (c) 2004-2005, The Trustees of Indiana University and Indiana - University Research and Technology - Copyright (c) 2004-2006, The University of Tennessee and The University - of Tennessee Research Foundation - Copyright (c) 2004-2005, High Performance Computing Center Stuttgart, - University of Stuttgart - Copyright (c) 2004-2005, The Regents of the University of California - Copyright (c) 2007, Cisco Systems, Inc. -*/ - -#include "OTF_Platform.h" - -#include <stdlib.h> -#include <string.h> - -#if defined(_WIN32) /* windows */ - -#include <Windows.h> - - -int gettimeofday(struct timeval* tv, void* dummytimezone) { - union { - long long ns100; - FILETIME ft; - } now; - - GetSystemTimeAsFileTime (&now.ft); - tv->tv_usec = (long) ((now.ns100 / 10LL) % 1000000LL); - tv->tv_sec = (long) ((now.ns100 - 116444736000000000LL) / 10000000LL); - - return 0; -} - -#else /* unix */ - -#include <errno.h> -#include <stdio.h> - -static int guess_strlen(const char* fmt, va_list ap) { - char* sarg; - double darg; - float farg; - size_t i; - int iarg; - int len; - long larg; - - /* Start off with a fudge factor of 128 to handle the % escapes that - * we aren't calculating here */ - - len = (int)strlen(fmt) + 128; - for (i = 0; i < strlen(fmt); ++i) { - if ('%' == fmt[i] && i + 1 < strlen(fmt) && '%' != fmt[i + 1]) { - ++i; - switch (fmt[i]) { - case 'c': - (void)va_arg(ap, int); - len += 1; /* let's suppose it's a printable char */ - break; - case 's': - sarg = va_arg(ap, char*); - - /* If there's an arg, get the strlen, otherwise we'll - * use (null) */ - - if (NULL != sarg) { - len += (int)strlen(sarg); - } else { - len += 5; - } - break; - case 'd': - case 'i': - iarg = va_arg(ap, int); - /* Alloc for minus sign */ - if (iarg < 0) ++len; - /* Now get the log10 */ - do { - ++len; - iarg /= 10; - } while (0 != iarg); - break; - case 'x': - case 'X': - iarg = va_arg(ap, int); - /* Now get the log16 */ - do { - ++len; - iarg /= 16; - } while (0 != iarg); - break; - case 'f': - farg = (float)va_arg(ap, int); - /* Alloc for minus sign */ - if (farg < 0) { - ++len; - farg = -farg; - } - /* Alloc for 3 decimal places + '.' */ - len += 4; - /* Now get the log10 */ - do { - ++len; - farg /= 10.0; - } while (0 != farg); - break; - case 'g': - darg = va_arg(ap, int); - /* Alloc for minus sign */ - if (darg < 0) { - ++len; - darg = -darg; - } - /* Alloc for 3 decimal places + '.' */ - len += 4; - /* Now get the log10 */ - do { - ++len; - darg /= 10.0; - } while (0 != darg); - break; - case 'l': - /* Get %ld %lx %lX %lf */ - if (i + 1 < strlen(fmt)) { - ++i; - switch (fmt[i]) { - case 'x': - case 'X': - larg = va_arg(ap, int); - /* Now get the log16 */ - do { - ++len; - larg /= 16; - } while (0 != larg); - break; - case 'f': - darg = va_arg(ap, int); - /* Alloc for minus sign */ - if (darg < 0) { - ++len; - darg = -darg; - } - /* Alloc for 3 decimal places + '.' */ - len += 4; - /* Now get the log10 */ - do { - ++len; - darg /= 10.0; - } while (0 != darg); - break; - case 'd': - default: - larg = va_arg(ap, int); - /* Now get the log10 */ - do { - ++len; - larg /= 10; - } while (0 != larg); - break; - } - } - default: - break; - } - } - } - - return len; -} - -int OTF_asprintf(char** ptr, const char* fmt, ...) { - int length; - va_list ap; - - va_start(ap, fmt); - length = OTF_vasprintf(ptr, fmt, ap); - va_end(ap); - - return length; -} - -int OTF_vasprintf(char** ptr, const char* fmt, va_list ap) { - int length; - va_list ap2; - - /* va_list might have pointer to internal state and using - * it twice is a bad idea. So make a copy for the second - * use. Copy order taken from Autoconf docs. */ -#if defined(HAVE_VA_COPY) && HAVE_VA_COPY - va_copy(ap2, ap); -#elif defined(HAVE_UNDERSCORE_VA_COPY) && HAVE_UNDERSCORE_VA_COPY - __va_copy(ap2, ap); -#else - memcpy (&ap2, &ap, sizeof(va_list)); -#endif - - /* guess the size */ - length = guess_strlen(fmt, ap); - - /* allocate a buffer */ - *ptr = (char*) malloc((size_t) length + 1); - if (NULL == *ptr) { - errno = ENOMEM; - va_end(ap2); - return -1; - } - - /* fill the buffer */ - length = vsprintf(*ptr, fmt, ap2); -#if (defined(HAVE_VA_COPY) && HAVE_VA_COPY) || (defined(HAVE_UNDERSCORE_VA_COPY) && HAVE_UNDERSCORE_VA_COPY) - va_end(ap2); -#endif /* HAVE_VA_COPY || HAVE_UNDERSCORE_VA_COPY */ - - /* realloc */ - *ptr = (char*)realloc(*ptr, (size_t)length + 1); - if (NULL == *ptr) { - errno = ENOMEM; - return -1; - } - - return length; -} - -int OTF_snprintf(char* str, size_t size, const char* fmt, ...) { - int length; - va_list ap; - - va_start(ap, fmt); - length = OTF_vsnprintf(str, size, fmt, ap); - va_end(ap); - - return length; -} - -int OTF_vsnprintf(char* str, size_t size, const char* fmt, va_list ap) { - int length; - char* buf; - - length = OTF_vasprintf(&buf, fmt, ap); - if (length < 0) { - return length; - } - - /* return the length when given a null buffer (C99) */ - if (str) { - if ((size_t) length < size) { - strcpy(str, buf); - } else { - memcpy(str, buf, size - 1); - str[size] = '\0'; - } - } - - /* free allocated buffer */ - free(buf); - buf = NULL; - - return length; -} - -char* OTF_strdup(const char* s) { - char* c; - - if (s == NULL || (c = (char*)malloc(strlen(s)+1)) == NULL) { - errno = ENOMEM; - return NULL; - } - - strcpy(c, s) ; - - return c; -} - -#endif /* windows/unix */ - -char* OTF_basename(char* path) { - char *ret; -#if defined(_WIN32) - const char* s = "\\"; -#else - const char* s = "/"; -#endif - - if( path == NULL || strlen( path ) == 0 ) { - ret = strdup( "." ); - } else if( path[strlen(path)-1] == *s ) { - ret = strdup( s ); - } else { - char* tmp; - if( ( tmp = strrchr( path, *s ) ) != NULL ) - ret = strdup( tmp+1 ); - else - ret = strdup( path ); - } - - return ret; -} - diff --git a/externals/otf/otflib/OTF_Platform.h b/externals/otf/otflib/OTF_Platform.h deleted file mode 100644 index af9e861b08c09749c8f9779e5d0797df6a5ca240..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Platform.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_Platform.h - * - * @brief Deals with platform dependend issues. - * - * \ingroup internal - */ - - -/* THIS HEADER SHOULD NEVER BE INCLUDED INTO OTHER HEADERS OF THE OTF LIBRARY - AND HAS TO BE INCLUDED INTO ALL .C-FILES OF THE OTF LIBARY */ - - -#ifndef OTF_PLATFORM_H -#define OTF_PLATFORM_H - -#if defined(_WIN32) /* windows */ -# include "OTF_Platform_win.h" -#else /* unix */ -# include "OTF_Platform_unix.h" -#endif /* windows/unix */ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* if you know (for sure) of more compilers supporting __FUNCTION__, - then add them here */ -#if defined(__GNUC__) /* gnu */ -#elif defined(_MSC_VER) /* ms vs */ -#elif defined(__xlC__) /* ibm xlc */ -#else - - /* set __FUNCTION__ to a dummy for compilers not supporting this macro */ -# define __FUNCTION__ "<unknown function>" - -#endif - -#ifndef __FILE__ -# define __FILE__ "<unknown file>" -#endif - -#ifndef __LINE__ -# define __LINE__ 0 -#endif - -char* OTF_basename( char* path ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_PLATFORM_H */ diff --git a/externals/otf/otflib/OTF_Platform_unix.h b/externals/otf/otflib/OTF_Platform_unix.h deleted file mode 100644 index d9f0d785227d66646db95a0946c7a668a2fdab1b..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Platform_unix.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_Platform_unix.h - * - * @brief Deals with platform dependend issues. - * - * \ingroup internal - */ - - -#ifndef OTF_PLATFORM_UNIX_H -#define OTF_PLATFORM_UNIX_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <stdarg.h> -#include <stdlib.h> - - -#include <limits.h> -#if defined(HAVE_SYS_PARAM_H) && HAVE_SYS_PARAM_H -# include <sys/param.h> -#endif -#if defined(PATH_MAX) -# define OTF_PATH_MAX (PATH_MAX + 1) -#elif defined(_POSIX_PATH_MAX) -# define OTF_PATH_MAX (_POSIX_PATH_MAX + 1) -#else -# define OTF_PATH_MAX 256 -#endif - -#if !(defined(HAVE_FSEEKO) && HAVE_FSEEKO) -# undef fseeko -# undef ftello -# define fseeko fseek -# define ftello ftell -#endif /* HAVE_FSEEKO */ - -#if !(defined(HAVE_ASPRINTF) && HAVE_ASPRINTF) -# undef asprintf -# define asprintf OTF_asprintf -#endif /* HAVE_ASPRINTF */ - -#if !(defined(HAVE_SNPRINTF) && HAVE_SNPRINTF) -# undef snprintf -# define snprintf OTF_snprintf -#endif /* HAVE_SNPRINTF */ - -#if !(defined(HAVE_VASPRINTF) && HAVE_VASPRINTF) -# undef vasprintf -# define vasprintf OTF_vasprintf -#endif /* HAVE_VASPRINTF */ - -#if !(defined(HAVE_VSNPRINTF) && HAVE_VSNPRINTF) -# undef vsnprintf -# define vsnprintf OTF_vsnprintf -#endif /* HAVE_VSNPRINTF */ - -#if !(defined(HAVE_STRDUP) && HAVE_STRDUP) -# undef strdup -# define strdup OTF_strdup -#endif /* HAVE_STRDUP */ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -int OTF_asprintf( char** ptr, const char* fmt, ... ); -int OTF_snprintf( char* str, size_t size, const char* fmt, ... ); -int OTF_vasprintf( char** ptr, const char* fmt, va_list ap ); -int OTF_vsnprintf( char* str, size_t size, const char* fmt, va_list ap ); -char* OTF_strdup( const char* s ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_PLATFORM_UNIX_H */ diff --git a/externals/otf/otflib/OTF_Platform_win.h b/externals/otf/otflib/OTF_Platform_win.h deleted file mode 100644 index b5a5085f76082ce77eb8dccafcca675e6e1372be..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Platform_win.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_Platform_win.h - * - * @brief Deals with platform dependend issues. - * - * \ingroup internal - */ - - -#ifndef OTF_PLATFORM_WIN_H -#define OTF_PLATFORM_WIN_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#if defined(_MSC_VER) /* visual studio */ - -# include <limits.h> -# include <winsock2.h> - -# define HAVE_IO_H -# define HAVE_ZLIB - -# define OTF_PATH_MAX PATH_MAX - -# undef ftello -# define ftello (uint64_t) _ftelli64 -# undef fseeko -# define fseeko(f,off,orig) _fseeki64(f,(__int64)off,orig) - -# undef snprintf -# define snprintf _snprintf - -# pragma warning (disable : 4996) /* disable insecurity/deprication warnings */ - - int gettimeofday(struct timeval* tv, void* dummytimezone); - -#else - -# error "You are using an unsupported compiler on windows." - -#endif /* _MSC_VER */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_PLATFORM_WIN_H */ diff --git a/externals/otf/otflib/OTF_RBuffer.c b/externals/otf/otflib/OTF_RBuffer.c deleted file mode 100644 index efc7141cc64e4f3b971f0dc1d14410a20d994e35..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_RBuffer.c +++ /dev/null @@ -1,1398 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch - also: patches by Rainer Keller, thanks a lot! -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <assert.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <sys/stat.h> - -#include "OTF_Platform.h" -#include "OTF_RBuffer.h" -#include "OTF_Platform.h" -#include "OTF_Errno.h" - -#include "OTF_Keywords.h" - -/** constructor - internal use only */ -int OTF_RBuffer_init( OTF_RBuffer* rbuffer ); - -/** destructor - internal use only */ -int OTF_RBuffer_finish( OTF_RBuffer* rbuffer ); - -/** Fetch the next chunk from the file to buffer. Beforehand, move the -part [pos,end) to the beginning of the buffer in order to lose no record -fragments. Thus, read 'size-(end-pos)' bytes at most. -Return the number of bytes actually read. - internal use only */ -size_t OTF_RBuffer_advance( OTF_RBuffer* rbuffer ); - - -/** Check if there is a time stamp record at current buffer position. If so -read it and update the buffers time and go to the next record. -Return 1 in rbuffer case. Otherwise keep the buffer unchanged and return 0. */ -char OTF_RBuffer_checkTimeRecord( OTF_RBuffer* rbuffer ); - - -/** Check if there is a process record at current buffer position. If so -read it and update the buffers process and go to the next record. -Return 1 in rbuffer case. Otherwise keep the buffer unchanged and return 0. */ -char OTF_RBuffer_checkProcessRecord( OTF_RBuffer* rbuffer ); - - - -/* *** internal functions which may be inlined ***************************** */ - - -char OTF_RBuffer_checkTimeRecord( OTF_RBuffer* rbuffer ) { - - - uint32_t p; - char c; - - - /* identify record type, assume we are at the begining of a record */ - /* tolerate leading spaces */ - /* do not change buffer or position until we are sure that rbuffer is a - time record */ - - p= rbuffer->pos; - c= rbuffer->buffer[ p ]; - while ( ( ' ' == c ) || ( '\t' == c ) ) { - - ++p; - c= rbuffer->buffer[ p ]; - } - - /* check first real character c */ - if ( ( '0' <= c && c <= '9' ) || ( 'a' <= c && c <= 'f' ) ) { - - /* time stamp record affirmed */ - - rbuffer->pos= p; - rbuffer->time= OTF_RBuffer_readUint64( rbuffer ); - OTF_RBuffer_readNewline( rbuffer ); - return 1; - } - - /* not a time record */ - return 0; -} - - -char OTF_RBuffer_checkProcessRecord( OTF_RBuffer* rbuffer ) { - - - uint32_t p; - char c; - - - /* identify record type, assume we are at the begining of a record */ - /* tolerate leading spaces */ - /* do not change buffer or position until we are sure that rbuffer is a - time record */ - - p= rbuffer->pos; - c= rbuffer->buffer[ p ]; - while ( ( ' ' == c ) || ( '\t' == c ) ) { - - ++p; - c= rbuffer->buffer[ p ]; - } - - /* check first real character c */ - c= rbuffer->buffer[ p ]; - if ( '*' == c ) { - - ++p; - c= rbuffer->buffer[ p ]; - - /* skip spaces again */ - while ( ( ' ' == c ) || ( '\t' == c ) ) { - - ++p; - c= rbuffer->buffer[ p ]; - } - - c= rbuffer->buffer[ p ]; - if ( ( '0' <= c && c <= '9' ) || - ( 'a' <= c && c <= 'f' ) ) { - - /* process specification record affirmed */ - rbuffer->pos= p; - rbuffer->process= OTF_RBuffer_readUint32( rbuffer ); - OTF_RBuffer_readNewline( rbuffer ); - return 1; - } - } - - return 0; -} - - -/* *** public functions **************************************************** */ - - -int OTF_RBuffer_init( OTF_RBuffer* rbuffer ) { - - - rbuffer->file = NULL; - - /* buffer is allocated on demand */ - rbuffer->buffer= NULL; - rbuffer->pos= 0; - rbuffer->lastnewline= 0; - rbuffer->end= 0; - rbuffer->size= 0; - rbuffer->jumpsize= 1024; - - rbuffer->array= NULL; - rbuffer->arraysize= 0; - - rbuffer->time= (uint64_t) -1; - rbuffer->process= (uint32_t) -1; - - rbuffer->filesize= (uint64_t) -1; - rbuffer->firstTime= (uint64_t) -1; - rbuffer->lastTime= (uint64_t) -1; - - rbuffer->list = NULL; - -#ifdef HAVE_ZLIB - rbuffer->zbuffersize= 1024*10; -#endif /* HAVE_ZLIB */ - - return 1; -} - - -int OTF_RBuffer_finish( OTF_RBuffer* rbuffer ) { - - - free( rbuffer->buffer ); - rbuffer->buffer= NULL; - - if ( NULL != rbuffer->array ) { - free( rbuffer->array ); - rbuffer->array= NULL; - } - - return 1; -} - - -OTF_RBuffer* OTF_RBuffer_open( const char* filename, OTF_FileManager* manager ) { - - - OTF_RBuffer* ret; - - /* Check the input parameters */ - if( NULL == manager ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "manager has not been defined.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - ret= (OTF_RBuffer*) malloc( sizeof(OTF_RBuffer) ); - if ( NULL == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - OTF_RBuffer_init( ret ); - - ret->file= OTF_File_open( filename, manager, OTF_FILEMODE_READ ); - - if ( NULL == ret->file ) { - -/* *** commented because it can happen when defstream cannot be loaded - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_File_open() failed. filename '%s'\n", - __FUNCTION__, __FILE__, __LINE__, filename ); -*/ - - free( ret ); - ret= NULL; - - return ret; - } - - ret->list = OTF_KeyValueList_new(); - - if (ret->list == NULL) { - - free( ret->file ); - ret->file = NULL; - - free( ret ); - ret= NULL; - - return NULL; - } - -#ifdef HAVE_ZLIB - OTF_File_setZBufferSize( ret->file, ret->zbuffersize ); -#endif /* HAVE_ZLIB */ - - return ret; -} - - -int OTF_RBuffer_close( OTF_RBuffer* rbuffer ) { - - - int ret= 1; - - ret &= OTF_File_close( rbuffer->file ); - - rbuffer->file= NULL; - - if( rbuffer->list != NULL) { - OTF_KeyValueList_close( rbuffer->list); - } - - OTF_RBuffer_finish( rbuffer ); - - free( rbuffer ); - rbuffer = NULL; - - return ret; -} - - -int OTF_RBuffer_setSize( OTF_RBuffer* rbuffer, size_t size ) { - - - if ( size < 100 ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, (uint32_t) size ); - - return 0; - } - - if ( size < rbuffer->size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot shrink buffer from %u to %u.\n", - __FUNCTION__, __FILE__, __LINE__, (uint32_t) rbuffer->size, - (uint32_t) size ); - - return 0; - } - - rbuffer->size= (uint32_t) size; - rbuffer->buffer= (char*) realloc( rbuffer->buffer, - rbuffer->size * sizeof(char) ); - if( NULL == rbuffer->buffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - if ( rbuffer->jumpsize > size ) { - - rbuffer->jumpsize= (uint32_t) size; - } - - return 1; -} - - -void OTF_RBuffer_setZBufferSize( OTF_RBuffer* rbuffer, uint32_t size ) { - - -#ifdef HAVE_ZLIB - - if ( 32 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "intended zbuffer size %u is too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - return; - - } else if ( 512 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "zbuffer size %u is very small, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } else if ( 10 * 1024 *1024 < size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "zbuffer size %u is rather big, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - } - - rbuffer->zbuffersize= size; - - if( NULL != rbuffer->file ) { - OTF_File_setZBufferSize( rbuffer->file, rbuffer->zbuffersize ); - } -#endif /* HAVE_ZLIB */ - -} - - -int OTF_RBuffer_setJumpSize( OTF_RBuffer* rbuffer, size_t size ) { - - - if ( size < 100 ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "jump buffer size %u too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, (uint32_t) size ); - - return 0; - } - - if ( size > rbuffer->size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size is smaller than jump size %u.\n", - __FUNCTION__, __FILE__, __LINE__, (uint32_t) size ); - - return 0; - } - - rbuffer->jumpsize = (uint32_t) size; - - return 1; -} - - -/** make the next record availabe from the buffer. return the pointer to the -record string which is terminated by '\n' not '\0' ! -rbuffer funktion must be called before any record access. it ensures the record -is available completely in the buffer. furthermore, time and process -information is kept track of. -It is recommended to use the 'OTF_RBuffer_readXXX()' functions below to read -record components instead of parsing manually. In any case, after reading -'OTF_RBuffer_readNewline()' needs to be called which proceeds to the next -record begin no matter if there are still characters from the current record -present or not. */ -char* OTF_RBuffer_getRecord( OTF_RBuffer* rbuffer ) { - - - /* make sure there is a complete record in the buffer but - steal silently away time and process records */ - - while ( OTF_RBuffer_guaranteeRecord( rbuffer ) ) { - - if ( OTF_RBuffer_checkTimeRecord( rbuffer ) ) { - - continue; - } - - if ( OTF_RBuffer_checkProcessRecord( rbuffer ) ) { - - continue; - } - - return rbuffer->buffer + rbuffer->pos; - } - - - /* error, could not read enough from file to buffer. - probably file is exceeded. test elsewhere */ - return NULL; -} - - -int OTF_RBuffer_guaranteeRecord( OTF_RBuffer* rbuffer ) { - - - size_t add; - int ret; - - - /* check if there is at least one '\n' in the buffer */ - if ( rbuffer->pos < rbuffer->lastnewline ) { - - return 1; - } - - add= OTF_RBuffer_advance( rbuffer ); - if ( 0 == add ) { - - /* no complete record available! end of file. */ - - /* - OTF_fprintf( stderr, "OTF_RBuffer_guaranteeRecord() " - "cannot read, file exceeded\n" ); - */ - - return 0; - } - - /* after advancing the buffer, check if now there is a - complete record available */ - /* check if there is at least one '\n' in the buffer */ - if ( rbuffer->pos < rbuffer->lastnewline ) { - - /* success */ - return 1; - } - - /* if not try to double buffer size until a complete record fits */ - - /* hard bound for maximum buffer size */ - while ( 1024*1024*100 > rbuffer->size ) { - - - /* - OTF_fprintf( stderr, "OTF_RBuffer_guaranteeRecord() double buffer size " - "%u -> %u!\n", rbuffer->size, 2* rbuffer->size ); - */ - - ret= OTF_RBuffer_setSize( rbuffer, 2* rbuffer->size ); - - if ( 1 != ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot double buffer size.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - add= OTF_RBuffer_advance( rbuffer ); - if ( 0 == add ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "file exceeded.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - /* rbuffer->pos and rbuffer->end have changed */ - if ( rbuffer->pos < rbuffer->lastnewline ) { - - return 1; - } - } - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer is too small. Extending buffer has finally failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; -} - -#define REALLOCSIZE 128 -char *OTF_RBuffer_printRecord( OTF_RBuffer* rbuffer ) { - - - char *ret= NULL; - uint32_t pos= 0; - uint32_t size= 0; - uint32_t c= rbuffer->pos; - - - while ( ( '\n' != rbuffer->buffer[c] ) && ( c < rbuffer->end ) ) { - - while( (pos+1) >= size ) { - - ret= (char*) realloc( ret, size + REALLOCSIZE ); - if( NULL == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - size+= REALLOCSIZE; - } - - ret[pos]= rbuffer->buffer[c]; - ++pos; - ++c; - } - - ret[pos]= '\0'; - - - return ret; -} -#undef REALLOCSIZE - -size_t OTF_RBuffer_advance( OTF_RBuffer* rbuffer ) { - - - uint32_t i; - uint32_t d; - size_t ret; - - - if( rbuffer->pos > rbuffer->end ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "current position exceeds the file length.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - d= rbuffer->end - rbuffer->pos; - - /* move trailing buffer contents to the begining */ - for ( i= 0; i < d; ++i ) { - - rbuffer->buffer[i]= rbuffer->buffer[ rbuffer->pos + i ]; - } - rbuffer->pos= 0; - - ret= OTF_File_read( rbuffer->file, rbuffer->buffer + d, rbuffer->size - d ); - - rbuffer->end= d + ret; - - i= rbuffer->end; - rbuffer->lastnewline= 0; - - while ( i > 0 ) { - - --i; - - if ( '\n' == rbuffer->buffer[i] ) { - - rbuffer->lastnewline= i; - break; - } - } - - return ret; -} - - -/** Jump to the given file position and restore buffer and references as if -the buffer had reached the position by advancing through the file linearly. -In particular, find the next record start, then find next timestamp and -process specification in order to set 'time' and 'process' to true values. -Return 1 on success. Otherwise, when 0 is returned the file is not that large -or there are no appropriate time and process specifications on the tail of -the file. Then the buffer contents is undefined! */ -int OTF_RBuffer_jump( OTF_RBuffer* rbuffer, uint64_t filepos ) { - - - int ret; - size_t read; - /* uint64_t currentPos; */ - uint32_t i; - - /* OTF_fprintf( stderr, "\tjump to %llu\n", (unsigned long long) filepos ); */ - - ret= OTF_File_seek( rbuffer->file, filepos ); - - if ( 0 != ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_File_seek() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - rbuffer->pos= 0; - read= OTF_File_read( rbuffer->file, rbuffer->buffer, rbuffer->jumpsize ); - - rbuffer->end= (uint32_t) read; - - i= rbuffer->end; - rbuffer->lastnewline= 0; - - while ( i > 0 ) { - - --i; - - if ( '\n' == rbuffer->buffer[i] ) { - - rbuffer->lastnewline= i; - break; - } - } - - /* now we are somewhere in the middle of a record. read until next - newline and take the next record which is complete */ - if ( 0 == OTF_RBuffer_guaranteeRecord( rbuffer ) ) { - - /* - OTF_fprintf( stderr, "OTF_RBuffer_jump() " - "ERROR: could not read far enough\n" ); - */ - - return 0; - } - - /* with filepos == 0 we are sure to be already at the beginning of a record */ - if ( 0 != filepos ) { - - /* skip the incomplete record */ - OTF_RBuffer_readNewline( rbuffer ); - } - - /* make sure the next record is complete */ - if ( 0 == OTF_RBuffer_guaranteeRecord( rbuffer ) ) { - - /* - OTF_fprintf( stderr, "OTF_RBuffer_jump() " - "ERROR: could not read far enough\n" ); - */ - - return 0; - } - - /* now we are at the begining of a record */ - - rbuffer->time= (uint64_t) -1; - rbuffer->process= (uint32_t) -1; - - /* search time stamp */ - - while ( ((uint64_t) -1) == rbuffer->time ) { - - /* go on reading while time is undefined */ - - if ( 0 == OTF_RBuffer_guaranteeRecord( rbuffer ) ) { - - /* - OTF_fprintf( stderr, "OTF_RBuffer_jump() " - "ERROR: could not read far enough\n" ); - */ - return 0; - } - - if ( OTF_RBuffer_checkTimeRecord( rbuffer ) ) { - - continue; - } - - /* if no time record found, skip the current record */ - OTF_RBuffer_readNewline( rbuffer ); - } - - - /* search process spec. */ - - while ( ((uint32_t) -1) == rbuffer->process ) { - - /* go on reading while process is undefined */ - - if ( 0 == OTF_RBuffer_guaranteeRecord( rbuffer ) ) { - - /* - OTF_fprintf( stderr, "OTF_RBuffer_jump() " - "ERROR: could not read far enough\n" ); - */ - - return 0; - } - - if ( OTF_RBuffer_checkProcessRecord( rbuffer ) ) { - - continue; - } - - /* if no time record found, skip the current record */ - OTF_RBuffer_readNewline( rbuffer ); - } - - return 1; -} - - -int OTF_RBuffer_readNewline( OTF_RBuffer* rbuffer ) { - - - /* skip all non-newline characters */ - while ( '\n' != rbuffer->buffer[ rbuffer->pos ] ) { - - ++(rbuffer->pos); - - if ( rbuffer->pos >= rbuffer->end ) { - - return 0; - } - } - - /* read newline */ - ++(rbuffer->pos); - - /* dont need to catch ( rbuffer->pos >= rbuffer->end ) since rbuffer is - its own error condition */ - - return 1; -} - - -void OTF_RBuffer_skipSpaces( OTF_RBuffer* rbuffer ) { - - /* skip spaces */ - while ( ( ( ' ' == rbuffer->buffer[ rbuffer->pos ] ) || - ( '\t' == rbuffer->buffer[ rbuffer->pos ] ) ) && - ( rbuffer->pos < rbuffer->end ) ) { - - ++(rbuffer->pos); - } -} - - -uint64_t OTF_RBuffer_getCurrentTime( OTF_RBuffer* rbuffer ) { - - - if ( rbuffer->time == (uint64_t) -1 ) { - OTF_fprintf( stderr, "Warning: Invalid time\n" ); - } - - return rbuffer->time; -} - - -void OTF_RBuffer_setCurrentTime( OTF_RBuffer* rbuffer, uint64_t time ) { - - - rbuffer->time= time; -} - - -uint32_t OTF_RBuffer_getCurrentProcess( OTF_RBuffer* rbuffer ) { - - - return rbuffer->process; -} - - -void OTF_RBuffer_setCurrentProcess( OTF_RBuffer* rbuffer, uint32_t process ) { - - - rbuffer->process= process; -} - - -uint64_t OTF_RBuffer_readUint64( OTF_RBuffer* rbuffer ) { - - - char c; - uint64_t ret = 0; - - - OTF_RBuffer_skipSpaces( rbuffer ); - - while( 1 ) { - - c= rbuffer->buffer[rbuffer->pos]; - - if ( '0' <= c && c <= '9' ) { - - ret = (ret << 4) | ( c - '0' ); - ++(rbuffer->pos); - - } else if ( 'a' <= c && c <= 'f' ) { - - ret = (ret << 4) | ( c - ( 'a' - 10 ) ); - ++(rbuffer->pos); - - } else { - - return ret; - } - } -} - - -uint32_t OTF_RBuffer_readUint32( OTF_RBuffer* rbuffer ) { - - - char c; - uint32_t ret = 0; - - - OTF_RBuffer_skipSpaces( rbuffer ); - - while( 1 ) { - - c= rbuffer->buffer[rbuffer->pos]; - - if ( '0' <= c && c <= '9' ) { - - ret = (ret << 4) | ( c - '0' ); - ++(rbuffer->pos); - - } else if ( 'a' <= c && c <= 'f' ) { - - ret = (ret << 4) | ( c - ( 'a' - 10 ) ); - ++(rbuffer->pos); - - } else { - - return ret; - } - } -} - - -int OTF_RBuffer_testChar( OTF_RBuffer* rbuffer, char c ) { - - - OTF_RBuffer_skipSpaces( rbuffer ); - - /* only advance the buffer position if the right character is found */ - if ( ( rbuffer->pos < rbuffer->end ) && - ( c == rbuffer->buffer[rbuffer->pos] ) ) { - - ++(rbuffer->pos); - return 1; - } - - return 0; -} - - -int OTF_RBuffer_testKeyword( OTF_RBuffer* rbuffer, const char* string ) { - - - uint32_t i = 0; - uint32_t j = rbuffer->pos; - - OTF_RBuffer_skipSpaces( rbuffer ); - - /* only advance the buffer position if the right string is found */ - while ( string[i] ) { - - if ( string[i] != rbuffer->buffer[j] ) { - - return 0; - - } else { - - ++i; - ++j; - } - } - - /* if the next character in buffer after the keyword is \in [A,Z] - then the actual keyword is continued ==> not matching! */ - if ( ( 'A' <= rbuffer->buffer[j] ) && ( 'Z' >= rbuffer->buffer[j] ) ) { - - return 0; - } - - rbuffer->pos = j; - - return 1; -} - - -int OTF_RBuffer_testPrefix( OTF_RBuffer* rbuffer, const char* string ) { - - - uint32_t i = 0; - uint32_t j = rbuffer->pos; - - - OTF_RBuffer_skipSpaces( rbuffer ); - - /* only advance the buffer position if the right string is found */ - while ( string[i] ) { - - if ( string[i] != rbuffer->buffer[j] ) { - - return 0; - - } else { - - ++i; - ++j; - } - } - - rbuffer->pos = j; - - return 1; -} - - -/** Determine buffers firstTime and lastTime if not already set. -Return 1 on success, 0 on error. */ -int OTF_RBuffer_getFileProperties( OTF_RBuffer* rbuffer ) { - - -/* range where the last timestamp is searched */ -#define SEARCH_RANGE 1024 - - - uint64_t pos; - uint32_t searchRange; - - - /** if both are != -1 we assume everything is fine and return - successful. otherwise we go fetching both. */ - if ( ( ((uint64_t) -1) != rbuffer->filesize ) || - ( ((uint64_t) -1) != rbuffer->firstTime ) || - ( ((uint64_t) -1) != rbuffer->lastTime ) ) { - - return 1; - } - - rbuffer->filesize= OTF_File_size( rbuffer->file ); - - - /* jump to very beginning of file */ - if ( !OTF_RBuffer_jump( rbuffer, 0 ) ) { - - return 0; - } - - - /* - OTF_fprintf( stderr, "search min/max time\n" ); - */ - - /* get very first timestamp easily */ - rbuffer->firstTime= rbuffer->time; - - /* now get the last one - rbuffer is a bit more tricky */ - - /* search range must be smaller than buffer size */ - searchRange= ( SEARCH_RANGE < rbuffer->size ) ? SEARCH_RANGE : rbuffer->size; - if( 0 >= searchRange ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "the search range is not allowed to be '0'.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - /* file position to jump to: a little bit before file end */ - pos= ( rbuffer->filesize > searchRange ) ? ( rbuffer->filesize - searchRange ) : 0; - - /* while unsuccessful jump */ - rbuffer->time= (uint64_t) -1; - /*while ( ( !OTF_RBuffer_jump( rbuffer, pos ) ) && !!!!!!!!!!!!!!!!!!!!!!!!! - ( pos > searchRange ) ) { - - pos= pos - searchRange; - OTF_fprintf( stderr, " jumppos: %llu\n", (long long unsigned) pos ); - }*/ - while ( ( !OTF_RBuffer_jump( rbuffer, pos ) ) && - ( pos > 0 ) ) { - - pos= (searchRange < pos) ? pos - searchRange : 0; - } - - if ( ((uint64_t) -1) == rbuffer->time ) { - - /* found no time stamp -> give up */ - return 0; - } - - /* we found a time stamp but maybe not the last one. - so traverse to the end of the file */ - while ( OTF_RBuffer_getRecord(rbuffer) ) { - - OTF_RBuffer_readNewline( rbuffer ); - } - - rbuffer->lastTime= rbuffer->time; - - -#undef SEARCH_RANGE - - return 1; -} - - -int OTF_RBuffer_searchTime( OTF_RBuffer* rbuffer, uint64_t time ) { - - - uint64_t posA; - uint64_t posB; - uint64_t posC; - - uint64_t timeA; - uint64_t timeB; - uint64_t timeC; - - int ret; - char* ret2; - - -#define mindist 1024 - - if ( 0 == OTF_RBuffer_getFileProperties( rbuffer ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "could not determine file size (%llu) or first/last time" - " (%llx/%llx)\n", - __FUNCTION__, __FILE__, __LINE__, - (unsigned long long) rbuffer->filesize, - (unsigned long long) rbuffer->firstTime, - (unsigned long long) rbuffer->lastTime ); - - return 0; - } - - posA = 0; - posB = rbuffer->filesize; - - timeA= rbuffer->firstTime; - timeB= rbuffer->lastTime; - - /* catch cases where search time lies outside - the file's time interval */ - if ( time <= timeA ) { - - ret= OTF_RBuffer_jump( rbuffer, posA ); - if ( 1 != ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "unsuccessful jump to begin pos= %llu.\n", - __FUNCTION__, __FILE__, __LINE__, (unsigned long long) posA ); - - return 0; - } - - return 1; - } - - if ( time > timeB ) { - - time= timeB; - } - - - /* do while the distance from 'posA' to 'posB' is big. - this works with plain or compressed file positions. */ - while ( posB - posA > mindist ) { - - /* strict half splitting. robust version, - maybe add proportional splitting later */ - posC= ( posA + posB ) / 2; - - ret= OTF_RBuffer_jump( rbuffer, posC ); - if (1!=ret){ - - posB= posC; - continue; - } - - timeC= rbuffer->time; - - if ( time == timeC ) { - - /* hit exactly */ - return 1; - } - - if ( time < timeC ) { - - posB= posC; - timeB= timeC; - /* continue; */ - - } else /* if ( time > timeC ) */ { - - posA= posC; - timeA= timeC; - /* continue; */ - } - } - - /* target is nearly found, search linearly now */ - - ret= OTF_RBuffer_jump( rbuffer, posA ); - if ( 1 != ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "unsuccessful jump to begin pos= %llu.\n", - __FUNCTION__, __FILE__, __LINE__, (unsigned long long) posA ); - - return 0; - } - - while ( rbuffer->time < time ) { - - OTF_RBuffer_readNewline( rbuffer ); - ret2= OTF_RBuffer_getRecord( rbuffer ); - if( NULL == ret2 ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_RBuffer_getRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - } - - return 1; - -#undef mindist -} - - -const char* OTF_RBuffer_readString( OTF_RBuffer* rbuffer ) { - - - char* str; - - - OTF_RBuffer_skipSpaces( rbuffer ); - - if ( !OTF_RBuffer_testChar( rbuffer, '"' ) ) { - - return NULL; - } - - str= &(rbuffer->buffer[rbuffer->pos]); - - while ( rbuffer->buffer[rbuffer->pos] != '"' ) { - - if ( rbuffer->pos < rbuffer->end ) { - - ++(rbuffer->pos); - - } else { - - return NULL; - } - } - - rbuffer->buffer[rbuffer->pos] = '\0'; - ++(rbuffer->pos); - - return str; -} - - -uint32_t OTF_RBuffer_readArray( OTF_RBuffer* rbuffer, uint32_t** array, uint32_t* size ) { - - - uint32_t i= 0; - uint32_t n= 0; - - const char* p= &( rbuffer->buffer[ rbuffer->pos ] ); - - while ( ( ( '0' <= *p ) && ( '9' >= *p ) ) || - ( ( 'a' <= *p ) && ( 'f' >= *p ) ) || - ( ' ' == *p ) || - ( '\t' == *p ) || - ( ',' == *p ) ) { - - if ( ',' == *p ) { - - ++n; - } - - ++p; - } - - if ( n > (*size) ) { - (*array)= (uint32_t*) realloc( (*array), n * sizeof(uint32_t) ); - assert( NULL != (*array) ); - (*size)= n; - } - - for ( i= 0; i < n; ++i ) { - - OTF_RBuffer_skipSpaces( rbuffer ); - (*array)[i] = OTF_RBuffer_readUint32( rbuffer ); - OTF_RBuffer_testChar( rbuffer, ',' ); - } - -/* - OTF_RBuffer_skipSpaces( rbuffer ); - - while ( ( '0' <= (char) rbuffer->buffer[rbuffer->pos] && - (char) rbuffer->buffer[rbuffer->pos] <= '9' ) || - ( 'a' <= (char) rbuffer->buffer[rbuffer->pos] && - (char) rbuffer->buffer[rbuffer->pos] <= 'f' ) ) { - - array[n] = OTF_RBuffer_readUint32( rbuffer ); - ++n; - OTF_RBuffer_testChar( rbuffer, ',' ); - OTF_RBuffer_skipSpaces( rbuffer ); - } -*/ - - return n; -} - - -void OTF_RBuffer_skipKeyword( OTF_RBuffer* rbuffer ) { - - - while ( ( (char) rbuffer->buffer[rbuffer->pos] >= 'A' && - (char) rbuffer->buffer[rbuffer->pos] <= 'Z' ) || - (char) rbuffer->buffer[rbuffer->pos] == '#') { - - - ++(rbuffer->pos); - } -} - - -uint64_t OTF_RBuffer_getFileSize( OTF_RBuffer* rbuffer ) { - - - return OTF_File_size( rbuffer->file ); -} - - -uint64_t OTF_RBuffer_getFilePos( OTF_RBuffer* rbuffer ) { - - - return OTF_File_tell( rbuffer->file ); -} - -uint8_t OTF_RBuffer_readBytes( OTF_RBuffer* rbuffer, uint8_t *array, uint8_t max_len ) { - - char c; - int k = 0; - int i = 0; - - OTF_RBuffer_skipSpaces( rbuffer ); - - while( 1 ) { - - if (k == 2) { - i++; - k = 0; - } - - if ( i >= max_len ) return i; - - c= rbuffer->buffer[rbuffer->pos]; - - if ( '0' <= c && c <= '9' ) { - - array[i] = ( array[i] << 4) | ( c - '0' ); - ++(rbuffer->pos); - - } else if ( 'a' <= c && c <= 'f' ) { - - array[i] = ( array[i] << 4) | ( c - ( 'a' - 10 ) ); - ++(rbuffer->pos); - - } else { - - return i; - } - - k++; - } -} - -uint32_t OTF_RBuffer_readKeyValueList(OTF_RBuffer* buffer ) { - - - OTF_KeyValuePair pair; - - if ( buffer->list == NULL) { - - return 0; - } - - pair.key = OTF_RBuffer_readUint32( buffer ); - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_TYPE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_TYPE ) ) { - - pair.type = OTF_RBuffer_readUint32( buffer ); - - } else { - /* Parse error */ - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_S_LOCAL_VALUE ) || - OTF_RBuffer_testKeyword( buffer, OTF_KEYWORD_L_LOCAL_VALUE ) ) { - switch (pair.type) { - case OTF_CHAR: - OTF_RBuffer_readBytes( buffer, (uint8_t*) &(pair.value.otf_char), 1 ); - break; - case OTF_INT8: - pair.value.otf_int8 = OTF_RBuffer_readUint32( buffer ); - break; - case OTF_UINT8: - pair.value.otf_uint8 = OTF_RBuffer_readUint32( buffer ); - break; - case OTF_INT16: - pair.value.otf_int16 = OTF_RBuffer_readUint32( buffer ); - break; - case OTF_UINT16: - pair.value.otf_uint16 = OTF_RBuffer_readUint32( buffer ); - break; - case OTF_INT32: - pair.value.otf_int32 = OTF_RBuffer_readUint32( buffer ); - break; - case OTF_UINT32: - pair.value.otf_uint32 = OTF_RBuffer_readUint32( buffer ); - break; - case OTF_INT64: - pair.value.otf_int64 = OTF_RBuffer_readUint64( buffer ); - break; - case OTF_UINT64: - pair.value.otf_uint64 = OTF_RBuffer_readUint64( buffer ); - break; - case OTF_DOUBLE: - pair.value.otf_double = OTF_Int64ToDouble( OTF_RBuffer_readUint64( buffer ) ); - break; - case OTF_FLOAT: - pair.value.otf_float = OTF_Int32ToFloat( OTF_RBuffer_readUint32( buffer ) ); - break; - case OTF_BYTE_ARRAY: - pair.value.otf_byte_array.len = OTF_RBuffer_readBytes( buffer, pair.value.otf_byte_array.array, OTF_KEYVALUE_MAX_ARRAY_LEN); - break; - default: - - /* Pasre error */ - PARSE_ERROR( buffer ); - - return 0; - } - - } else { - - /* Parse error */ - PARSE_ERROR( buffer ); - - return 0; - } - - if ( OTF_RBuffer_readNewline( buffer ) ) { - - OTF_KeyValueList_appendPair(buffer->list, pair); - - } else { - - PARSE_ERROR( buffer ); - - return 0; - } - - return 1; -} - diff --git a/externals/otf/otflib/OTF_RBuffer.h b/externals/otf/otflib/OTF_RBuffer.h deleted file mode 100644 index c5fc20021892c2781dbe912148a4621a8483dd71..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_RBuffer.h +++ /dev/null @@ -1,241 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_RBuffer.h - * - * @brief Provides read access to trace buffers. - * - * \ingroup internal - */ - - -#ifndef OTF_RBUFFER_H -#define OTF_RBUFFER_H - - -#include <stdlib.h> -#include <stdio.h> - - -#include "OTF_inttypes.h" - - -#include "OTF_File.h" - -#include "OTF_KeyValue.h" - -/* *** some macros *** ****************************************** */ -#define PARSE_ERROR( buffer ) \ - OTF_fprintf( stderr, "parse error in %s() %s:%u : %s", \ - __FUNCTION__, __FILE__, __LINE__, OTF_RBuffer_printRecord( buffer ) ); - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct struct_OTF_RBuffer { - - - OTF_File* file; - - - /** actual buffer */ - char* buffer; - - /** Current read position in buffer. - 'end <= pos' indicates an invalid state! */ - uint32_t pos; - - /** Current end of data in buffer in case it is not full. - 'end <= pos' indicates an invalid state! */ - uint32_t end; - - /** Last '\n' in the buffer. */ - uint32_t lastnewline; - - /** Current size of buffer. */ - uint32_t size; - - /** If 'OTF_RBuffer_jump()' is called only 'jumpsize' bytes are - read into buffer. */ - uint32_t jumpsize; - - /** Array which hold the members of a DEFPROCESSGROUP record - or the list of attributes of a DEFATTRLIST record. */ - uint32_t* array; - - /** Current size of array. */ - uint32_t arraysize; - - /** Current time inside this stream, necessary for state machine, - (-1) means unknown. */ - uint64_t time; - - /** Current process inside this stream, necessary for state machine, - (-1) means unknown. */ - uint32_t process; - - /** Total size of the file in bytes. This is used in - searchTime(). A value of (-1) means unknown. - Determined by internal function OTF_RBuffer_getFileProperties(). */ - uint64_t filesize; - - /** The very first timestamp of that stream. This is used in - searchTime(). A value of (-1) means unknown. - Determined by internal function OTF_RBuffer_getFileProperties(). */ - uint64_t firstTime; - - /** The very last timestamp of that stream. This is used in - searchTime(). A value of (-1) means unknown. - Determined by internal function OTF_RBuffer_getFileProperties(). */ - uint64_t lastTime; - - OTF_KeyValueList* list; - -#ifdef HAVE_ZLIB - /** Default size of zbuffers managed by this buffer. */ - uint32_t zbuffersize; -#endif /* HAVE_ZLIB */ -}; -typedef struct struct_OTF_RBuffer OTF_RBuffer; - - -/** constructor - internal use only */ -OTF_RBuffer* OTF_RBuffer_open( const char* filename, OTF_FileManager* manager ); - -/** destructor - internal use only */ -int OTF_RBuffer_close( OTF_RBuffer* rbuffer ); - -/** Set buffer size. Cannot shrink buffer but only extend. */ -int OTF_RBuffer_setSize( OTF_RBuffer* rbuffer, size_t size ); - -/** Set zbuffer size. */ -void OTF_RBuffer_setZBufferSize( OTF_RBuffer* rbuffer, uint32_t size ); - -/** Set 'jumpsize'. Return 0 if 'size' is greater than the - buffer size. */ -int OTF_RBuffer_setJumpSize( OTF_RBuffer* rbuffer, size_t size ); - -/** Make the next record availabe from the buffer. Return the pointer to the - record string which is terminated by '\n' not '\0' ! - This funktion must be called before any record access. It ensures the - record is available completely in the buffer. Furthermore, time and process - information is kept track of. - It is recommended to use the 'OTF_RBuffer_readXXX()' functions below to - read record components instead of parsing manually. In any case, after - reading 'OTF_RBuffer_readNewline()' needs to be called which proceeds to - the next record begin no matter if there are still characters from the - current record present or not. */ -char* OTF_RBuffer_getRecord( OTF_RBuffer* rbuffer ); - - -/** Ask the buffer to guarantee at least one complete record at the current - read position inside the buffer. This means one line, e.g. '\n' character. - If no complete record is found the buffer has to be advanced by reading new - contents from file. Return 1 on success, 0 means the file is exceeded. */ -int OTF_RBuffer_guaranteeRecord( OTF_RBuffer* rbuffer ); - - -/** Print the record at the current buffer position, i.e. until the next - newline character. This is for debugging purposes only and won't modify the - buffer in any way. */ -char *OTF_RBuffer_printRecord( OTF_RBuffer* rbuffer ); - - -/** Jump to the given file position and restore buffer and references as if - the buffer had reached the position by advancing through the file linearly. - In particular, find the next record start, then find next timestamp and - process specification in order to set 'time' and 'process' to true values. - Return error code 1 on success. Otherwise the file is not that large or - there are no appropriate time and process specifications on the tail of - the file. Then the buffer contents is undefined */ -int OTF_RBuffer_jump( OTF_RBuffer* rbuffer, uint64_t filepos ); - -/** Read an 64bit unsigned integer in hex format from buffer and return it. */ -uint64_t OTF_RBuffer_readUint64( OTF_RBuffer* rbuffer ); - -/** Read an unsigned integer in hex format from buffer and return it. */ -uint32_t OTF_RBuffer_readUint32( OTF_RBuffer* rbuffer ); - -/** Read a string from buffer and return it. */ -const char* OTF_RBuffer_readString( OTF_RBuffer* rbuffer ); - -/** Read an array from buffer and return the number of elements. - (re)malloc memory for *array internally, needs to be freed by caller */ -uint32_t OTF_RBuffer_readArray( OTF_RBuffer* rbuffer, uint32_t** array, uint32_t* size ); - -/** Test if the next character equals the given one (leading spaces are - ignored). If the right character is found return 1, and advance by 1 step. - If the character was not found, keep the buffer position such that the test - can be repeated with another character. */ -int OTF_RBuffer_testChar( OTF_RBuffer* rbuffer, char c ); - -/** Test if the next string equals the given one (leading spaces are - ignored). The next character must not be an uppercase letter as used in - keywords. If the right string is found return 1, and advance the buffer - position. If the string was not found, keep the buffer position such - that the test can be repeated with another string. */ -int OTF_RBuffer_testKeyword( OTF_RBuffer* rbuffer, const char* string ); - -/** Test if the next string equals the given one (leading spaces are - ignored). This version is similar to the above function but does not test - the following character, i.e. it can be used to test for prefixes. - If the right string is found return 1, and advance the buffer - position. If the string was not found, keep the buffer position such - that the test can be repeated with another string. */ -int OTF_RBuffer_testPrefix( OTF_RBuffer* rbuffer, const char* string ); - -/** Read a newline such that the buffer pos is at the next record beginning. - Skip all characters found, assume they are to be ignored. - Return 1 on success, 0 on error. */ -int OTF_RBuffer_readNewline( OTF_RBuffer* rbuffer ); - -/** Advance the buffer position while there are spaces. */ -void OTF_RBuffer_skipSpaces( OTF_RBuffer* rbuffer ); - -/** Advance the buffer position while there are capital letters. */ -void OTF_RBuffer_skipKeyword( OTF_RBuffer* rbuffer ); - -/** Return the current time of the buffer. */ -uint64_t OTF_RBuffer_getCurrentTime( OTF_RBuffer* rbuffer ); - -/** Set the current time of the buffer to the given one. */ -void OTF_RBuffer_setCurrentTime( OTF_RBuffer* rbuffer, uint64_t time ); - -/** Return the current process of the buffer. */ -uint32_t OTF_RBuffer_getCurrentProcess( OTF_RBuffer* rbuffer ); - -/** Set the current process of the buffer to the given one. */ -void OTF_RBuffer_setCurrentProcess( OTF_RBuffer* rbuffer, uint32_t process ); - -/** Search the buffer for the given time and set the buffer position to - the next record after that time. Return 1 on success, 0 on error. */ -int OTF_RBuffer_searchTime( OTF_RBuffer* rbuffer, uint64_t time ); - -/** Determine buffers filesize, firstTime and lastTime if not already set. - Return 1 on success, 0 on error. */ -int OTF_RBuffer_getFileProperties( OTF_RBuffer* rbuffer ); - -/** Returns the filesize of the file attached to this buffer */ -uint64_t OTF_RBuffer_getFileSize( OTF_RBuffer* rbuffer ); - -/** Returns the fileposition of the file attached to this buffer */ -uint64_t OTF_RBuffer_getFilePos( OTF_RBuffer* rbuffer ); - -/** Read a byte array in hex format from buffer and returns the bytes */ -/** read (=lenght of array) */ -uint8_t OTF_RBuffer_readBytes( OTF_RBuffer* rbuffer, uint8_t *array, uint8_t max_len ); - -/** Read a KeyValueList from the buffer. Return 1 on success, 0 on error */ -uint32_t OTF_RBuffer_readKeyValueList(OTF_RBuffer* buffer ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_RBUFFER_H */ - diff --git a/externals/otf/otflib/OTF_RStream.c b/externals/otf/otflib/OTF_RStream.c deleted file mode 100644 index 62d1940079a015753a17fb7a2a998fd3e3dcf54c..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_RStream.c +++ /dev/null @@ -1,1132 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch - also: patches by Rainer Keller, thanks a lot! -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "OTF_Platform.h" -#include "OTF_RStream.h" -#include "OTF_Platform.h" -#include "OTF_Reader.h" -#include "OTF_Parse.h" -#include "OTF_Errno.h" - -#include "OTF_Keywords.h" - - -/** constructor - internal use only */ -int OTF_RStream_init( OTF_RStream* rstream ); - -/** destructor - internal use only */ -int OTF_RStream_finish( OTF_RStream* rstream ); - - -/* ************************************************************************** */ - - -int OTF_RStream_init( OTF_RStream* rstream ) { - - - rstream->namestub= NULL; - rstream->id= (uint32_t) -1; - - rstream->defBuffer= NULL; - rstream->eventBuffer= NULL; - rstream->snapsBuffer= NULL; - rstream->statsBuffer= NULL; - rstream->markerBuffer= NULL; - - rstream->buffersizes= 1024*1024; - -#ifdef HAVE_ZLIB - rstream->zbuffersizes= 1024*10; -#endif /* HAVE_ZLIB */ - - rstream->manager= NULL; - - rstream->recordLimit= OTF_READ_MAXRECORDS; - - return 1; -} - - -int OTF_RStream_finish( OTF_RStream* rstream ) { - - - int ret=1; - int tmpret; - - free( rstream->namestub ); - rstream->namestub= NULL; - - rstream->id= (uint32_t) -1; - - if ( NULL != rstream->defBuffer ) { - - tmpret= OTF_RBuffer_close( rstream->defBuffer ); - ret &= tmpret; - if( 0 == tmpret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot close defbuffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - rstream->defBuffer= NULL; - } - - if ( NULL != rstream->eventBuffer ) { - - tmpret= OTF_RBuffer_close( rstream->eventBuffer ); - ret &= tmpret; - if( 0 == tmpret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot close event buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - } - rstream->eventBuffer= NULL; - } - - if ( NULL != rstream->snapsBuffer ) { - - tmpret= OTF_RBuffer_close( rstream->snapsBuffer ); - ret &= tmpret; - if( 0 == tmpret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot close snapshots buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - } - rstream->snapsBuffer= NULL; - } - - if ( NULL != rstream->statsBuffer ) { - - tmpret= OTF_RBuffer_close( rstream->statsBuffer ); - ret &= tmpret; - if( 0 == tmpret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot close statistics buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - } - rstream->statsBuffer= NULL; - } - - if ( NULL != rstream->markerBuffer ) { - - tmpret= OTF_RBuffer_close( rstream->markerBuffer ); - ret &= tmpret; - if( 0 == tmpret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot close defbuffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - } - rstream->markerBuffer= NULL; - } - - return ret; -} - - -OTF_RStream* OTF_RStream_open( const char* namestub, uint32_t id, OTF_FileManager* manager ) { - - - OTF_RStream* ret; - - /* Check the input parameters */ - if( NULL == manager ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "manager has not been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - ret= (OTF_RStream*) malloc( sizeof(OTF_RStream) ); - if( NULL == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - OTF_RStream_init( ret ); - - ret->namestub= strdup( namestub ); - ret->id= id; - - ret->manager= manager; - - /* leave buffers alone, they are allocated on demand */ - - return ret; -} - - -int OTF_RStream_close( OTF_RStream* rstream ) { - - - int ret= 1; - - if( NULL == rstream ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "rstream has not been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - ret &= OTF_RStream_finish( rstream ); - - free( rstream ); - rstream = NULL; - - return ret; -} - - -OTF_RBuffer* OTF_RStream_getDefBuffer( OTF_RStream* rstream ) { - - - char* filename; - - - if ( NULL == rstream->defBuffer ) { - - filename= OTF_getFilename( rstream->namestub, - rstream->id, OTF_FILETYPE_DEF, 0, NULL ); - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_getFilename() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - rstream->defBuffer= OTF_RBuffer_open( filename, rstream->manager ); - free( filename ); - filename = NULL; - - if ( NULL == rstream->defBuffer ) { - - return NULL; - } - - OTF_RBuffer_setSize( rstream->defBuffer, rstream->buffersizes ); -#ifdef HAVE_ZLIB - OTF_RBuffer_setZBufferSize( rstream->defBuffer, rstream->zbuffersizes ); -#endif /* HAVE_ZLIB */ - } - - return rstream->defBuffer; -} - - -int OTF_RStream_closeDefBuffer( OTF_RStream* rstream ) { - - - int ret= 1; - - if ( NULL != rstream->defBuffer ) { - - ret&= OTF_RBuffer_close( rstream->defBuffer ); - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "closing defbuffer failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - } - - rstream->defBuffer= NULL; - } - - return ret; -} - - -OTF_RBuffer* OTF_RStream_getEventBuffer( OTF_RStream* rstream ) { - - - char* filename; - - - if ( NULL == rstream->eventBuffer ) { - - filename = OTF_getFilename( rstream->namestub, - rstream->id, OTF_FILETYPE_EVENT, 0, NULL ); - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_getFilename() failed for event file with name stub '%s' and ID %u.\n", - __FUNCTION__, __FILE__, __LINE__, rstream->namestub, rstream->id ); - - return NULL; - } - - rstream->eventBuffer= OTF_RBuffer_open( filename, rstream->manager ); - if ( NULL == rstream->eventBuffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_RBuffer_open() failed for filename '%s'.\n", - __FUNCTION__, __FILE__, __LINE__, filename ); - - free( filename ); - filename = NULL; - return NULL; - } - - free( filename ); - filename = NULL; - - - OTF_RBuffer_setSize( rstream->eventBuffer, rstream->buffersizes ); -#ifdef HAVE_ZLIB - OTF_RBuffer_setZBufferSize( rstream->eventBuffer, rstream->zbuffersizes ); -#endif /* HAVE_ZLIB */ - } - - return rstream->eventBuffer; -} - - -int OTF_RStream_closeEventBuffer( OTF_RStream* rstream ) { - - - int ret= 1; - - if ( NULL != rstream->eventBuffer ) { - - ret&= OTF_RBuffer_close( rstream->eventBuffer ); - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "closing event buffer failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - } - rstream->eventBuffer= NULL; - } - - return ret; -} - - -OTF_RBuffer* OTF_RStream_getSnapsBuffer( OTF_RStream* rstream ) { - - - char* filename; - - - if ( NULL == rstream->snapsBuffer ) { - - filename= OTF_getFilename( rstream->namestub, - rstream->id, OTF_FILETYPE_SNAPS, 0, NULL ); - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_getFilename() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - rstream->snapsBuffer= OTF_RBuffer_open( filename, rstream->manager ); - free( filename ); - filename = NULL; - - if ( NULL == rstream->snapsBuffer ) { - - return NULL; - } - - OTF_RBuffer_setSize( rstream->snapsBuffer, rstream->buffersizes ); -#ifdef HAVE_ZLIB - OTF_RBuffer_setZBufferSize( rstream->snapsBuffer, rstream->zbuffersizes ); -#endif /* HAVE_ZLIB */ - } - - return rstream->snapsBuffer; -} - - -int OTF_RStream_closeSnapsBuffer( OTF_RStream* rstream ) { - - - int ret= 1; - - if ( NULL != rstream->snapsBuffer ) { - - ret&= OTF_RBuffer_close( rstream->snapsBuffer ); - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "closing snapshots buffer failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - } - rstream->snapsBuffer= NULL; - } - - return ret; -} - - -OTF_RBuffer* OTF_RStream_getStatsBuffer( OTF_RStream* rstream ) { - - - char* filename; - - - if ( NULL == rstream->statsBuffer ) { - - filename= OTF_getFilename( rstream->namestub, - rstream->id, OTF_FILETYPE_STATS, 0, NULL ); - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_getFilename() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - - rstream->statsBuffer= OTF_RBuffer_open( filename, rstream->manager ); - free( filename ); - filename = NULL; - - if ( NULL == rstream->statsBuffer ) { - -/* *** commented because it can happen when file not exists - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_RBuffer_open() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); -*/ - - return NULL; - } - - OTF_RBuffer_setSize( rstream->statsBuffer, rstream->buffersizes ); -#ifdef HAVE_ZLIB - OTF_RBuffer_setZBufferSize( rstream->statsBuffer, rstream->zbuffersizes ); -#endif /* HAVE_ZLIB */ - } - - return rstream->statsBuffer; -} - - -int OTF_RStream_closeStatsBuffer( OTF_RStream* rstream ) { - - - int ret= 1; - - if ( NULL != rstream->statsBuffer ) { - - ret&= OTF_RBuffer_close( rstream->statsBuffer ); - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "closing statistics buffer failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - } - rstream->statsBuffer= NULL; - } - - return ret; -} - - -OTF_RBuffer* OTF_RStream_getMarkerBuffer( OTF_RStream* rstream ) { - - - char* filename; - - - if ( NULL == rstream->markerBuffer ) { - - filename= OTF_getFilename( rstream->namestub, - rstream->id, OTF_FILETYPE_MARKER, 0, NULL ); - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_getFilename() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - rstream->markerBuffer= OTF_RBuffer_open( filename, rstream->manager ); - free( filename ); - filename = NULL; - - if ( NULL == rstream->markerBuffer ) { - - return NULL; - } - - OTF_RBuffer_setSize( rstream->markerBuffer, rstream->buffersizes ); -#ifdef HAVE_ZLIB - OTF_RBuffer_setZBufferSize( rstream->markerBuffer, rstream->zbuffersizes ); -#endif /* HAVE_ZLIB */ - } - - return rstream->markerBuffer; -} - - -int OTF_RStream_closeMarkerBuffer( OTF_RStream* rstream ) { - - - int ret= 1; - - if ( NULL != rstream->markerBuffer ) { - - ret&= OTF_RBuffer_close( rstream->markerBuffer ); - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "closing defbuffer failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - } - - rstream->markerBuffer= NULL; - } - - return ret; -} - - -void OTF_RStream_setBufferSizes( OTF_RStream* rstream, uint32_t size ) { - - - if ( 50 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "intended buffer size %u is too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - return; - - } else if ( 500 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u is very small, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } else if ( 10 * 1024 *1024 < size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u is rather big, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } - - rstream->buffersizes= size; -} - - -uint32_t OTF_RStream_getBufferSizes(OTF_RStream* rstream) { - - - return rstream->buffersizes; -} - - -void OTF_RStream_setZBufferSizes( OTF_RStream* rstream, uint32_t size ) { - - -#ifdef HAVE_ZLIB - - if ( 32 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "intended zbuffer size %u is too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - return; - - } else if ( 512 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "zbuffer size %u is very small, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } else if ( 10 * 1024 *1024 < size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "zbuffer size %u is rather big, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } - - rstream->zbuffersizes= size; - -#endif /* HAVE_ZLIB */ -} - - -uint32_t OTF_RStream_getZBufferSizes(OTF_RStream* rstream) { - - -#ifdef HAVE_ZLIB - return rstream->zbuffersizes; -#else /* HAVE_ZLIB */ - return 0; -#endif /* HAVE_ZLIB */ -} - - -void OTF_RStream_setRecordLimit( OTF_RStream* rstream, uint64_t limit ) { - - - if( limit == OTF_READ_ERROR ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "limit cannot be set to %llu. Reset to OTF_READ_MAXRECORDS.\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) limit ); - - limit= OTF_READ_MAXRECORDS; - } - - rstream->recordLimit= limit; -} - - -uint64_t OTF_RStream_getRecordLimit( OTF_RStream* rstream ) { - - - return rstream->recordLimit; -} - - - -uint64_t OTF_RStream_readDefinitions( OTF_RStream* rstream, OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - - int ret; - - char next_char = '\0'; - - /* initialized? */ - if ( NULL == rstream->defBuffer ) { - - - /* init */ - - rstream->defBuffer= OTF_RStream_getDefBuffer( rstream ); - - if ( NULL == rstream->defBuffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "the stream has no def buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - /* there is no def buffer available for this stream */ - return OTF_READ_ERROR; - } - } - - - while ( NULL != OTF_RBuffer_getRecord( rstream->defBuffer ) ) { - - if ( recordcount >= rstream->recordLimit ) { - - /* record count limit reached, return */ - return recordcount; - } - - /* remember next record type, if it will be a none - KEYVALUE record, dont't account it in recordcount */ - next_char = *(rstream->defBuffer->buffer + rstream->defBuffer->pos); - - ret= OTF_Reader_parseDefRecord( rstream->defBuffer, handlers, rstream->id ); - if ( 0 == ret ) { - - /* maybe later an errorhandler gives the record to the user */ - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none - KEYVALUE record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(rstream->defBuffer->list); - recordcount++; - } - - } - - return recordcount; -} - - -uint64_t OTF_RStream_readEvents( OTF_RStream* rstream, OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - - int ret; - -# ifdef OTF_DEBUG - uint64_t currenttime= 0; - uint64_t oldtime= 0; -# endif - - char next_char = '\0'; - - /* initialized? */ - if ( NULL == rstream->eventBuffer ) { - - - /* init */ - - rstream->eventBuffer= OTF_RStream_getEventBuffer( rstream ); - if( NULL == rstream->eventBuffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "the stream has no event buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return OTF_READ_ERROR; - } - - - /* jump to start time - update buffer-firstTime, lastTime, curTime */ - OTF_RBuffer_searchTime( rstream->eventBuffer, 0 ); - } - - - while ( NULL != OTF_RBuffer_getRecord( rstream->eventBuffer ) ) { - - if ( recordcount >= rstream->recordLimit ) { - - /* record count limit reached, return */ - return recordcount; - } - - /* debug check */ -# ifdef OTF_DEBUG - oldtime= currenttime; - /* inlined OTF_RBuffer_getCurrentTime() */ - currenttime= rstream->eventBuffer->time; - - if ( oldtime > currenttime ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Time does decrease!!! %llu < %llu.\n", - __FUNCTION__, __FILE__, __LINE__, - (unsigned long long) currenttime, - (unsigned long long) oldtime ); - - return OTF_READ_ERROR; - } -# endif - - /* remember next record type, if it will be a none - KEYVALUE record, dont't account it in recordcount */ - next_char = *(rstream->eventBuffer->buffer + rstream->eventBuffer->pos); - - ret= OTF_Reader_parseEventRecord( rstream->eventBuffer, handlers ); - if ( 0 == ret ) { - - /* maybe later an errorhandler gives the record to the user */ - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none - KEYVALUE record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(rstream->eventBuffer->list); - recordcount++; - } - - } - - return recordcount; -} - - -uint64_t OTF_RStream_readSnapshots( OTF_RStream* rstream, OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - - int ret; - -# ifdef OTF_DEBUG - uint64_t currenttime= 0; - uint64_t oldtime= 0; -# endif - - char next_char = '\0'; - - /* initialized? */ - if ( NULL == rstream->snapsBuffer ) { - - - /* init */ - - rstream->snapsBuffer= OTF_RStream_getSnapsBuffer( rstream ); - if( NULL == rstream->snapsBuffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "the stream has no snapshots buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return OTF_READ_ERROR; - } - - - /* jump to start time - update buffer-firstTime, lastTime, curTime */ - OTF_RBuffer_searchTime( rstream->snapsBuffer, 0 ); - } - - - while ( NULL != OTF_RBuffer_getRecord( rstream->snapsBuffer ) ) { - - if ( recordcount >= rstream->recordLimit ) { - - /* record count limit reached, return */ - return recordcount; - } - - /* debug check */ -# ifdef OTF_DEBUG - oldtime= currenttime; - /* inlined OTF_RBuffer_getCurrentTime() */ - currenttime= rstream->snapsBuffer->time; - - if ( oldtime > currenttime ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Time does decrease!!! %llu < %llu.\n", - __FUNCTION__, __FILE__, __LINE__, - (unsigned long long) currenttime, - (unsigned long long) oldtime ); - - return OTF_READ_ERROR; - } -# endif - - /* remember next record type, if it will be a none - KEYVALUE record, dont't account it in recordcount */ - next_char = *(rstream->snapsBuffer->buffer + rstream->snapsBuffer->pos); - - ret= OTF_Reader_parseSnapshotsRecord( rstream->snapsBuffer, handlers ); - if ( 0 == ret ) { - - /* maybe later an errorhandler gives the record to the user */ - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none - KEYVALUE record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(rstream->snapsBuffer->list); - recordcount++; - } - - } - - return recordcount; -} - - -uint64_t OTF_RStream_readStatistics( OTF_RStream* rstream, OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - - int ret; - -# ifdef OTF_DEBUG - uint64_t currenttime= 0; - uint64_t oldtime= 0; -# endif - - char next_char = '\0'; - - /* initialized? */ - if ( NULL == rstream->statsBuffer ) { - - - /* init */ - - rstream->statsBuffer= OTF_RStream_getStatsBuffer( rstream ); - if( NULL == rstream->statsBuffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "the stream has no statistics buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return OTF_READ_ERROR; - } - - - /* jump to start time - update buffer-firstTime, lastTime, curTime */ - OTF_RBuffer_searchTime( rstream->statsBuffer, 0 ); - } - - - while ( NULL != OTF_RBuffer_getRecord( rstream->statsBuffer ) ) { - - if ( recordcount >= rstream->recordLimit ) { - - /* record count limit reached, return */ - return recordcount; - } - - /* debug check */ -# ifdef OTF_DEBUG - oldtime= currenttime; - /* inlined OTF_RBuffer_getCurrentTime() */ - currenttime= rstream->statsBuffer->time; - - if ( oldtime > currenttime ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Time does decrease!!! %llu < %llu.\n", - __FUNCTION__, __FILE__, __LINE__, - (unsigned long long) currenttime, - (unsigned long long) oldtime ); - - return OTF_READ_ERROR; - } -# endif - - /* remember next record type, if it will be a none - KEYVALUE record, dont't account it in recordcount */ - next_char = *(rstream->statsBuffer->buffer + rstream->statsBuffer->pos); - - ret= OTF_Reader_parseStatisticsRecord( rstream->statsBuffer, handlers ); - if ( 0 == ret ) { - - - /* maybe later an errorhandler gives the record to the user */ - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none - KEYVALUE record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(rstream->statsBuffer->list); - recordcount++; - } - - - } - - return recordcount; -} - - -uint64_t OTF_RStream_readMarker( OTF_RStream* rstream, OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - - int ret; - - char next_char = '\0'; - - /* initialized? */ - if ( NULL == rstream->markerBuffer ) { - - - /* init */ - - rstream->markerBuffer= OTF_RStream_getMarkerBuffer( rstream ); - - if ( NULL == rstream->markerBuffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "the stream has no def buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - /* there is no def buffer available for this stream */ - return OTF_READ_ERROR; - } - } - - - while ( NULL != OTF_RBuffer_getRecord( rstream->markerBuffer ) ) { - - if ( recordcount >= rstream->recordLimit ) { - - /* record count limit reached, return */ - return recordcount; - } - - /* remember next record type, if it will be a none - KEYVALUE record, dont't account it in recordcount */ - next_char = *(rstream->markerBuffer->buffer + rstream->markerBuffer->pos); - - ret= OTF_Reader_parseMarkerRecord( rstream->markerBuffer, handlers, rstream->id ); - if ( 0 == ret ) { - - /* maybe later an errorhandler gives the record to the user */ - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none - KEYVALUE record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(rstream->markerBuffer->list); - recordcount++; - } - - } - - return recordcount; -} - - -uint8_t OTF_RStream_eventProgress( OTF_RStream* rstream, uint64_t* minimum, - uint64_t* current, uint64_t* maximum ) { - - - return OTF_RStream_eventTimeProgress( rstream, minimum, current, maximum ); -} - - -uint8_t OTF_RStream_snapshotProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - return OTF_RStream_snapshotTimeProgress( rstream, minimum, current, maximum ); -} - - -uint8_t OTF_RStream_statisticProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - return OTF_RStream_statisticTimeProgress( rstream, minimum, current, maximum ); -} - - -uint8_t OTF_RStream_eventTimeProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - if ( NULL == rstream->eventBuffer || - rstream->eventBuffer->time < rstream->eventBuffer->firstTime || - rstream->eventBuffer->time > rstream->eventBuffer->lastTime ) { - - return 0; - } - - *minimum= rstream->eventBuffer->firstTime; - *current= rstream->eventBuffer->time; - *maximum= rstream->eventBuffer->lastTime; - - return 1; -} - - -uint8_t OTF_RStream_snapshotTimeProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - if ( NULL == rstream->snapsBuffer || - rstream->snapsBuffer->time < rstream->snapsBuffer->firstTime || - rstream->snapsBuffer->time > rstream->snapsBuffer->lastTime ) { - - return 0; - } - - *minimum= rstream->snapsBuffer->firstTime; - *current= rstream->snapsBuffer->time; - *maximum= rstream->snapsBuffer->lastTime; - - return 1; -} - - -uint8_t OTF_RStream_statisticTimeProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - if ( NULL == rstream->statsBuffer || - rstream->statsBuffer->time < rstream->statsBuffer->firstTime || - rstream->statsBuffer->time > rstream->statsBuffer->lastTime ) { - - return 0; - } - - *minimum= rstream->statsBuffer->firstTime; - *current= rstream->statsBuffer->time; - *maximum= rstream->statsBuffer->lastTime; - - return 1; -} - - -uint8_t OTF_RStream_eventBytesProgress( OTF_RStream* rstream, uint64_t* minimum, - uint64_t* current, uint64_t* maximum ) { - - - *minimum= 0; - *maximum= OTF_RBuffer_getFileSize( rstream->eventBuffer ); - *current= OTF_RBuffer_getFilePos( rstream->eventBuffer ); - - if( *current > *maximum ) { - *current= *maximum; - } - - return 1; -} - - -uint8_t OTF_RStream_snapshotBytesProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - *minimum= 0; - *maximum= OTF_RBuffer_getFileSize( rstream->snapsBuffer ); - *current= OTF_RBuffer_getFilePos( rstream->snapsBuffer ); - - if( *current > *maximum ) { - *current= *maximum; - } - - return 1; -} - - -uint8_t OTF_RStream_statisticBytesProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - *minimum= 0; - *maximum= OTF_RBuffer_getFileSize( rstream->statsBuffer ); - *current= OTF_RBuffer_getFilePos( rstream->statsBuffer ); - - if( *current > *maximum ) { - *current= *maximum; - } - - return 1; -} diff --git a/externals/otf/otflib/OTF_RStream.h b/externals/otf/otflib/OTF_RStream.h deleted file mode 100644 index f879bf9bf156cce3a6d1354a85dfbb46edd7cdea..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_RStream.h +++ /dev/null @@ -1,681 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/* NOTE -the OTF_RStream interface is not able to perform jumps to random timestamps, -and cannot quit at a certain maximum time stamp. -Maybe in future versions we add this. -It is not in, because the OTF_Reader interface uses the buffer-methodes directly -to set the timestamps, so saving it in the stream too will be worthless in this -case. */ - -/** - * @file OTF_RStream.h - * - * @brief Provides read access to trace streams, which consist of multiple - * buffers. - * - * \ingroup rstream - */ - -/** \defgroup rstream Stream Reader Interface - * - * rstream provides an interface for dealing with a single stream of a trace. - * A stream consists of up to four different buffers (event buffer, - * definition buffer, snapshots buffer, statistics buffer). - * - * rstream is structured similarly to the reader, but it is not - * able to perform jumps to random timestamps, and cannot quit at a certain - * maximum time stamp. - * - * \section rstream_example A simple Example - * - * Common includes - * \code - * #include <stdio.h> - * #include <assert.h> - * #include "otf.h" - * \endcode - * - * - * Define the Handler(s). - * We just want to process the def process event and print out all appearing processes. - * \code - * int handleDefProcess (void *userData, uint32_t stream, uint32_t process, const char *name, uint32_t parent) { - * - * printf( "process %u is named \"%s\"\n", process, name ); - * - * return OTF_RETURN_OK; - * } - * \endcode - * - * \code - * int main( int argc, char** argv ) { - * \endcode - * - * Declare a file manager, a reader, and a handler array - * \code - * OTF_RStream* rstream; - * OTF_FileManager* manager; - * OTF_HandlerArray* handlers; - * \endcode - * - * Initialize the file manager. Do not open more than 100 files. - * \code - * manager= OTF_FileManager_open( 100 ); - * assert( manager ); - * \endcode - * - * Initialize the handler array. - * \code - * handlers = OTF_HandlerArray_open(); - * assert( handlers ); - * \endcode - * - * Initialize the rstream object. - * \code - - * rstream = OTF_RStream_open( "mytrace", 0, manager ); - * assert( rstream ); - * \endcode - * - * Register your callback functions to the handler array. - * \code - * OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefProcess, OTF_DEFPROCESS_RECORD ); - * \endcode - * - * - * Do the actual reading. - * \code - * OTF_RStream_readDefinitions( rstream, handlers ); - * \endcode - * - * - * Clean everything up before exiting the program. - * \code - * OTF_RStream_close( rstream ); - * OTF_HandlerArray_close( handlers ); - * OTF_FileManager_close( manager ); - * - * return 0; - * } - * \endcode - * - * Compile and link this using $ gcc -o test test.c `otfconfig --libs`. - * - */ - - -#ifndef OTF_RSTREAM_H -#define OTF_RSTREAM_H - - -#include <stdlib.h> -#include <string.h> -#include <stdio.h> - - -#include "OTF_inttypes.h" - - -#include "OTF_FileManager.h" -#include "OTF_RBuffer.h" -#include "OTF_Filenames.h" -#include "OTF_HandlerArray.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct struct_OTF_RStream { - - - /** name stub: all files will begin with this name */ - char* namestub; - - /** Unique id for the current stream */ - uint32_t id; - - /** Definitions buffer. Definitions buffer carries definition - records */ - OTF_RBuffer* defBuffer; - - /** Event buffer. The event buffer carries records for actual - events, i.e. records with a time stamp */ - OTF_RBuffer* eventBuffer; - - /** Snaps (snapshots) buffer. The snapshots buffer carries - snapshots of the whole state at a point in time - as oppossed to - events which only show changes in the state. This can be used to - start from such a snapshot instead of from the very begining. */ - OTF_RBuffer* snapsBuffer; - - /** Statistics buffer. Statistics buffer carries statistical - information about a certain time interval resp. data at - points of time that allow to derive statistics without - reading through all events of that interval. */ - OTF_RBuffer* statsBuffer; - - /** Marker buffer. */ - OTF_RBuffer* markerBuffer; - - /** Default size of buffers managed by this RStream. */ - uint32_t buffersizes; - -#ifdef HAVE_ZLIB - /** Default size of zbuffers managed by this RStream. */ - uint32_t zbuffersizes; -#endif /* HAVE_ZLIB */ - - /** file handle manager */ - OTF_FileManager* manager; - - /** maximum number of records delivered by a single call to OTF_Reader_readXYZ() - defaults to OTF_READ_MAXRECORDS == \infty */ - uint64_t recordLimit; -}; -/** rstream object \ingroup rstream */ -typedef struct struct_OTF_RStream OTF_RStream; - - -/** - * Create a new OTF_RStream instance. - * - * @param nameStub File name prefix which is going to be used by - * all sub-files which belong to the reader stream. - * @param id Abitrary but unique identifier of the reader stream. - * Must be > '0' for real streams. Use '0' for global definitions. - * @param manager File handle manager. - * - * @return Initialized OTF_RStream instance or 0 if an error - * occurred. - * - * \ingroup rstream - */ -OTF_RStream* OTF_RStream_open( const char* nameStub, uint32_t id, OTF_FileManager* manager ); - - -/** - * Close an OTF_RStream instance and all its related files. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return 1 if instance was closed successfully and 0 otherwise. - * - * \ingroup rstream - */ -int OTF_RStream_close( OTF_RStream* rstream ); - - -/** - * Returns the definition buffer of the according reader stream. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return Initialized OTF_RBuffer instance or 0 if an error occured. - * - * \ingroup rstream - */ -OTF_RBuffer* OTF_RStream_getDefBuffer( OTF_RStream* rstream ); - - -/** - * Closes the stream definition buffer. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return 1 on success, 0 if an error occurs - * - * \ingroup rstream - */ -int OTF_RStream_closeDefBuffer( OTF_RStream* rstream ); - - -/** - * Returns the event buffer of the according reader stream. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return Initialized OTF_RBuffer instance or 0 if an error occured. - * - * \ingroup rstream - */ -OTF_RBuffer* OTF_RStream_getEventBuffer( OTF_RStream* rstream ); - - -/** - * Closes the stream event buffer. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return 1 on success, 0 if an error occurs - * - * \ingroup rstream - */ -int OTF_RStream_closeEventBuffer( OTF_RStream* rstream ); - - -/** - * Returns the snapshots buffer of the according reader stream. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return Initialized OTF_RBuffer instance or 0 if an error occured. - * - * \ingroup rstream - */ -OTF_RBuffer* OTF_RStream_getSnapsBuffer( OTF_RStream* rstream ); - - -/** - * Closes the stream snapshots buffer. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return 1 on success, 0 if an error occurs - * - * \ingroup rstream - */ -int OTF_RStream_closeSnapsBuffer( OTF_RStream* rstream ); - - -/** - * Returns the statistics buffer of the according reader stream. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return Initialized OTF_RBuffer instance or 0 if an error occured. - * - * \ingroup rstream - */ -OTF_RBuffer* OTF_RStream_getStatsBuffer( OTF_RStream* rstream ); - -/** - * Closes the stream statistics buffer. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return 1 on success, 0 if an error occurs - * - * \ingroup rstream - */ -int OTF_RStream_closeStatsBuffer( OTF_RStream* rstream ); - - -/** - * Returns the marker buffer of the according reader stream. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return Initialized OTF_RBuffer instance or 0 if an error occured. - * - * \ingroup rstream - */ -OTF_RBuffer* OTF_RStream_getMarkerBuffer( OTF_RStream* rstream ); - - -/** - * Closes the stream marker buffer. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return 1 on success, 0 if an error occurs - * - * \ingroup rstream - */ -int OTF_RStream_closeMarkerBuffer( OTF_RStream* rstream ); - - -/** - * Set the default buffer size for all buffers managed by this reader stream. - * This is only effective for future buffers and will not change already - * allocated buffers. Those can be changed with the buffers directly. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @param size Intended buffer size. - * - * \ingroup rstream - */ -void OTF_RStream_setBufferSizes( OTF_RStream* rstream, uint32_t size ); - - -/** - * Get the default buffer size for all buffers managed by this reader stream. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return Default buffer size for all buffers managed by this reader - * stream. - * - * \ingroup rstream - */ -uint32_t OTF_RStream_getBufferSizes( OTF_RStream* rstream ); - - -/** - * Set the default zbuffer size for all files managed by this reader stream. - * This is only effective for future files and will not change already - * allocated buffers. Those can be changed with the files directly. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @param size Intended buffer size. - * - * \ingroup rstream - */ -void OTF_RStream_setZBufferSizes( OTF_RStream* rstream, uint32_t size ); - - -/** - * Get the default zbuffer size for all files managed by this reader stream. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return Default buffer size for all buffers managed by this reader - * stream. - * - * \ingroup rstream - */ -uint32_t OTF_RStream_getZBufferSizes( OTF_RStream* rstream ); - - -/** - * Sets the maximum number of records delivered by a single call to - * OTF_RStream_readXYZ(). Defaults to OTF_READ_MAXRECORDS == \infty. - * 'OTF_Reader_readXYZ()' returns with the number of records processed. - * Successive calls to 'OTF_Reader_readXYZ()' will deliver the remaining - * records. - * - * This function will NOT destroy a pending read operation, i.e. a read - * operation currently interrupted CAN be continued! - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * @param limit new record limit. has to be smaller than or equal to - * OTF_READ_MAXRECORDS - * - * \ingroup rstream - */ -void OTF_RStream_setRecordLimit( OTF_RStream* rstream, uint64_t limit ); - - -/** - * Returns the current record limit. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * - * @return Current record limit. - * - * \ingroup rstream - */ -uint64_t OTF_RStream_getRecordLimit( OTF_RStream* rstream ); - - - -/** - * Reads all definitions from the stream. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * @param handlers Pointer to the handler array. - * - * @return Number of records read or OTF_READ_MAXRECORDS - * - * \ingroup rstream - */ -uint64_t OTF_RStream_readDefinitions( OTF_RStream* rstream, - OTF_HandlerArray* handlers ); - - -/** - * Reads all events from the stream and calls the appropriated handler sorted - * by time. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * @param handlers Pointer to the handler array. - * - * @return Number of records read or OTF_READ_MAXRECORDS - * - * \ingroup rstream - */ -uint64_t OTF_RStream_readEvents( OTF_RStream* rstream, OTF_HandlerArray* handlers ); - - -/** - * Reads all snapshots from the stream. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * @param handlers Pointer to the handler array. - * - * @return Number of records read or OTF_READ_MAXRECORDS - * - * \ingroup rstream - */ -uint64_t OTF_RStream_readSnapshots( OTF_RStream* rstream, OTF_HandlerArray* handlers ); - - -/** - * Reads all statistics from the stream. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * @param handlers Pointer to the handler array. - * - * @return Number of records read or OTF_READ_MAXRECORDS - * - * \ingroup rstream - */ -uint64_t OTF_RStream_readStatistics( OTF_RStream* rstream, OTF_HandlerArray* handlers ); - - -/** - * Reads all markers from the stream. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * @param handlers Pointer to the handler array. - * - * @return Number of records read or OTF_READ_MAXRECORDS - * - * \ingroup rstream - */ -uint64_t OTF_RStream_readMarker( OTF_RStream* rstream, OTF_HandlerArray* handlers ); - - -/** depricated. @see OTF_RStream_eventTimeProgress() \ingroup rstream */ -uint8_t OTF_RStream_eventProgress( OTF_RStream* rstream, uint64_t* minimum, - uint64_t* current, uint64_t* maximum ); - -/** depricated. @see OTF_RStream_snapshotTimeProgress() \ingroup rstream */ -uint8_t OTF_RStream_snapshotProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ); - -/** depricated. @see OTF_RStream_statisticTimeProgress() \ingroup rstream */ -uint8_t OTF_RStream_statisticProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ); - - -/** - * Delivers a progress report for reading events. It is given in terms - * of time stamps. A percentage can be computed as - * ( current - minimum ) / ( maximum - minimum ). - * This computation takes restricted time intervals into account which is not - * possible with OTF_RStream_eventBytesProgress(). - * - * The progress report is only valid after one or several calls to - * OTF_RStream_readEvents(). Otherwise the return arguments 'minimum', 'current' - * and 'maximum' are undefined! - * If 'minimum' > 'maximum' the values are invalid. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * @param minimum Return value for the minium time. - * @param current Return value for the current time. - * @param maximum Return value for the maximum time. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup rstream - */ -uint8_t OTF_RStream_eventTimeProgress( OTF_RStream* rstream, uint64_t* minimum, - uint64_t* current, uint64_t* maximum ); - - -/** - * Delivers a progress report for reading snapshots. It is given in terms - * of time stamps. A percentage can be computed as - * ( current - minimum ) / ( maximum - minimum ). - * This computation takes restricted time intervals into account which is not - * possible with OTF_RStream_snapshotBytesProgress(). - * - * The progress report is only valid after one or several calls to - * OTF_RStream_readSnapshots(). Otherwise the return arguments 'minimum', 'current' - * and 'maximum' are undefined! - * If 'minimum' > 'maximum' the values are invalid. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * @param minimum Return value for the minium time. - * @param current Return value for the current time. - * @param maximum Return value for the maximum time. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup rstream - */ -uint8_t OTF_RStream_snapshotTimeProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ); - - -/** - * Delivers a progress report for reading statistics. It is given in terms - * of time stamps. A percentage can be computed as - * ( current - minimum ) / ( maximum - minimum ). - * This computation takes restricted time intervals into account which is not - * possible with OTF_Reader_statisticBytesProgress(). - * - * The progress report is only valid after one or several calls to - * OTF_Reader_readStatistics(). Otherwise the return arguments 'minimum', 'current' - * and 'maximum' are undefined! - * If 'minimum' > 'maximum' the values are invalid. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * @param minimum Return value for the minium time. - * @param current Return value for the current time. - * @param maximum Return value for the maximum time. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup rstream - */ -uint8_t OTF_RStream_statisticTimeProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ); - - -/** - * Delivers a progress report for reading events. Progress is given in terms - * of bytes. The percentage can be computed as ( current - minimum ) / ( maximum - minimum ). - * - * ATTENTION: This in only a rough estimate of the progress, because it is - * computed based on the block I/O from files but not based on the actual bytes - * processed. This may result in constant values for small traces. - * See also OTF_RStream_eventTimeProgress(): - * - * The progress report is only valid after one or several calls to - * OTF_RStream_readEvents(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are - * undefined! If 'minimum' > 'maximum' the values are invalid. -* - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * @param minimum Return value for the minium bytes read ( is 0 everytime ). - * @param current Return value for the current bytes read. - * @param maximum Return value for the filesize. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup rstream - */ -uint8_t OTF_RStream_eventBytesProgress( OTF_RStream* rstream, uint64_t* minimum, - uint64_t* current, uint64_t* maximum ); - - -/** - * Delivers a progress report for reading snapshots. Progress is given in terms - * of bytes. The percentage can be computed as ( current - minimum ) / ( maximum - minimum ). - * - * ATTENTION: This in only a rough estimate of the progress, because it is - * computed based on the block I/O from files but not based on the actual bytes - * processed. This may result in constant values for small traces. - * See also OTF_RStream_snapshotTimeProgress(): - * - * The progress report is only valid after one or several calls to - * OTF_RStream_readSnapshots(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are - * undefined! If 'minimum' > 'maximum' the values are invalid. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * @param minimum Return value for the minium bytes read ( is 0 everytime ). - * @param current Return value for the current bytes read. - * @param maximum Return value for the filesize. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup rstream - */ -uint8_t OTF_RStream_snapshotBytesProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ); - -/** - * Delivers a progress report for reading statistics. Progress is given in terms - * of bytes. The percentage can be computed as ( current - minimum ) / ( maximum - minimum ). - * - * ATTENTION: This in only a rough estimate of the progress, because it is - * computed based on the block I/O from files but not based on the actual bytes - * processed. This may result in constant values for small traces. - * See also OTF_RStream_statisticTimeProgress(): - * - * The progress report is only valid after one or several calls to - * OTF_RStream_readStatistics(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are - * undefined! If 'minimum' > 'maximum' the values are invalid. - * - * @param rstream Pointer to an initialized OTF_RStream object. See - * also OTF_RStream_open(). - * @param minimum Return value for the minium bytes read ( is 0 everytime ). - * @param current Return value for the current bytes read. - * @param maximum Return value for the filesize. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup rstream - */ -uint8_t OTF_RStream_statisticBytesProgress( OTF_RStream* rstream, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_RSTREAM_H */ diff --git a/externals/otf/otflib/OTF_Reader.c b/externals/otf/otflib/OTF_Reader.c deleted file mode 100644 index 6fc8365d1c710a7b25e102e85ea61d191d3313ae..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Reader.c +++ /dev/null @@ -1,3924 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <assert.h> - -#include "OTF_Platform.h" -#include "OTF_Reader.h" -#include "OTF_RStream.h" -#include "OTF_Parse.h" -#include "OTF_Errno.h" - -/* #include "OTF_Keywords.h" */ - -#include "OTF_Keywords.h" - -#define HEAP_CHILDRENCOUNT 2 - - -/* *** OTF_ProcessList headers *** ********************** */ - - -struct struct_OTF_ProcessList { - - /** number of processes == dimension of arrays below */ - uint32_t n; - - /** sorted array of process ids */ - uint32_t* processes; - - /** array of process status values accociated to the process at same index - in array 'processes'. - status values: 0 - unknown or disabled, 1 - enabled */ - uint8_t* status; -}; -typedef struct struct_OTF_ProcessList OTF_ProcessList; - - -/** OTF_ProcessList constructor */ -int OTF_ProcessList_init( OTF_ProcessList* list, OTF_MasterControl* mc ); - -/** OTF_ProcessList destructor */ -void OTF_ProcessList_finalize( OTF_ProcessList* list ); - - -uint32_t OTF_ProcessList_getIndex( OTF_ProcessList* list, uint32_t pid ); - -int OTF_ProcessList_setStatus( OTF_ProcessList* list, uint32_t pid, uint8_t status ); - -int OTF_ProcessList_setStatusAll( OTF_ProcessList* list, uint8_t status ); - -uint8_t OTF_ProcessList_getStatus( OTF_ProcessList* list, uint32_t pid ); - - -/* *** OTF_Heap headers *** ***************************** */ - - -/** struct managing a sorted heap (a la heap sort) of OTF_RBuffers that belong -to a common query */ -struct struct_OTF_Heap { - - /** number of current entries */ - uint32_t n; - - /** array dimension s <= n */ - uint32_t s; - - /** array of OTF_RBuffers, during querying they are sorted according to - each buffers next time stamp */ - OTF_RBuffer** buffers; - - /** experimental. minimim, maximum and current progress value(*) of all buffers - in that heap, cut by the readers global setting(*). - (*) progress value are time stamps or bytes */ - uint64_t progressMin; - uint64_t progressMax; - uint64_t progressCurrent; - - uint64_t bytesMax; - uint64_t bytesMin; - uint64_t bytesCurrent; - uint64_t bytesDone; -}; -typedef struct struct_OTF_Heap OTF_Heap; - - -/** initialize heap. taking RBuffers from the given master control object, keep only -that streams that have at least one process enabled. 'which' decides whether to take -definition buffer, event buffer, etc. from every stream */ -int OTF_Heap_initEventHeap( OTF_Heap* heap, OTF_Reader* reader ); -int OTF_Heap_initDefHeap( OTF_Heap* heap, OTF_Reader* reader ); -int OTF_Heap_initStatisticsHeap( OTF_Heap* heap, OTF_Reader* reader ); -int OTF_Heap_initSnapshotsHeap( OTF_Heap* heap, OTF_Reader* reader ); -int OTF_Heap_initMarkerHeap( OTF_Heap* heap, OTF_Reader* reader ); - -void OTF_Heap_finalize( OTF_Heap* heap ); - -/** initial (full) sort operation */ -int OTF_Heap_sort( OTF_Heap* heap ); - -/** do a fast re-sort after only the first entrie's sort key changed */ -int OTF_Heap_resort( OTF_Heap* heap ); - -int OTF_Heap_checksorted( OTF_Heap* heap ); - - -/* *** OTF_Reader headers ******************************* */ - - -struct struct_OTF_Reader { - - /** name stub: all files will begin with this name */ - char* namestub; - - /** Number of streams. */ - uint32_t n; - - /** List of stream sorted by stream id. */ - OTF_RStream** stream; - - OTF_ProcessList* processList; - - OTF_Heap* definitionHeap; - OTF_Heap* eventHeap; - OTF_Heap* snapshotsHeap; - OTF_Heap* statisticsHeap; - OTF_Heap* markerHeap; - - - /** Master control structure. */ - OTF_MasterControl* mc; - - /** Contain the minimum time stamp where to start reading. */ - uint64_t minTime; - - /** Contain the maximum time stamp where to stop reading. */ - uint64_t maxTime; - - /** maximum number of records delivered by a single call to OTF_Reader_readXYZ() - defaults to OTF_READ_MAXRECORDS == \infty */ - uint64_t recordLimit; - - /** Default size of buffers managed by this Reader. */ - uint32_t buffersizes; - -#ifdef HAVE_ZLIB - /** Default size of zbuffers managed by this reader. */ - uint32_t zbuffersizes; -#endif /* HAVE_ZLIB */ - - /** file handle manager */ - OTF_FileManager* manager; -}; - - -/* *** reader functions macros *** *************************************** */ - -/** constructor - internal use only */ -int OTF_Reader_init( OTF_Reader* reader ); - -/** destructor - internal use only */ -int OTF_Reader_finish( OTF_Reader* reader ); - -/** dump existing OTF_Heap members. this is necessary after -changing time interval or process selection */ -void OTF_Reader_resetHeaps( OTF_Reader* reader ); - - - -/* *** ProcessList functions ****************** */ - - -int OTF_ProcessList_init( OTF_ProcessList* list, OTF_MasterControl* mc ) { - - - uint32_t i; - uint32_t n; - OTF_Pair* pair; - -# ifdef OTF_DEBUG - uint8_t test; -# endif - - n= OTF_MasterControl_getrCount( mc ); - if ( 0 >= n ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no process has been defined in the master control.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - list->n= n; - - list->processes= (uint32_t*) malloc( n * sizeof(uint32_t) ); - if( NULL == list->processes ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - list->status= (uint8_t*) malloc( n * sizeof(uint8_t) ); - if( NULL == list->status ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( list->processes ); - list->processes= NULL; - - return 0; - } - - /* put process entries to 'processes' sorted. */ - for ( i= 0; i < n; i++ ) { - - pair= OTF_MasterControl_getREntryByIndex( mc, i ); - if( NULL == pair ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_getREntryByIndex() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( list->processes ); - list->processes= NULL; - free( list->status ); - list->status= NULL; - - return 0; - } - - list->processes[i]= pair->argument; - - /* set to enabled status by default */ - list->status[i]= 1; - } - -# ifdef OTF_DEBUG - /* check if list->processes[i] is sorted like it is suppossed to be */ - test= 1; - for ( i= 1; i < n; i++ ) { - - if ( list->processes[i] < list->processes[i-1] ) { - - test= 0; - } - } - - if ( 1 != test ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "process list from MasterControl is not sorted.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( list->processes ); - list->processes= NULL; - free( list->status ); - list->status= NULL; - - return 0; - } -# endif - - return 1; -} - - -void OTF_ProcessList_finalize( OTF_ProcessList* list ) { - - - list->n= 0; - - if( list->processes != NULL ) { - free( list->processes ); - list->processes= NULL; - } - - if( list->status != NULL ) { - free( list->status ); - list->status= NULL; - } - -} - - -uint32_t OTF_ProcessList_getIndex( OTF_ProcessList* list, uint32_t pid ) { - - - uint32_t a= 0; - uint32_t b= list->n -1; - uint32_t c; - - - if ( pid < list->processes[a] ) { - - /* not found */ - return (uint32_t) -1; - } - - if ( pid > list->processes[b] ) { - - /* not found */ - return (uint32_t) -1; - } - - if ( pid == list->processes[a] ) { - - return a; - } - - if ( pid == list->processes[b] ) { - - return b; - } - - while ( a +1 < b ) { - - c= ( a + b ) / 2; - - if ( pid == list->processes[c] ) { - - return c; - } - - if ( pid < list->processes[c] ) { - - b= c; - - } else { - - a= c; - } - } - - /* not found */ - return (uint32_t) -1; -} - - -int OTF_ProcessList_setStatus( OTF_ProcessList* list, uint32_t pid, uint8_t status ) { - - - uint32_t index= OTF_ProcessList_getIndex( list, pid ); - - - if ( index < list->n ) { - - list->status[index]= status; - - /* success */ - return 1; - - } else { - - /* pid not found, error */ - return 0; - } -} - - -int OTF_ProcessList_setStatusAll( OTF_ProcessList* list, uint8_t status ) { - - - uint32_t i; - - - for ( i= 0; i < list->n; i++ ) { - - list->status[i]= status; - } - - return 1; -} - - -uint8_t OTF_ProcessList_getStatus( OTF_ProcessList* list, uint32_t pid ) { - - - uint32_t index= OTF_ProcessList_getIndex( list, pid ); - - - if ( index < list->n ) { - - /* success */ - return list->status[index]; - - } - - /* pid not found, error */ - return 0; -} - - -/* *** OTF_Heap functions *** ***************** */ - - -/** initialize heap. taking RBuffers from the given master control object, keep only -that streams that have at least one process enabled. 'which' decides whether to take -definition buffer, event buffer, etc. from every stream */ -int OTF_Heap_initEventHeap( OTF_Heap* heap, OTF_Reader* reader ) { - - - uint32_t i; - uint32_t j; - uint8_t enabled; - OTF_MapEntry* entry; - OTF_RStream* stream; - OTF_RBuffer* buffer; - - - heap->n= 0; - heap->s= OTF_MasterControl_getCount( reader->mc ); - - heap->buffers= (OTF_RBuffer**) malloc( heap->s * sizeof(OTF_RBuffer*) ); - if( NULL == heap->buffers ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - for ( i= 0; i < heap->s; i++ ) { - - entry= OTF_MasterControl_getEntryByIndex( reader->mc, i ); - if( NULL == entry ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_getEntryByIndex() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( heap->buffers ); - heap->buffers= NULL; - - return 0; - } - - enabled= 0; - j= 0; - while ( ( j < entry->n ) && ( 0 == enabled ) ) { - - enabled= enabled || OTF_ProcessList_getStatus( reader->processList, - entry->values[j] ); - j++; - } - - if ( enabled ) { - - stream= OTF_Reader_getStream( reader, entry->argument ); - if( NULL == stream ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot get stream '%llu'\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) entry->argument ); - - free( heap->buffers ); - heap->buffers= NULL; - - return 0; - } - - buffer= OTF_RStream_getEventBuffer( stream ); - if ( NULL != buffer ) { - - heap->buffers[ heap->n ]= buffer; - (heap->n)++; - - } else { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot open event buffer of stream %u.\n", - __FUNCTION__, __FILE__, __LINE__, entry->argument ); - - free( heap->buffers ); - heap->buffers= NULL; - - return 0; - } - } - } - - heap->progressMin= 0; - heap->progressMax= (uint64_t) -1; - heap->progressCurrent= 0; - - return 1; -} - - -/** initialize heap. taking RBuffers from the given master control object, keep only -that streams that have at least one process enabled. 'which' decides whether to take -definition buffer, event buffer, etc. from every stream */ -int OTF_Heap_initDefHeap( OTF_Heap* heap, OTF_Reader* reader ) { - - - uint32_t i; - uint32_t j; - uint8_t enabled; - OTF_MapEntry* entry; - OTF_RStream* stream; - OTF_RBuffer* buffer; - - - heap->n= 0; - heap->s= 1 + OTF_MasterControl_getCount( reader->mc ); - - heap->buffers= (OTF_RBuffer**) malloc( heap->s * sizeof(OTF_RBuffer*) ); - if( NULL == heap->buffers ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - /* stream 0 */ - stream= OTF_Reader_getStream( reader, 0 ); - if( NULL != stream ) { - - buffer= OTF_RStream_getDefBuffer( stream ); - if( NULL != buffer ) { - - /* buffer == NULL allowed! */ - heap->buffers[ heap->n ]= buffer; - (heap->n)++; - } - } - - /* remaining streams */ - - for ( i= 0; i < heap->s -1; i++ ) { - - entry= OTF_MasterControl_getEntryByIndex( reader->mc, i ); - if( NULL == entry ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_getEntryByIndex() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( heap->buffers ); - heap->buffers= NULL; - - return 0; - } - - enabled= 0; - j= 0; - while ( ( j < entry->n ) && ( 0 == enabled ) ) { - - enabled= enabled || OTF_ProcessList_getStatus( reader->processList, entry->values[j] ); - j++; - } - - if ( enabled ) { - - stream= OTF_Reader_getStream( reader, entry->argument ); - if( NULL == stream ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot get stream '%llu'\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) entry->argument ); - - free( heap->buffers ); - heap->buffers= NULL; - - return 0; - } - - buffer= OTF_RStream_getDefBuffer( stream ); - - /* buffer == NULL allowed! */ - heap->buffers[ heap->n ]= buffer; - (heap->n)++; - } - } - - return 1; -} - - -/** initialize heap. taking RBuffers from the given master control object, keep only -that streams that have at least one process enabled. 'which' decides whether to take -definition buffer, event buffer, etc. from every stream */ -int OTF_Heap_initStatisticsHeap( OTF_Heap* heap, OTF_Reader* reader ) { - - - uint32_t i; - uint32_t j; - uint8_t enabled; - OTF_MapEntry* entry; - OTF_RStream* stream; - OTF_RBuffer* buffer; - - - heap->n= 0; - heap->s= OTF_MasterControl_getCount( reader->mc ); - - heap->buffers= (OTF_RBuffer**) malloc( heap->s * sizeof(OTF_RBuffer*) ); - if( NULL == heap->buffers ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - for ( i= 0; i < heap->s; i++ ) { - - entry= OTF_MasterControl_getEntryByIndex( reader->mc, i ); - if( NULL == entry ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_getEntryByIndex() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( heap->buffers ); - heap->buffers= NULL; - - return 0; - } - - enabled= 0; - j= 0; - while ( ( j < entry->n ) && ( 0 == enabled ) ) { - - enabled= enabled || OTF_ProcessList_getStatus( reader->processList, - entry->values[j] ); - j++; - } - - if ( enabled ) { - - stream= OTF_Reader_getStream( reader, entry->argument ); - if( NULL == stream ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot get stream '%llu'\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) entry->argument ); - - free( heap->buffers ); - heap->buffers= NULL; - - return 0; - } - - buffer= OTF_RStream_getStatsBuffer( stream ); - if ( NULL != buffer ) { - - heap->buffers[ heap->n ]= buffer; - (heap->n)++; - - } - } - } - - heap->progressMin= 0; - heap->progressMax= (uint64_t) -1; - heap->progressCurrent= 0; - - return 1; -} - - -/** initialize heap. taking RBuffers from the given master control object, keep only -that streams that have at least one process enabled. 'which' decides whether to take -definition buffer, event buffer, etc. from every stream */ -int OTF_Heap_initSnapshotsHeap( OTF_Heap* heap, OTF_Reader* reader ) { - - - uint32_t i; - uint32_t j; - uint8_t enabled; - OTF_MapEntry* entry; - OTF_RStream* stream; - OTF_RBuffer* buffer; - - - heap->n= 0; - heap->s= OTF_MasterControl_getCount( reader->mc ); - - heap->buffers= (OTF_RBuffer**) malloc( heap->s * sizeof(OTF_RBuffer*) ); - if( NULL == heap->buffers ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - for ( i= 0; i < heap->s; i++ ) { - - entry= OTF_MasterControl_getEntryByIndex( reader->mc, i ); - if( NULL == entry ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_getEntryByIndex() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( heap->buffers ); - heap->buffers= NULL; - - return 0; - } - - enabled= 0; - j= 0; - while ( ( j < entry->n ) && ( 0 == enabled ) ) { - - enabled= enabled || OTF_ProcessList_getStatus( reader->processList, - entry->values[j] ); - j++; - } - - if ( enabled ) { - - stream= OTF_Reader_getStream( reader, entry->argument ); - if( NULL == stream ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot get stream '%llu'\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) entry->argument ); - - free( heap->buffers ); - heap->buffers= NULL; - - return 0; - } - - buffer= OTF_RStream_getSnapsBuffer( stream ); - if ( NULL != buffer ) { - - heap->buffers[ heap->n ]= buffer; - (heap->n)++; - - } - } - } - - heap->progressMin= 0; - heap->progressMax= (uint64_t) -1; - heap->progressCurrent= 0; - - return 1; -} - - -/** initialize heap. taking RBuffers from the given master control object, keep only -that streams that have at least one process enabled. 'which' decides whether to take -definition buffer, event buffer, etc. from every stream */ -int OTF_Heap_initMarkerHeap( OTF_Heap* heap, OTF_Reader* reader ) { - - - uint32_t i; - uint32_t j; - uint8_t enabled; - OTF_MapEntry* entry; - OTF_RStream* stream; - OTF_RBuffer* buffer; - - - heap->n= 0; - heap->s= 1 + OTF_MasterControl_getCount( reader->mc ); - - heap->buffers= (OTF_RBuffer**) malloc( heap->s * sizeof(OTF_RBuffer*) ); - if( NULL == heap->buffers ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - /* stream 0 */ - stream= OTF_Reader_getStream( reader, 0 ); - if( NULL != stream ) { - - buffer= OTF_RStream_getMarkerBuffer( stream ); - if( NULL != buffer ) { - - /* buffer == NULL allowed! */ - heap->buffers[ heap->n ]= buffer; - (heap->n)++; - } - } - - /* remaining streams */ - - for ( i= 0; i < heap->s -1; i++ ) { - - entry= OTF_MasterControl_getEntryByIndex( reader->mc, i ); - if( NULL == entry ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_getEntryByIndex() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( heap->buffers ); - heap->buffers= NULL; - - return 0; - } - - enabled= 0; - j= 0; - while ( ( j < entry->n ) && ( 0 == enabled ) ) { - - enabled= enabled || OTF_ProcessList_getStatus( reader->processList, entry->values[j] ); - j++; - } - - if ( enabled ) { - - stream= OTF_Reader_getStream( reader, entry->argument ); - if( NULL == stream ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot get stream '%llu'\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) entry->argument ); - - free( heap->buffers ); - heap->buffers= NULL; - - return 0; - } - - buffer= OTF_RStream_getMarkerBuffer( stream ); - - /* buffer == NULL allowed! */ - heap->buffers[ heap->n ]= buffer; - (heap->n)++; - } - } - - return 1; -} - - -void OTF_Heap_finalize( OTF_Heap* heap ) { - - - heap->n= 0; - heap->s= 0; - - free( heap->buffers ); - heap->buffers= NULL; -} - - -int OTF_Heap_sort( OTF_Heap* heap ) { - - - int32_t i; - int32_t j; - int32_t v; - int32_t w; - int32_t k; - OTF_RBuffer* tmp; - - if( 0 == heap->n ) { - - return 1; - } - - /* calculate the first node to begin with */ - i= ( heap->n - 1 ) / HEAP_CHILDRENCOUNT; - - - /* establish a sorted heap ;) */ - for ( ; i >= 0; i-- ) { - - /* first descendant of v */ - v = i; - w = HEAP_CHILDRENCOUNT * v + 1; - - while ( w < (int32_t) heap->n ) { - - /* pick the lowest descendant */ - for( j= 1, k= 0; j < HEAP_CHILDRENCOUNT; j++ ) { - - if ( w + j >= (int32_t) heap->n ) { - break; - } - - if ( heap->buffers[w+j]->time < heap->buffers[w+k]->time ) { - - k= j; - } - } - w = w+k; - - if ( heap->buffers[v]->time < heap->buffers[w]->time ) { - - /* v has heap property, exit loop */ - break; - } - - /* swap entries */ - tmp = heap->buffers[v]; - heap->buffers[v] = heap->buffers[w]; - heap->buffers[w] = tmp; - - /* continue further down the heap */ - v = w; - w = HEAP_CHILDRENCOUNT * v + 1; - } - } - - return 1; -} - - -int OTF_Heap_resort( OTF_Heap* heap ) { - - - uint32_t v; - uint32_t w; - uint32_t j; - uint32_t k; - OTF_RBuffer* tmp; - - - /* assume a sorted heap except for the top element */ - - /* follow the first item down the heap */ - v = 0; - w = 1; - - while ( w < heap->n ) { - - /* pick the lowest descendant */ - for( j= 1, k= 0; j < HEAP_CHILDRENCOUNT; j++ ) { - - if ( w + j >= heap->n ) { - break; - } - - if ( heap->buffers[w+j]->time < heap->buffers[w+k]->time ) { - - k= j; - } - } - w = w+k; - - - - if ( heap->buffers[v]->time < heap->buffers[w]->time ) { - - /* v has heap property */ - break; - } - - /* swap entries */ - tmp = heap->buffers[v]; - heap->buffers[v] = heap->buffers[w]; - heap->buffers[w] = tmp; - - /* continue */ - v = w; - w = HEAP_CHILDRENCOUNT * v + 1; - } - - return 1; -} - - -int OTF_Heap_checksorted( OTF_Heap* heap ) { - - - int ret= 1; - uint32_t i; - int j; - - - /* - OTF_fprintf( stderr, "%u-heap with %u entries:\n", HEAP_CHILDRENCOUNT, heap->n ); - for ( i= 0; i < heap->n; i++ ) { - - OTF_fprintf( stderr, "%i: %llu\n", i, heap->buffers[i]->time ); - } - */ - - - /* all but the top entry need to be >= their parent entry */ - for ( i= 1; i < heap->n; i++ ) { - - j= ( i -1 ) / HEAP_CHILDRENCOUNT; - - ret = ret && ( heap->buffers[j]->time <= heap->buffers[i]->time ); - } - - assert( 1 == ret ); - - return ret; -} - - -/* *** Reader functions *********************** */ - - -int OTF_Reader_init( OTF_Reader* reader ) { - - reader->namestub= NULL; - - reader->n= 0; - reader->stream= NULL; - - reader->processList= NULL; - - reader->definitionHeap= NULL; - reader->eventHeap= NULL; - reader->snapshotsHeap= NULL; - reader->statisticsHeap= NULL; - reader->markerHeap= NULL; - - reader->minTime= 0; - reader->maxTime= (uint64_t) -1; - - reader->recordLimit= OTF_READ_MAXRECORDS; - - reader->buffersizes= 1024*1024; - -#ifdef HAVE_ZLIB - reader->zbuffersizes= 1024 *10; -#endif /* HAVE_ZLIB */ - - reader->manager= NULL; - return 1; -} - - -int OTF_Reader_finish( OTF_Reader* reader ) { - - - int ret= 1; - - free( reader->namestub ); - reader->namestub= NULL; - - ret&= OTF_Reader_closeAllStreams( reader ); - - free( reader->stream ); - reader->stream = NULL; - - - if ( NULL != reader->processList ) { - - OTF_ProcessList_finalize( reader->processList ); - free( reader->processList ); - reader->processList= NULL; - } - - if ( NULL != reader->definitionHeap ) { - - OTF_Heap_finalize( reader->definitionHeap ); - free( reader->definitionHeap ); - reader->definitionHeap= NULL; - } - if ( NULL != reader->eventHeap ) { - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - } - if ( NULL != reader->snapshotsHeap ) { - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - } - if ( NULL != reader->statisticsHeap ) { - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - } - if ( NULL != reader->markerHeap ) { - - OTF_Heap_finalize( reader->markerHeap ); - free( reader->markerHeap ); - reader->markerHeap= NULL; - } - - if ( NULL != reader->mc ) { - OTF_MasterControl_close( reader->mc ); - reader->mc = NULL; - } - - return ret; -} - - -void OTF_Reader_resetHeaps( OTF_Reader* reader ) { - - - if ( NULL != reader->definitionHeap ) { - - OTF_Heap_finalize( reader->definitionHeap ); - free( reader->definitionHeap ); - reader->definitionHeap= NULL; - } - if ( NULL != reader->eventHeap ) { - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - } - if ( NULL != reader->snapshotsHeap ) { - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - } - if ( NULL != reader->statisticsHeap ) { - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - } - if ( NULL != reader->markerHeap ) { - - OTF_Heap_finalize( reader->markerHeap ); - free( reader->markerHeap ); - reader->markerHeap= NULL; - } -} - - -OTF_Reader* OTF_Reader_open( const char* namestub, OTF_FileManager* manager ) { - - - OTF_Reader* ret; - int read; - - - ret = (OTF_Reader*) malloc( sizeof( OTF_Reader ) ); - if( NULL == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - OTF_Reader_init( ret ); - - ret->namestub = OTF_stripFilename( namestub ); - - if( NULL == manager ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "manager has not been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Reader_finish(ret); - free( ret ); - ret= NULL; - - return NULL; - } - ret->manager=manager; - - ret->mc= OTF_MasterControl_new( manager ); - if( NULL == ret->mc ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_new() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Reader_finish(ret); - free( ret ); - ret= NULL; - - return NULL; - } - - - read= OTF_MasterControl_read( ret->mc, ret->namestub ); - if( 0 == read ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_read() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Reader_finish(ret); - free( ret ); - ret= NULL; - - return NULL; - } - - ret->processList= (OTF_ProcessList*) malloc( sizeof(OTF_ProcessList) ); - if( NULL == ret->processList ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Reader_finish(ret); - free( ret ); - ret= NULL; - - return NULL; - } - ret->processList->status = NULL; - ret->processList->processes = NULL; - - if( 0 == OTF_ProcessList_init( ret->processList, ret->mc ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_ProcessList_init() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Reader_finish(ret); - free( ret ); - ret= NULL; - - return NULL; - } - - return ret; -} - - -int OTF_Reader_close( OTF_Reader* reader ) { - - - int ret=1; - if( NULL == reader ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no reader has been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - ret&= OTF_Reader_finish( reader ); - - free( reader ); - reader = NULL; - - return ret; -} - -int OTF_Reader_setBufferSizes( OTF_Reader* reader, uint32_t size ) { - - - if ( 50 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "intended buffer size %u is too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - return 0; - - } else if ( 500 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u is very small, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } else if ( 10 * 1024 *1024 < size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u is rather big, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } - - reader->buffersizes= size; - - return 1; -} - - -uint32_t OTF_Reader_getBufferSizes( OTF_Reader* reader ) { - - - return reader->buffersizes; -} - - -void OTF_Reader_setZBufferSizes( OTF_Reader* reader, uint32_t size ) { - - -#ifdef HAVE_ZLIB - - if ( 32 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "intended zbuffer size %u is too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - return; - - } else if ( 512 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u is very small, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } else if ( 10 * 1024 *1024 < size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u is rather big, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - } - - reader->zbuffersizes= size; - -#endif /* HAVE_ZLIB */ -} - - -uint32_t OTF_Reader_getZBufferSizes( OTF_Reader* reader ) { - - -#ifdef HAVE_ZLIB - return reader->zbuffersizes; -#else /* HAVE_ZLIB */ - return 0; -#endif /* HAVE_ZLIB */ -} - - -void OTF_Reader_reset( OTF_Reader* reader ) { - - - OTF_Reader_resetHeaps( reader ); - - /* reset time interval */ - OTF_Reader_setTimeInterval( reader, 0, (uint64_t) -1 ); - - /* reset all processes to enabled */ - OTF_Reader_setProcessStatusAll( reader, 1 ); - - /* reset record count limit to \infty */ - OTF_Reader_setRecordLimit( reader, OTF_READ_MAXRECORDS ); -} - - -OTF_RStream* OTF_Reader_getStream( OTF_Reader* reader, uint32_t id ) { - - - uint32_t i; - uint32_t begin; - uint32_t middle; - uint32_t end; - - - /* search list of stream for the given - stream id - binary search */ - - begin = 0; - end = reader->n-1; - - while ( begin < end+1 ) { - - middle = ( begin + end ) / 2; - - if ( reader->stream[middle]->id < id ) { - - begin = middle + 1; - - } else if ( reader->stream[middle]->id > id ) { - - end = middle - 1; - - } else { - - /* stream already there */ - return reader->stream[middle]; - } - } - - /* add a new stream */ - ++(reader->n); - - /* allocate memory */ - reader->stream = (OTF_RStream**) realloc( reader->stream , - reader->n * sizeof( OTF_RStream* ) ); - if( NULL == reader->stream ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - /* move all stream > i one up */ - for ( i = reader->n-1; i > begin; --i ) { - - reader->stream[i] = reader->stream[i-1]; - } - - reader->stream[i] = OTF_RStream_open( reader->namestub, id, reader->manager ); - - OTF_RStream_setBufferSizes( reader->stream[i], reader->buffersizes ); - -#ifdef HAVE_ZLIB - OTF_RStream_setZBufferSizes( reader->stream[i], reader->zbuffersizes ); -#endif /* HAVE_ZLIB */ - - return reader->stream[i]; -} - - -int OTF_Reader_disableProcess( OTF_Reader* reader, uint32_t processId ) { - - - return OTF_ProcessList_setStatus( reader->processList, processId, 0 ); -} - - -int OTF_Reader_enableProcess( OTF_Reader* reader, uint32_t processId ) { - - - return OTF_ProcessList_setStatus( reader->processList, processId, 1 ); -} - - -/** get process status, '1' for enabled, '0' for disabled or unknown */ -uint8_t OTF_Reader_getProcessStatus( OTF_Reader* reader, uint32_t processId ) { - - - return OTF_ProcessList_getStatus( reader->processList, processId ); -} - -/** nicer equivalent to 'OTF_Reader_disableProcess()' and 'OTF_Reader_enableProcess()'. -status is '0' for disabled and '1' for enabled */ -int OTF_Reader_setProcessStatus( OTF_Reader* reader, uint32_t processId, uint8_t status ) { - - - OTF_Reader_resetHeaps( reader ); - - return OTF_ProcessList_setStatus( reader->processList, processId, status ); -} - - -int OTF_Reader_setProcessStatusAll( OTF_Reader* reader, uint8_t status ) { - - - OTF_Reader_resetHeaps( reader ); - - return OTF_ProcessList_setStatusAll( reader->processList, status ); -} - - -uint64_t OTF_Reader_readDefinitions( OTF_Reader* reader, - OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - - int ret; - char* pos; - uint32_t i; - - OTF_MapEntry* entry; - uint32_t streamId; - - char next_char = '\0'; - - /* initialized? */ - if ( NULL == reader->definitionHeap ) { - - - /* init */ - - reader->definitionHeap= (OTF_Heap*) malloc( sizeof(OTF_Heap) ); - if( NULL == reader->definitionHeap ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return OTF_READ_ERROR; - } - - if( 0 == OTF_Heap_initDefHeap( reader->definitionHeap, reader ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Heap_initDefHeap() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->definitionHeap ); - free( reader->definitionHeap ); - reader->definitionHeap= NULL; - - return OTF_READ_ERROR; - } - - for ( i= 0; i < reader->definitionHeap->n; i++ ) { - - - if ( NULL != reader->definitionHeap->buffers[i] ) { - - pos= OTF_RBuffer_getRecord( reader->definitionHeap->buffers[i] ); - - /* remove empty streams */ - if ( NULL == pos ) { - - /* keep original order */ - reader->definitionHeap->buffers[i]= NULL; - } - } - } - } - - - /* read streams */ - for ( i= 0; i < reader->definitionHeap->n; i ++ ) { - - - if ( NULL == reader->definitionHeap->buffers[i] ) { - - continue; - } - - streamId= 0; - if ( i > 0 ) { - - entry= OTF_MasterControl_getEntryByIndex( reader->mc, i -1 ); - streamId= entry->argument; - } - - pos= (char*) 0x2; - while ( NULL != pos ) { - - if ( recordcount >= reader->recordLimit ) { - - /* record count limit reached, return */ - return recordcount; - } - - /* remember next record type, if it will be a none - KEYVALUE record, dont't account it in recordcount */ - next_char = *(reader->definitionHeap->buffers[i]->buffer + reader->definitionHeap->buffers[i]->pos); - - ret= OTF_Reader_parseDefRecord( reader->definitionHeap->buffers[i], - handlers, streamId ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_parseDefRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->definitionHeap ); - free( reader->definitionHeap ); - reader->definitionHeap= NULL; - - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none - KEYVALUE record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(reader->definitionHeap->buffers[i]->list); - recordcount++; - } - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->definitionHeap->buffers[i] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->definitionHeap->buffers[i]->pos < reader->definitionHeap->buffers[i]->end ) { - - ret= OTF_Reader_readUnknownDefRecord( reader->definitionHeap->buffers[i], - handlers, streamId ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownDefRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->definitionHeap ); - free( reader->definitionHeap ); - reader->definitionHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* stream is empty -> remove from heap */ - reader->definitionHeap->buffers[i]= NULL; - } - } - } - - return recordcount; -} - - -OTF_MasterControl* OTF_Reader_getMasterControl( OTF_Reader* reader ) { - - - return reader->mc; -} - - -uint64_t OTF_Reader_readEvents( OTF_Reader* reader, OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - - int ret; - char* pos; - uint32_t i; - - uint32_t currentprocess= 0; - -# ifdef OTF_DEBUG - uint64_t oldtime= 0; -# endif - - uint64_t p; - - char next_char = '\0'; - - /* initialized? */ - if ( NULL == reader->eventHeap ) { - - - /* init */ - reader->eventHeap= (OTF_Heap*) malloc( sizeof(OTF_Heap) ); - if( NULL == reader->eventHeap ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return OTF_READ_ERROR; - } - - if( 0 == OTF_Heap_initEventHeap( reader->eventHeap, reader) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Heap_initEventHeap() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } - - /* for progress report */ - reader->eventHeap->progressMin= (uint64_t) -1; - reader->eventHeap->progressMax= 0; - - reader->eventHeap->bytesMax= 0; - reader->eventHeap->bytesMin= 0; - reader->eventHeap->bytesCurrent= 0; - reader->eventHeap->bytesDone= 0; - - /* make all buffers in heap jump to start time */ - for ( i= 0; i < reader->eventHeap->n; i++ ) { - - - ret= 1; - - /* the file has to retrieve his own information ... especially his "lastTime" is intressting */ - OTF_RBuffer_getFileProperties( reader->eventHeap->buffers[i] ); - - /* get last filepos of lasttime (right in front of the next time) */ - if( reader->maxTime < reader->eventHeap->buffers[i]->lastTime ) { - /* interval -> take the pos right behind the lasttime, right - before the next time */ - ret= OTF_RBuffer_searchTime( reader->eventHeap->buffers[i], reader->maxTime ); - - while( reader->maxTime >= reader->eventHeap->buffers[i]->time ) { - - OTF_RBuffer_getRecord( reader->eventHeap->buffers[i] ); - OTF_RBuffer_readNewline( reader->eventHeap->buffers[i] ); - } - - reader->eventHeap->bytesMax+= OTF_RBuffer_getFilePos( reader->eventHeap->buffers[i] ); - - } else { - /* no interval -> take the fileend */ - reader->eventHeap->bytesMax+= OTF_RBuffer_getFileSize( - reader->eventHeap->buffers[i] ); - } - - - /* get the filepos of the firsttime */ - ret&= OTF_RBuffer_searchTime( reader->eventHeap->buffers[i], reader->minTime ); - reader->eventHeap->bytesMin+= OTF_RBuffer_getFilePos( reader->eventHeap->buffers[i] ); - - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_RBuffer_searchTime() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } - - /* for progress report: get union of all buffer's time interval */ - p= reader->eventHeap->buffers[i]->firstTime; - reader->eventHeap->progressMin= ( reader->eventHeap->progressMin <= p ) ? - reader->eventHeap->progressMin : p; - p= reader->eventHeap->buffers[i]->lastTime; - reader->eventHeap->progressMax= ( reader->eventHeap->progressMax >= p ) ? - reader->eventHeap->progressMax : p; - - /* make sure buffer's time information is updated*/ - - pos= OTF_RBuffer_getRecord( reader->eventHeap->buffers[i] ); - - /* remove empty streams */ - if ( NULL == pos ) { - - reader->eventHeap->n--; - reader->eventHeap->buffers[i]= reader->eventHeap->buffers[reader->eventHeap->n]; - - /* make sure to repeat this for loop with the same index i */ - i--; - continue; - } - - /* inlined OTF_RBuffer_getCurrentTime() */ - if( reader->eventHeap->buffers[i]->time < reader->minTime ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "current time %llu < mintime %llu.\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) reader->eventHeap->buffers[i]->time, - (long long unsigned) reader->minTime ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } - } - - OTF_Heap_sort( reader->eventHeap ); - -# ifdef OTF_DEBUG - OTF_Heap_checksorted( reader->eventHeap ); -# endif /* OTF_DEBUG */ - - /* for progress report: - cut intervals [progressMin,progressMax] and [minTime,maxTime] */ - reader->eventHeap->progressMin= ( reader->eventHeap->progressMin >= reader->minTime ) ? - reader->eventHeap->progressMin : reader->minTime; - reader->eventHeap->progressMax= ( reader->eventHeap->progressMax <= reader->maxTime ) ? - reader->eventHeap->progressMax : reader->maxTime; - - if ( reader->eventHeap->n > 0 ) { - - reader->eventHeap->progressCurrent= reader->eventHeap->buffers[0]->time; - - } else { - - reader->eventHeap->progressCurrent= 0; - } - } - - while ( reader->eventHeap->n > 0 ) { - - if ( recordcount >= reader->recordLimit ) { - - /* record count limit reached, return */ - return recordcount; - } - - /* inlined OTF_RBuffer_getCurrentTime() */ -# ifdef OTF_DEBUG - oldtime= reader->eventHeap->progressCurrent; -# endif - reader->eventHeap->progressCurrent= reader->eventHeap->buffers[0]->time; - - /* debug check */ -# ifdef OTF_DEBUG - if ( oldtime > reader->eventHeap->progressCurrent ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Time decreases. %llu < %llu.\n", - __FUNCTION__, __FILE__, __LINE__, - (unsigned long long) reader->eventHeap->progressCurrent, - (unsigned long long) oldtime ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } -# endif /* OTF_DEBUG */ - - /* check for time interval */ - if ( reader->eventHeap->progressCurrent >= reader->maxTime ) { - - /* add the last filepos of this buffer to "bytesDone" */ - reader->eventHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->eventHeap->buffers[0] ); - - /* drop that stream */ - reader->eventHeap->n--; - reader->eventHeap->buffers[0]= reader->eventHeap->buffers[reader->eventHeap->n]; - - OTF_Heap_resort( reader->eventHeap ); - - continue; - } - - - /* inlined OTF_RBuffer_getCurrentProcess() */ - currentprocess= reader->eventHeap->buffers[0]->process; - - /* check if process is enabled */ - if ( 0 == OTF_ProcessList_getStatus( reader->processList, currentprocess ) ) { - - /* ignore record */ - OTF_RBuffer_readNewline( reader->eventHeap->buffers[0] ); - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->eventHeap->buffers[0] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->eventHeap->buffers[0]->pos < reader->eventHeap->buffers[0]->end ) { - - ret= OTF_Reader_readUnknownRecord( reader->eventHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* add the last filepos of this buffer to "bytesDone" */ - reader->eventHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->eventHeap->buffers[0] ); - - /* stream is empty -> remove from heap */ - reader->eventHeap->n--; - reader->eventHeap->buffers[0]= - reader->eventHeap->buffers[reader->eventHeap->n]; - - } - - OTF_Heap_resort( reader->eventHeap ); - - continue; - } - - /* remember next record type, if it will be a none KEYVALUE - record, dont't account it in recordcount */ - next_char = *(reader->eventHeap->buffers[0]->buffer + reader->eventHeap->buffers[0]->pos); - - ret= OTF_Reader_parseEventRecord( reader->eventHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_parseEventRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none KEYVALUE - record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(reader->eventHeap->buffers[0]->list); - recordcount++; - } - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->eventHeap->buffers[0] ); - if ( NULL == pos ) { - - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->eventHeap->buffers[0]->pos < reader->eventHeap->buffers[0]->end ) { - - ret= OTF_Reader_readUnknownRecord( reader->eventHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* add the last filepos of this buffer to "bytesDone" */ - reader->eventHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->eventHeap->buffers[0] ); - - /* stream is empty -> remove from heap */ - reader->eventHeap->n--; - reader->eventHeap->buffers[0]= - reader->eventHeap->buffers[reader->eventHeap->n]; - } - - OTF_Heap_resort( reader->eventHeap ); - } - - return recordcount; -} - - -uint64_t OTF_Reader_readEventsUnsorted( OTF_Reader* reader, OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - uint64_t p; - uint32_t currentprocess= 0; - char* pos; - uint32_t i; - int ret; - - double s_reziprok; - uint64_t delta_t; - - char next_char = '\0'; - - /* initialized? */ - if ( NULL == reader->eventHeap ) { - - - /* init */ - reader->eventHeap= (OTF_Heap*) malloc( sizeof(OTF_Heap) ); - if( NULL == reader->eventHeap ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return OTF_READ_ERROR; - } - - if( 0 == OTF_Heap_initEventHeap( reader->eventHeap, reader) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Heap_initEventHeap() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } - - /* for progress report */ - reader->eventHeap->progressMin= (uint64_t) -1; - reader->eventHeap->progressMax= 0; - - reader->eventHeap->bytesMax= 0; - reader->eventHeap->bytesMin= 0; - reader->eventHeap->bytesCurrent= 0; - reader->eventHeap->bytesDone= 0; - - /* make all buffers in heap jump to start time */ - for ( i= 0; i < reader->eventHeap->n; i++ ) { - - - ret= 1; - - /* the file has to retrieve his own information ... especially his "lastTime" is intressting */ - OTF_RBuffer_getFileProperties( reader->eventHeap->buffers[i] ); - - /* get last filepos of lasttime (right in front of the next time) */ - if( reader->maxTime < reader->eventHeap->buffers[i]->lastTime ) { - /* interval -> take the pos right behind the lasttime, right - before the next time */ - ret= OTF_RBuffer_searchTime( reader->eventHeap->buffers[i], reader->maxTime ); - - while( reader->maxTime >= reader->eventHeap->buffers[i]->time ) { - - OTF_RBuffer_getRecord( reader->eventHeap->buffers[i] ); - OTF_RBuffer_readNewline( reader->eventHeap->buffers[i] ); - } - - reader->eventHeap->bytesMax+= OTF_RBuffer_getFilePos( reader->eventHeap->buffers[i] ); - - } else { - /* no interval -> take the fileend */ - reader->eventHeap->bytesMax+= OTF_RBuffer_getFileSize( - reader->eventHeap->buffers[i] ); - } - - - /* get the filepos of the firsttime */ - ret&= OTF_RBuffer_searchTime( reader->eventHeap->buffers[i], reader->minTime ); - reader->eventHeap->bytesMin+= OTF_RBuffer_getFilePos( reader->eventHeap->buffers[i] ); - - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_RBuffer_searchTime() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } - - /* for progress report: get union of all buffer's time interval */ - p= reader->eventHeap->buffers[i]->firstTime; - reader->eventHeap->progressMin= ( reader->eventHeap->progressMin <= p ) ? - reader->eventHeap->progressMin : p; - p= reader->eventHeap->buffers[i]->lastTime; - reader->eventHeap->progressMax= ( reader->eventHeap->progressMax >= p ) ? - reader->eventHeap->progressMax : p; - - /* make sure buffer's time information is updated*/ - - pos= OTF_RBuffer_getRecord( reader->eventHeap->buffers[i] ); - - /* remove empty streams */ - if ( NULL == pos ) { - - reader->eventHeap->n--; - reader->eventHeap->buffers[i]= reader->eventHeap->buffers[reader->eventHeap->n]; - - /* make sure to repeat this for loop with the same index i */ - i--; - continue; - } - - /* inlined OTF_RBuffer_getCurrentTime() */ - if( reader->eventHeap->buffers[i]->time < reader->minTime ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "current time %llu < mintime %llu.\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) reader->eventHeap->buffers[i]->time, - (long long unsigned) reader->minTime ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } - } - - - /* for progress report: - cut intervals [progressMin,progressMax] and [minTime,maxTime] */ - reader->eventHeap->progressMin= ( reader->eventHeap->progressMin >= reader->minTime ) ? - reader->eventHeap->progressMin : reader->minTime; - reader->eventHeap->progressMax= ( reader->eventHeap->progressMax <= reader->maxTime ) ? - reader->eventHeap->progressMax : reader->maxTime; - - } - - - s_reziprok= 1/(double)reader->eventHeap->s; - delta_t= reader->eventHeap->progressMax-reader->eventHeap->progressMin; - - - while ( reader->eventHeap->n > 0 && recordcount < reader->recordLimit ) { - - /* inlined OTF_RBuffer_getCurrentTime() */ - - /* calculate a "current time", which is between min and max. - * In this case we have to: min + ((delta)/s)*(s-n) + (curtime-min)/s - * - * s= all streams - * n= streams left - * delta= max-min - */ - reader->eventHeap->progressCurrent= (uint64_t) ( - reader->eventHeap->progressMin - + - (delta_t*s_reziprok) - * - (reader->eventHeap->s-reader->eventHeap->n) - + - (reader->eventHeap->buffers[0]->time-reader->eventHeap->progressMin)*s_reziprok ); - - - /* check for time interval */ - if ( reader->eventHeap->buffers[0]->time >= reader->maxTime ) { - - /* add the last filepos of this buffer to "bytesDone" */ - reader->eventHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->eventHeap->buffers[0] ); - - /* drop that stream */ - reader->eventHeap->n--; - reader->eventHeap->buffers[0]= reader->eventHeap->buffers[reader->eventHeap->n]; - - continue; - } - - - /* inlined OTF_RBuffer_getCurrentProcess() */ - currentprocess= reader->eventHeap->buffers[0]->process; - - /* check if process is enabled */ - if ( 0 == OTF_ProcessList_getStatus( reader->processList, currentprocess ) ) { - - /* ignore record */ - OTF_RBuffer_readNewline( reader->eventHeap->buffers[0] ); - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->eventHeap->buffers[0] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->eventHeap->buffers[0]->pos < reader->eventHeap->buffers[0]->end ) { - - ret= OTF_Reader_readUnknownRecord( reader->eventHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* add the last filepos of this buffer to "bytesDone" */ - reader->eventHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->eventHeap->buffers[0] ); - - /* stream is empty -> remove from heap */ - reader->eventHeap->n--; - reader->eventHeap->buffers[0]= - reader->eventHeap->buffers[reader->eventHeap->n]; - - } - - - continue; - } - - /* remember next record type, if it will be a none KEYVALUE - record, dont't account it in recordcount */ - next_char = *(reader->eventHeap->buffers[0]->buffer + reader->eventHeap->buffers[0]->pos); - - ret= OTF_Reader_parseEventRecord( reader->eventHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_parseEventRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none KEYVALUE - record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(reader->eventHeap->buffers[0]->list); - recordcount++; - } - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->eventHeap->buffers[0] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->eventHeap->buffers[0]->pos < reader->eventHeap->buffers[0]->end ) { - - ret= OTF_Reader_readUnknownRecord( reader->eventHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->eventHeap ); - free( reader->eventHeap ); - reader->eventHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* add the last filepos of this buffer to "bytesDone" */ - reader->eventHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->eventHeap->buffers[0] ); - - /* stream is empty -> remove from heap */ - reader->eventHeap->n--; - reader->eventHeap->buffers[0]= - reader->eventHeap->buffers[reader->eventHeap->n]; - } - - } - - return recordcount; -} - - - -uint64_t OTF_Reader_readSnapshots( OTF_Reader* reader, - OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - - int ret; - char* pos; - uint32_t i; - - uint32_t currentprocess= 0; - -# ifdef OTF_DEBUG - uint64_t oldtime= 0; -# endif - - uint64_t p; - - char next_char = '\0'; - - - /* initialized? */ - if ( NULL == reader->snapshotsHeap ) { - - - /* init */ - reader->snapshotsHeap= (OTF_Heap*) malloc( sizeof(OTF_Heap) ); - if( NULL == reader->snapshotsHeap ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return OTF_READ_ERROR; - } - - if( 0 == OTF_Heap_initSnapshotsHeap( reader->snapshotsHeap, reader) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } - - /* for progress report */ - reader->snapshotsHeap->progressMin= (uint64_t) -1; - reader->snapshotsHeap->progressMax= 0; - - reader->snapshotsHeap->bytesMax= 0; - reader->snapshotsHeap->bytesMin= 0; - reader->snapshotsHeap->bytesCurrent= 0; - reader->snapshotsHeap->bytesDone= 0; - - /* make all buffers in heap jump to start time */ - for ( i= 0; i < reader->snapshotsHeap->n; i++ ) { - - - ret= 1; - - /* the file has to retrieve his own information ... especially his "lastTime" is intressting */ - OTF_RBuffer_getFileProperties( reader->snapshotsHeap->buffers[i] ); - - /* get last filepos of lasttime (right in front of the next time) */ - if( reader->maxTime < reader->snapshotsHeap->buffers[i]->lastTime ) { - /* interval -> take the pos right behind the lasttime, right - before the next time */ - ret= OTF_RBuffer_searchTime( reader->snapshotsHeap->buffers[i], reader->maxTime ); - - while( reader->maxTime >= reader->snapshotsHeap->buffers[i]->time ) { - - OTF_RBuffer_getRecord( reader->snapshotsHeap->buffers[i] ); - OTF_RBuffer_readNewline( reader->snapshotsHeap->buffers[i] ); - } - - reader->snapshotsHeap->bytesMax+= OTF_RBuffer_getFilePos( - reader->snapshotsHeap->buffers[i] ); - - } else { - /* no interval -> take the fileend */ - reader->snapshotsHeap->bytesMax+= OTF_RBuffer_getFileSize( - reader->snapshotsHeap->buffers[i] ); - } - - - /* get the filepos of the firsttime */ - ret&= OTF_RBuffer_searchTime( reader->snapshotsHeap->buffers[i], - reader->minTime ); - reader->snapshotsHeap->bytesMin+= OTF_RBuffer_getFilePos( - reader->snapshotsHeap->buffers[i] ); - - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_RBuffer_searchTime() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } - - /* for progress report: get union of all buffer's time interval */ - p= reader->snapshotsHeap->buffers[i]->firstTime; - reader->snapshotsHeap->progressMin= ( reader->snapshotsHeap->progressMin <= p ) ? - reader->snapshotsHeap->progressMin : p; - p= reader->snapshotsHeap->buffers[i]->lastTime; - reader->snapshotsHeap->progressMax= ( reader->snapshotsHeap->progressMax >= p ) ? - reader->snapshotsHeap->progressMax : p; - - /* make sure buffer's time information is updated*/ - - pos= OTF_RBuffer_getRecord( reader->snapshotsHeap->buffers[i] ); - - /* remove empty streams */ - if ( NULL == pos ) { - - reader->snapshotsHeap->n--; - reader->snapshotsHeap->buffers[i]= - reader->snapshotsHeap->buffers[reader->snapshotsHeap->n]; - - /* make sure to repeat this for loop with the same index i */ - i--; - continue; - } - - /* inlined OTF_RBuffer_getCurrentTime() */ - if( reader->snapshotsHeap->buffers[i]->time < reader->minTime ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "current time %llu < mintime %llu.\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) reader->snapshotsHeap->buffers[i]->time, - (long long unsigned) reader->minTime ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } - } - - OTF_Heap_sort( reader->snapshotsHeap ); - -# ifdef OTF_DEBUG - OTF_Heap_checksorted( reader->snapshotsHeap ); -# endif /* OTF_DEBUG */ - - /* for progress report: - cut intervals [progressMin,progressMax] and [minTime,maxTime] */ - reader->snapshotsHeap->progressMin= ( reader->snapshotsHeap->progressMin >= reader->minTime ) ? - reader->snapshotsHeap->progressMin : reader->minTime; - reader->snapshotsHeap->progressMax= ( reader->snapshotsHeap->progressMax <= reader->maxTime ) ? - reader->snapshotsHeap->progressMax : reader->maxTime; - - if ( reader->snapshotsHeap->n > 0 ) { - - reader->snapshotsHeap->progressCurrent= reader->snapshotsHeap->buffers[0]->time; - - } else { - - reader->snapshotsHeap->progressCurrent= 0; - } - } - - while ( reader->snapshotsHeap->n > 0 ) { - - if ( recordcount >= reader->recordLimit ) { - - /* record count limit reached, return */ - return recordcount; - } - - /* inlined OTF_RBuffer_getCurrentTime() */ -# ifdef OTF_DEBUG - oldtime= reader->snapshotsHeap->progressCurrent; -# endif - reader->snapshotsHeap->progressCurrent= reader->snapshotsHeap->buffers[0]->time; - - /* debug check */ -# ifdef OTF_DEBUG - if ( oldtime > reader->snapshotsHeap->progressCurrent ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Time does decrease. %llu < %llu.\n", - __FUNCTION__, __FILE__, __LINE__, - (unsigned long long) reader->snapshotsHeap->progressCurrent, - (unsigned long long) oldtime ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } -# endif /* OTF_DEBUG */ - - /* check for time interval */ - if ( reader->snapshotsHeap->progressCurrent >= reader->maxTime ) { - - /* add the last filepos of this buffer to "bytesDone" */ - reader->snapshotsHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->snapshotsHeap->buffers[0] ); - - /* drop that stream */ - reader->snapshotsHeap->n--; - reader->snapshotsHeap->buffers[0]= - reader->snapshotsHeap->buffers[reader->snapshotsHeap->n]; - - OTF_Heap_resort( reader->snapshotsHeap ); - - continue; - } - - - /* inlined OTF_RBuffer_getCurrentProcess() */ - currentprocess= reader->snapshotsHeap->buffers[0]->process; - - /* check if process is enabled */ - if ( 0 == OTF_ProcessList_getStatus( reader->processList, currentprocess ) ) { - - /* ignore record */ - OTF_RBuffer_readNewline( reader->snapshotsHeap->buffers[0] ); - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->snapshotsHeap->buffers[0] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->snapshotsHeap->buffers[0]->pos < reader->snapshotsHeap->buffers[0]->end ) { - - ret= OTF_Reader_readUnknownRecord( reader->snapshotsHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* add the last filepos of this buffer to "bytesDone" */ - reader->snapshotsHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->snapshotsHeap->buffers[0] ); - - /* stream is empty -> remove from heap */ - reader->snapshotsHeap->n--; - reader->snapshotsHeap->buffers[0]= - reader->snapshotsHeap->buffers[reader->snapshotsHeap->n]; - } - - OTF_Heap_resort( reader->snapshotsHeap ); - - continue; - } - - /* remember next record type, if it will be a none KEYVALUE - record, dont't account it in recordcount */ - next_char = *(reader->snapshotsHeap->buffers[0]->buffer + reader->snapshotsHeap->buffers[0]->pos); - - ret= OTF_Reader_parseSnapshotsRecord( reader->snapshotsHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_parseSnapshotsRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none KEYVALUE - record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(reader->snapshotsHeap->buffers[0]->list); - recordcount++; - } - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->snapshotsHeap->buffers[0] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->snapshotsHeap->buffers[0]->pos < reader->snapshotsHeap->buffers[0]->end ) { - - ret= OTF_Reader_readUnknownRecord( reader->snapshotsHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* add the last filepos of this buffer to "bytesDone" */ - reader->snapshotsHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->snapshotsHeap->buffers[0] ); - - /* stream is empty -> remove from heap */ - reader->snapshotsHeap->n--; - reader->snapshotsHeap->buffers[0]= - reader->snapshotsHeap->buffers[reader->snapshotsHeap->n]; - } - - OTF_Heap_resort( reader->snapshotsHeap ); - } - - return recordcount; -} - - -uint64_t OTF_Reader_readSnapshotsUnsorted( OTF_Reader* reader, OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - uint64_t p; - uint32_t currentprocess= 0; - char* pos; - uint32_t i; - int ret; - - double s_reziprok; - uint64_t delta_t; - - char next_char = '\0'; - - /* initialized? */ - if ( NULL == reader->snapshotsHeap ) { - - - /* init */ - reader->snapshotsHeap= (OTF_Heap*) malloc( sizeof(OTF_Heap) ); - if( NULL == reader->snapshotsHeap ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return OTF_READ_ERROR; - } - - if( 0 == OTF_Heap_initSnapshotsHeap( reader->snapshotsHeap, reader) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Heap_initSnapshotsHeap() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } - - /* for progress report */ - reader->snapshotsHeap->progressMin= (uint64_t) -1; - reader->snapshotsHeap->progressMax= 0; - - reader->snapshotsHeap->bytesMax= 0; - reader->snapshotsHeap->bytesMin= 0; - reader->snapshotsHeap->bytesCurrent= 0; - reader->snapshotsHeap->bytesDone= 0; - - /* make all buffers in heap jump to start time */ - for ( i= 0; i < reader->snapshotsHeap->n; i++ ) { - - - ret= 1; - - /* the file has to retrieve his own information ... especially his "lastTime" is intressting */ - OTF_RBuffer_getFileProperties( reader->snapshotsHeap->buffers[i] ); - - /* get last filepos of lasttime (right in front of the next time) */ - if( reader->maxTime < reader->snapshotsHeap->buffers[i]->lastTime ) { - /* interval -> take the pos right behind the lasttime, right - before the next time */ - ret= OTF_RBuffer_searchTime( reader->snapshotsHeap->buffers[i], reader->maxTime ); - - while( reader->maxTime >= reader->snapshotsHeap->buffers[i]->time ) { - - OTF_RBuffer_getRecord( reader->snapshotsHeap->buffers[i] ); - OTF_RBuffer_readNewline( reader->snapshotsHeap->buffers[i] ); - } - - reader->snapshotsHeap->bytesMax+= OTF_RBuffer_getFilePos( reader->snapshotsHeap->buffers[i] ); - - } else { - /* no interval -> take the fileend */ - reader->snapshotsHeap->bytesMax+= OTF_RBuffer_getFileSize( - reader->snapshotsHeap->buffers[i] ); - } - - - /* get the filepos of the firsttime */ - ret&= OTF_RBuffer_searchTime( reader->snapshotsHeap->buffers[i], reader->minTime ); - reader->snapshotsHeap->bytesMin+= OTF_RBuffer_getFilePos( reader->snapshotsHeap->buffers[i] ); - - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_RBuffer_searchTime() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } - - /* for progress report: get union of all buffer's time interval */ - p= reader->snapshotsHeap->buffers[i]->firstTime; - reader->snapshotsHeap->progressMin= ( reader->snapshotsHeap->progressMin <= p ) ? - reader->snapshotsHeap->progressMin : p; - p= reader->snapshotsHeap->buffers[i]->lastTime; - reader->snapshotsHeap->progressMax= ( reader->snapshotsHeap->progressMax >= p ) ? - reader->snapshotsHeap->progressMax : p; - - /* make sure buffer's time information is updated*/ - - pos= OTF_RBuffer_getRecord( reader->snapshotsHeap->buffers[i] ); - - /* remove empty streams */ - if ( NULL == pos ) { - - reader->snapshotsHeap->n--; - reader->snapshotsHeap->buffers[i]= reader->snapshotsHeap->buffers[reader->snapshotsHeap->n]; - - /* make sure to repeat this for loop with the same index i */ - i--; - continue; - } - - /* inlined OTF_RBuffer_getCurrentTime() */ - if( reader->snapshotsHeap->buffers[i]->time < reader->minTime ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "current time %llu < mintime %llu.\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) reader->snapshotsHeap->buffers[i]->time, - (long long unsigned) reader->minTime ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } - } - - - /* for progress report: - cut intervals [progressMin,progressMax] and [minTime,maxTime] */ - reader->snapshotsHeap->progressMin= ( reader->snapshotsHeap->progressMin >= reader->minTime ) ? - reader->snapshotsHeap->progressMin : reader->minTime; - reader->snapshotsHeap->progressMax= ( reader->snapshotsHeap->progressMax <= reader->maxTime ) ? - reader->snapshotsHeap->progressMax : reader->maxTime; - - } - - - s_reziprok= 1/(double)reader->snapshotsHeap->s; - delta_t= reader->snapshotsHeap->progressMax-reader->snapshotsHeap->progressMin; - - - while ( reader->snapshotsHeap->n > 0 && recordcount < reader->recordLimit ) { - - /* inlined OTF_RBuffer_getCurrentTime() */ - - /* calculate a "current time", which is between min and max. - * In this case we have to: min + ((delta)/s)*(s-n) + (curtime-min)/s - * - * s= all streams - * n= streams left - * delta= max-min - */ - reader->snapshotsHeap->progressCurrent= (uint64_t) ( - reader->snapshotsHeap->progressMin - + - (delta_t*s_reziprok) - * - (reader->snapshotsHeap->s-reader->snapshotsHeap->n) - + - (reader->snapshotsHeap->buffers[0]->time-reader->snapshotsHeap->progressMin)*s_reziprok ); - - /* check for time interval */ - if ( reader->snapshotsHeap->buffers[0]->time >= reader->maxTime ) { - - /* add the last filepos of this buffer to "bytesDone" */ - reader->snapshotsHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->snapshotsHeap->buffers[0] ); - - /* drop that stream */ - reader->snapshotsHeap->n--; - reader->snapshotsHeap->buffers[0]= reader->snapshotsHeap->buffers[reader->snapshotsHeap->n]; - - continue; - } - - - /* inlined OTF_RBuffer_getCurrentProcess() */ - currentprocess= reader->snapshotsHeap->buffers[0]->process; - - /* check if process is enabled */ - if ( 0 == OTF_ProcessList_getStatus( reader->processList, currentprocess ) ) { - - /* ignore record */ - OTF_RBuffer_readNewline( reader->snapshotsHeap->buffers[0] ); - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->snapshotsHeap->buffers[0] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->snapshotsHeap->buffers[0]->pos < reader->snapshotsHeap->buffers[0]->end ) { - - ret= OTF_Reader_readUnknownRecord( reader->snapshotsHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* add the last filepos of this buffer to "bytesDone" */ - reader->snapshotsHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->snapshotsHeap->buffers[0] ); - - /* stream is empty -> remove from heap */ - reader->snapshotsHeap->n--; - reader->snapshotsHeap->buffers[0]= - reader->snapshotsHeap->buffers[reader->snapshotsHeap->n]; - - } - - - continue; - } - - /* remember next record type, if it will be a none KEYVALUE - record, dont't account it in recordcount */ - next_char = *(reader->snapshotsHeap->buffers[0]->buffer + reader->snapshotsHeap->buffers[0]->pos); - - ret= OTF_Reader_parseSnapshotsRecord( reader->snapshotsHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_parseSnapshotsRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none KEYVALUE - record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(reader->snapshotsHeap->buffers[0]->list); - recordcount++; - } - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->snapshotsHeap->buffers[0] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->snapshotsHeap->buffers[0]->pos < reader->snapshotsHeap->buffers[0]->end ) { - - ret= OTF_Reader_readUnknownRecord( reader->snapshotsHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->snapshotsHeap ); - free( reader->snapshotsHeap ); - reader->snapshotsHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* add the last filepos of this buffer to "bytesDone" */ - reader->snapshotsHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->snapshotsHeap->buffers[0] ); - - /* stream is empty -> remove from heap */ - reader->snapshotsHeap->n--; - reader->snapshotsHeap->buffers[0]= - reader->snapshotsHeap->buffers[reader->snapshotsHeap->n]; - } - - } - - return recordcount; -} - - -uint64_t OTF_Reader_readStatistics( OTF_Reader* reader, - OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - - int ret; - char* pos; - uint32_t i; - - uint32_t currentprocess= 0; - -# ifdef OTF_DEBUG - uint64_t oldtime= 0; -# endif - - uint64_t p; - - char next_char = '\0'; - - /* initialized? */ - if ( NULL == reader->statisticsHeap ) { - - - /* init */ - reader->statisticsHeap= (OTF_Heap*) malloc( sizeof(OTF_Heap) ); - if( NULL == reader->statisticsHeap ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return OTF_READ_ERROR; - } - - if( 0 == OTF_Heap_initStatisticsHeap( reader->statisticsHeap, reader) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Heap_initStatisticsHeap() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } - - - /* for progress report */ - reader->statisticsHeap->progressMin= (uint64_t) -1; - reader->statisticsHeap->progressMax= 0; - - reader->statisticsHeap->bytesMax= 0; - reader->statisticsHeap->bytesMin= 0; - reader->statisticsHeap->bytesCurrent= 0; - reader->statisticsHeap->bytesDone= 0; - - /* make all buffers in heap jump to start time */ - for ( i= 0; i < reader->statisticsHeap->n; i++ ) { - - - ret= 1; - - /* the file has to retrieve his own information ... especially his "lastTime" is intressting */ - OTF_RBuffer_getFileProperties( reader->statisticsHeap->buffers[i] ); - - /* get last filepos of lasttime (right in front of the next time) */ - if( reader->maxTime < reader->statisticsHeap->buffers[i]->lastTime ) { - /* interval -> take the pos right behind the lasttime, right - before the next time */ - ret= OTF_RBuffer_searchTime( reader->statisticsHeap->buffers[i], - reader->maxTime ); - - while( reader->maxTime >= reader->statisticsHeap->buffers[i]->time ) { - - OTF_RBuffer_getRecord( reader->statisticsHeap->buffers[i] ); - OTF_RBuffer_readNewline( reader->statisticsHeap->buffers[i] ); - } - - reader->statisticsHeap->bytesMax+= OTF_RBuffer_getFilePos( - reader->statisticsHeap->buffers[i] ); - - } else { - /* no interval -> take the fileend */ - reader->statisticsHeap->bytesMax+= OTF_RBuffer_getFileSize( - reader->statisticsHeap->buffers[i] ); - } - - - /* get the filepos of the firsttime */ - ret&= OTF_RBuffer_searchTime( reader->statisticsHeap->buffers[i], - reader->minTime ); - reader->statisticsHeap->bytesMin+= OTF_RBuffer_getFilePos( - reader->statisticsHeap->buffers[i] ); - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_RBuffer_searchTime() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } - - /* for progress report: get union of all buffer's time interval */ - p= reader->statisticsHeap->buffers[i]->firstTime; - reader->statisticsHeap->progressMin= ( reader->statisticsHeap->progressMin <= p ) ? - reader->statisticsHeap->progressMin : p; - p= reader->statisticsHeap->buffers[i]->lastTime; - reader->statisticsHeap->progressMax= ( reader->statisticsHeap->progressMax >= p ) ? - reader->statisticsHeap->progressMax : p; - - /* make sure buffer's time information is updated*/ - - pos= OTF_RBuffer_getRecord( reader->statisticsHeap->buffers[i] ); - - /* remove empty streams */ - if ( NULL == pos ) { - - reader->statisticsHeap->n--; - reader->statisticsHeap->buffers[i]= - reader->statisticsHeap->buffers[reader->statisticsHeap->n]; - - /* make sure to repeat this for loop with the same index i */ - i--; - continue; - } - - /* inlined OTF_RBuffer_getCurrentTime() */ - if( reader->statisticsHeap->buffers[i]->time < reader->minTime ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "current time %llu < mintime %llu.\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) reader->statisticsHeap->buffers[i]->time, - (long long unsigned) reader->minTime ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } - } - - OTF_Heap_sort( reader->statisticsHeap ); - -# ifdef OTF_DEBUG - OTF_Heap_checksorted( reader->statisticsHeap ); -# endif /* OTF_DEBUG */ - - /* for progress report: - cut intervals [progressMin,progressMax] and [minTime,maxTime] */ - reader->statisticsHeap->progressMin= ( reader->statisticsHeap->progressMin >= reader->minTime ) ? - reader->statisticsHeap->progressMin : reader->minTime; - reader->statisticsHeap->progressMax= ( reader->statisticsHeap->progressMax <= reader->maxTime ) ? - reader->statisticsHeap->progressMax : reader->maxTime; - - if ( reader->statisticsHeap->n > 0 ) { - - reader->statisticsHeap->progressCurrent= reader->statisticsHeap->buffers[0]->time; - - } else { - - reader->statisticsHeap->progressCurrent= 0; - } - } - - - while ( reader->statisticsHeap->n > 0 ) { - - if ( recordcount >= reader->recordLimit ) { - - /* record count limit reached, return */ - return recordcount; - } - - /* inlined OTF_RBuffer_getCurrentTime() */ -# ifdef OTF_DEBUG - oldtime= reader->statisticsHeap->progressCurrent; -# endif - reader->statisticsHeap->progressCurrent= reader->statisticsHeap->buffers[0]->time; - - /* debug check */ -# ifdef OTF_DEBUG - if ( oldtime > reader->statisticsHeap->progressCurrent ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Time does decrease. %llu < %llu.\n", - __FUNCTION__, __FILE__, __LINE__, - (unsigned long long) reader->statisticsHeap->progressCurrent, - (unsigned long long) oldtime ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } -# endif - - /* check for time interval */ - if ( reader->statisticsHeap->progressCurrent >= reader->maxTime ) { - - /* add the last filepos of this buffer to "bytesDone" */ - reader->statisticsHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->statisticsHeap->buffers[0] ); - - /* drop that stream */ - reader->statisticsHeap->n--; - reader->statisticsHeap->buffers[0]= - reader->statisticsHeap->buffers[reader->statisticsHeap->n]; - - OTF_Heap_resort( reader->statisticsHeap ); - - continue; - } - - - /* inlined OTF_RBuffer_getCurrentProcess() */ - currentprocess= reader->statisticsHeap->buffers[0]->process; - - /* check if process is enabled */ - if ( 0 == OTF_ProcessList_getStatus( reader->processList, currentprocess ) ) { - - /* ignore record */ - OTF_RBuffer_readNewline( reader->statisticsHeap->buffers[0] ); - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->statisticsHeap->buffers[0] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->statisticsHeap->buffers[0]->pos < reader->statisticsHeap->buffers[0]->end ) { - - ret= OTF_Reader_readUnknownRecord( reader->statisticsHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* add the last filepos of this buffer to "bytesDone" */ - reader->statisticsHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->statisticsHeap->buffers[0] ); - - /* stream is empty -> remove from heap */ - reader->statisticsHeap->n--; - reader->statisticsHeap->buffers[0]= - reader->statisticsHeap->buffers[reader->statisticsHeap->n]; - } - - OTF_Heap_resort( reader->statisticsHeap ); - - continue; - } - - /* remember next record type, if it will be a none KEYVALUE - record, dont't account it in recordcount */ - next_char = *(reader->statisticsHeap->buffers[0]->buffer + reader->statisticsHeap->buffers[0]->pos); - - ret= OTF_Reader_parseStatisticsRecord( reader->statisticsHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_parseStatisticsRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none KEYVALUE - record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(reader->statisticsHeap->buffers[0]->list); - recordcount++; - } - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->statisticsHeap->buffers[0] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->statisticsHeap->buffers[0]->pos < reader->statisticsHeap->buffers[0]->end ) { - - ret= OTF_Reader_readUnknownRecord( reader->statisticsHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* add the last filepos of this buffer to "bytesDone" */ - reader->statisticsHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->statisticsHeap->buffers[0] ); - - /* stream is empty -> remove from heap */ - reader->statisticsHeap->n--; - reader->statisticsHeap->buffers[0]= - reader->statisticsHeap->buffers[reader->statisticsHeap->n]; - } - - OTF_Heap_resort( reader->statisticsHeap ); - } - - - return recordcount; -} - - - -uint64_t OTF_Reader_readStatisticsUnsorted( OTF_Reader* reader, OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - uint64_t p; - uint32_t currentprocess= 0; - char* pos; - uint32_t i; - int ret; - - double s_reziprok; - uint64_t delta_t; - - - char next_char = '\0'; - - /* initialized? */ - if ( NULL == reader->statisticsHeap ) { - - - /* init */ - reader->statisticsHeap= (OTF_Heap*) malloc( sizeof(OTF_Heap) ); - if( NULL == reader->statisticsHeap ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return OTF_READ_ERROR; - } - - if( 0 == OTF_Heap_initStatisticsHeap( reader->statisticsHeap, reader) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Heap_initStatisticsHeap() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } - - /* for progress report */ - reader->statisticsHeap->progressMin= (uint64_t) -1; - reader->statisticsHeap->progressMax= 0; - - reader->statisticsHeap->bytesMax= 0; - reader->statisticsHeap->bytesMin= 0; - reader->statisticsHeap->bytesCurrent= 0; - reader->statisticsHeap->bytesDone= 0; - - /* make all buffers in heap jump to start time */ - for ( i= 0; i < reader->statisticsHeap->n; i++ ) { - - - ret= 1; - - /* the file has to retrieve his own information ... especially his "lastTime" is intressting */ - OTF_RBuffer_getFileProperties( reader->statisticsHeap->buffers[i] ); - - /* get last filepos of lasttime (right in front of the next time) */ - if( reader->maxTime < reader->statisticsHeap->buffers[i]->lastTime ) { - /* interval -> take the pos right behind the lasttime, right - before the next time */ - ret= OTF_RBuffer_searchTime( reader->statisticsHeap->buffers[i], reader->maxTime ); - - while( reader->maxTime >= reader->statisticsHeap->buffers[i]->time ) { - - OTF_RBuffer_getRecord( reader->statisticsHeap->buffers[i] ); - OTF_RBuffer_readNewline( reader->statisticsHeap->buffers[i] ); - } - - reader->statisticsHeap->bytesMax+= OTF_RBuffer_getFilePos( reader->statisticsHeap->buffers[i] ); - - } else { - /* no interval -> take the fileend */ - reader->statisticsHeap->bytesMax+= OTF_RBuffer_getFileSize( - reader->statisticsHeap->buffers[i] ); - } - - - /* get the filepos of the firsttime */ - ret&= OTF_RBuffer_searchTime( reader->statisticsHeap->buffers[i], reader->minTime ); - reader->statisticsHeap->bytesMin+= OTF_RBuffer_getFilePos( reader->statisticsHeap->buffers[i] ); - - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_RBuffer_searchTime() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } - - /* for progress report: get union of all buffer's time interval */ - p= reader->statisticsHeap->buffers[i]->firstTime; - reader->statisticsHeap->progressMin= ( reader->statisticsHeap->progressMin <= p ) ? - reader->statisticsHeap->progressMin : p; - p= reader->statisticsHeap->buffers[i]->lastTime; - reader->statisticsHeap->progressMax= ( reader->statisticsHeap->progressMax >= p ) ? - reader->statisticsHeap->progressMax : p; - - /* make sure buffer's time information is updated*/ - - pos= OTF_RBuffer_getRecord( reader->statisticsHeap->buffers[i] ); - - /* remove empty streams */ - if ( NULL == pos ) { - - reader->statisticsHeap->n--; - reader->statisticsHeap->buffers[i]= reader->statisticsHeap->buffers[reader->statisticsHeap->n]; - - /* make sure to repeat this for loop with the same index i */ - i--; - continue; - } - - /* inlined OTF_RBuffer_getCurrentTime() */ - if( reader->statisticsHeap->buffers[i]->time < reader->minTime ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "current time %llu < mintime %llu.\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) reader->statisticsHeap->buffers[i]->time, - (long long unsigned) reader->minTime ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } - } - - - /* for progress report: - cut intervals [progressMin,progressMax] and [minTime,maxTime] */ - reader->statisticsHeap->progressMin= ( reader->statisticsHeap->progressMin >= reader->minTime ) ? - reader->statisticsHeap->progressMin : reader->minTime; - reader->statisticsHeap->progressMax= ( reader->statisticsHeap->progressMax <= reader->maxTime ) ? - reader->statisticsHeap->progressMax : reader->maxTime; - - } - - - s_reziprok= 1/(double)reader->statisticsHeap->s; - delta_t= reader->statisticsHeap->progressMax-reader->statisticsHeap->progressMin; - - - while ( reader->statisticsHeap->n > 0 && recordcount < reader->recordLimit ) { - - /* inlined OTF_RBuffer_getCurrentTime() */ - - /* calculate a "current time", which is between min and max. - * In this case we have to: min + ((delta)/s)*(s-n) + (curtime-min)/s - * - * s= all streams - * n= streams left - * delta= max-min - */ - reader->statisticsHeap->progressCurrent= (uint64_t) ( - reader->statisticsHeap->progressMin - + - (delta_t*s_reziprok) - * - (reader->statisticsHeap->s-reader->statisticsHeap->n) - + - (reader->statisticsHeap->buffers[0]->time-reader->statisticsHeap->progressMin)*s_reziprok ); - - /* check for time interval */ - if ( reader->statisticsHeap->buffers[0]->time >= reader->maxTime ) { - - /* add the last filepos of this buffer to "bytesDone" */ - reader->statisticsHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->statisticsHeap->buffers[0] ); - - /* drop that stream */ - reader->statisticsHeap->n--; - reader->statisticsHeap->buffers[0]= reader->statisticsHeap->buffers[reader->statisticsHeap->n]; - - continue; - } - - - /* inlined OTF_RBuffer_getCurrentProcess() */ - currentprocess= reader->statisticsHeap->buffers[0]->process; - - /* check if process is enabled */ - if ( 0 == OTF_ProcessList_getStatus( reader->processList, currentprocess ) ) { - - /* ignore record */ - OTF_RBuffer_readNewline( reader->statisticsHeap->buffers[0] ); - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->statisticsHeap->buffers[0] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->statisticsHeap->buffers[0]->pos < reader->statisticsHeap->buffers[0]->end ) { - - ret= OTF_Reader_readUnknownRecord( reader->statisticsHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* add the last filepos of this buffer to "bytesDone" */ - reader->statisticsHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->statisticsHeap->buffers[0] ); - - /* stream is empty -> remove from heap */ - reader->statisticsHeap->n--; - reader->statisticsHeap->buffers[0]= - reader->statisticsHeap->buffers[reader->statisticsHeap->n]; - - } - - - continue; - } - - /* remember next record type, if it will be a none KEYVALUE - record, dont't account it in recordcount */ - next_char = *(reader->statisticsHeap->buffers[0]->buffer + reader->statisticsHeap->buffers[0]->pos); - - ret= OTF_Reader_parseStatisticsRecord( reader->statisticsHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_parseStatisticsRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none KEYVALUE - record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(reader->statisticsHeap->buffers[0]->list); - recordcount++; - } - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->statisticsHeap->buffers[0] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->statisticsHeap->buffers[0]->pos < reader->statisticsHeap->buffers[0]->end ) { - - ret= OTF_Reader_readUnknownRecord( reader->statisticsHeap->buffers[0], handlers ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->statisticsHeap ); - free( reader->statisticsHeap ); - reader->statisticsHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* add the last filepos of this buffer to "bytesDone" */ - reader->statisticsHeap->bytesDone+= OTF_RBuffer_getFilePos( - reader->statisticsHeap->buffers[0] ); - - /* stream is empty -> remove from heap */ - reader->statisticsHeap->n--; - reader->statisticsHeap->buffers[0]= - reader->statisticsHeap->buffers[reader->statisticsHeap->n]; - } - - } - - return recordcount; -} - - -/* this is much simple than the other 'OTF_Reader_readXXX' functions because it -only looks at stream '0' */ -uint64_t OTF_Reader_readMarkers( OTF_Reader* reader, OTF_HandlerArray* handlers ) { - - - uint64_t recordcount= 0; - - int ret; - char* pos; - uint32_t i; - - OTF_MapEntry* entry; - uint32_t streamId; - - char next_char = '\0'; - - /* initialized? */ - if ( NULL == reader->markerHeap ) { - - - /* init */ - - reader->markerHeap= (OTF_Heap*) malloc( sizeof(OTF_Heap) ); - if( NULL == reader->markerHeap ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return OTF_READ_ERROR; - } - - if( 0 == OTF_Heap_initMarkerHeap( reader->markerHeap, reader ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Heap_initDefHeap() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->markerHeap ); - free( reader->markerHeap ); - reader->markerHeap= NULL; - - return OTF_READ_ERROR; - } - - for ( i= 0; i < reader->markerHeap->n; i++ ) { - - - if ( NULL != reader->markerHeap->buffers[i] ) { - - pos= OTF_RBuffer_getRecord( reader->markerHeap->buffers[i] ); - - /* remove empty streams */ - if ( NULL == pos ) { - - /* keep original order */ - reader->markerHeap->buffers[i]= NULL; - } - } - } - } - - - /* read streams */ - for ( i= 0; i < reader->markerHeap->n; i ++ ) { - - - if ( NULL == reader->markerHeap->buffers[i] ) { - - continue; - } - - streamId= 0; - if ( i > 0 ) { - - entry= OTF_MasterControl_getEntryByIndex( reader->mc, i -1 ); - streamId= entry->argument; - } - - pos= (char*) 0x2; - while ( NULL != pos ) { - - if ( recordcount >= reader->recordLimit ) { - - /* record count limit reached, return */ - return recordcount; - } - - /* remember next record type, if it will be a none - KEYVALUE record, dont't account it in recordcount */ - next_char = *(reader->markerHeap->buffers[i]->buffer + reader->markerHeap->buffers[i]->pos); - - ret= OTF_Reader_parseMarkerRecord( reader->markerHeap->buffers[i], handlers, streamId ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_parseMarkerRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->markerHeap ); - free( reader->markerHeap ); - reader->markerHeap= NULL; - - return OTF_READ_ERROR; - } - - /* Now reset the KeyValue list, if we consumed a none - KEYVALUE record */ - if ( next_char != OTF_KEYWORD_F_KEYVALUE_PREFIX /* 'K' */ ) { - OTF_KeyValueList_reset(reader->markerHeap->buffers[i]->list); - recordcount++; - } - - /* prepare next record in that stream */ - pos= OTF_RBuffer_getRecord( reader->markerHeap->buffers[i] ); - if ( NULL == pos ) { - - /* test if the file is really exceeded or if there is some junk left. - test here instead of in 'OTF_RBuffer_getRecord()'. - throw a warning/error in case*/ - - if ( reader->markerHeap->buffers[i]->pos < reader->markerHeap->buffers[i]->end ) { - - ret= OTF_Reader_readUnknownMarkerRecord( reader->markerHeap->buffers[i], handlers, streamId ); - if ( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Reader_readUnknownMarkerRecord() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - OTF_Heap_finalize( reader->markerHeap ); - free( reader->markerHeap ); - reader->markerHeap= NULL; - - return OTF_READ_ERROR; - } - } - - /* stream is empty -> remove from heap */ - reader->markerHeap->buffers[i]= NULL; - } - } - } - - return recordcount; -} - - - -void OTF_Reader_setTimeInterval( OTF_Reader* reader, - uint64_t minTime, uint64_t maxTime ) { - - - OTF_Reader_resetHeaps( reader ); - - reader->minTime = minTime; - reader->maxTime = maxTime; -} - - -uint64_t OTF_Reader_getTimeIntervalMin( OTF_Reader* reader ) { - - - return reader->minTime; -} - - -uint64_t OTF_Reader_getTimeIntervalMax( OTF_Reader* reader ) { - - - return reader->maxTime; -} - - -void OTF_Reader_setRecordLimit( OTF_Reader* reader, uint64_t limit ) { - - - if( limit == OTF_READ_ERROR ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "limit cannot be set to %llu. Reset to OTF_READ_MAXRECORDS.\n", - __FUNCTION__, __FILE__, __LINE__, - (long long unsigned) limit ); - - limit= OTF_READ_MAXRECORDS; - } - - reader->recordLimit= limit; -} - - -uint64_t OTF_Reader_getRecordLimit( OTF_Reader* reader ) { - - - return reader->recordLimit; -} - - -int OTF_Reader_closeAllStreams( OTF_Reader* reader ) { - - - int ret= 1; - uint32_t i; - - for ( i = 0; i < reader->n ; ++i ) { - - ret&= OTF_RStream_close( reader->stream[i] ); - } - - reader->n = 0; - - return ret; -} - - -uint8_t OTF_Reader_eventProgress( OTF_Reader* reader, uint64_t* minimum, - uint64_t* current, uint64_t* maximum ) { - - - return OTF_Reader_eventTimeProgress( reader, minimum, current, maximum ); -} - - -uint8_t OTF_Reader_snapshotProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - return OTF_Reader_snapshotTimeProgress( reader, minimum, current, maximum ); -} - - -uint8_t OTF_Reader_statisticProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - return OTF_Reader_statisticTimeProgress( reader, minimum, current, maximum ); -} - - -uint8_t OTF_Reader_eventTimeProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - if ( NULL == reader->eventHeap || - reader->eventHeap->progressCurrent < reader->eventHeap->progressMin || - reader->eventHeap->progressCurrent > reader->eventHeap->progressMax ) { - - return 0; - } - - *minimum= reader->eventHeap->progressMin; - *current= reader->eventHeap->progressCurrent; - *maximum= reader->eventHeap->progressMax; - - - return 1; -} - - -uint8_t OTF_Reader_snapshotTimeProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - if ( NULL == reader->snapshotsHeap || - reader->snapshotsHeap->progressCurrent < reader->snapshotsHeap->progressMin || - reader->snapshotsHeap->progressCurrent > reader->snapshotsHeap->progressMax ) { - - return 0; - } - - *minimum= reader->snapshotsHeap->progressMin; - *current= reader->snapshotsHeap->progressCurrent; - *maximum= reader->snapshotsHeap->progressMax; - - return 1; -} - - -uint8_t OTF_Reader_statisticTimeProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - if ( NULL == reader->statisticsHeap || - reader->statisticsHeap->progressCurrent < reader->statisticsHeap->progressMin || - reader->statisticsHeap->progressCurrent > reader->statisticsHeap->progressMax ) { - - return 0; - } - - *minimum= reader->statisticsHeap->progressMin; - *current= reader->statisticsHeap->progressCurrent; - *maximum= reader->statisticsHeap->progressMax; - - return 1; -} - - -uint8_t OTF_Reader_eventBytesProgress( OTF_Reader* reader, uint64_t* minimum, - uint64_t* current, uint64_t* maximum ) { - - - uint32_t i; - uint64_t pos; - - *minimum= reader->eventHeap->bytesMin; - *maximum= reader->eventHeap->bytesMax; - *current= reader->eventHeap->bytesDone; - - for( i= 0; i < reader->eventHeap->n; ++i ) { - - pos= OTF_RBuffer_getFilePos( reader->eventHeap->buffers[i] ); - *current+= pos; - } - - if( *current > *maximum ) { - *current= *maximum; - } - - return 1; -} - - -uint8_t OTF_Reader_snapshotBytesProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - uint32_t i; - uint64_t pos; - - *minimum= reader->snapshotsHeap->bytesMin; - *maximum= reader->snapshotsHeap->bytesMax; - *current= reader->snapshotsHeap->bytesDone; - - for( i= 0; i < reader->snapshotsHeap->n; ++i ) { - - pos= OTF_RBuffer_getFilePos( reader->snapshotsHeap->buffers[i] ); - *current+= pos; - } - - if( *current > *maximum ) { - *current= *maximum; - } - - return 1; -} - - -uint8_t OTF_Reader_statisticBytesProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ) { - - - uint32_t i; - uint64_t pos; - - *minimum= reader->statisticsHeap->bytesMin; - *maximum= reader->statisticsHeap->bytesMax; - *current= reader->statisticsHeap->bytesDone; - - for( i= 0; i < reader->statisticsHeap->n; ++i ) { - - pos= OTF_RBuffer_getFilePos( reader->statisticsHeap->buffers[i] ); - *current+= pos; - } - - if( *current > *maximum ) { - *current= *maximum; - } - - return 1; -} diff --git a/externals/otf/otflib/OTF_Reader.h b/externals/otf/otflib/OTF_Reader.h deleted file mode 100644 index 4af73ff2cac2c76170dae531370012379d6c3e0b..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Reader.h +++ /dev/null @@ -1,839 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_Reader.h - * - * @brief Transparently reads OTF traces which consist of multiple streams. - * - * This interface should be used whenever a trace file is to be read as a - * whole. - * - * \ingroup reader - */ - - -#ifndef OTF_READER_H -#define OTF_READER_H - - -#include "OTF_inttypes.h" - - -#include "OTF_MasterControl.h" -#include "OTF_FileManager.h" -#include "OTF_RStream.h" -#include "OTF_HandlerArray.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** \defgroup reader Reader Interface - * - * The reader provides high level read access to traces - * disregarding the presence of streams. - * - * \section reader_example1 A simple Example - * - * \code - * #include <stdio.h> - * #include <assert.h> - * #include "otf.h" - * \endcode - * - * Define handlers/callbacks for the records you want to read. - * \code - * int handleEnter (void *userData, uint64_t time, uint32_t function, uint32_t process, uint32_t source) { - * - * printf("we just entered function %u\n", function); - * - * return OTF_RETURN_OK; - * } - * - * int handleLeave (void *userData, uint64_t time, uint32_t function, uint32_t process, uint32_t source) { - * - * printf("byebye\n"); - * - * return OTF_RETURN_OK; - * } - * \endcode - * - * \code - * int main( int argc, char** argv ) { - * \endcode - * - * Declare a file manager, a reader, and a handler array. - * \code - * OTF_FileManager* manager; - * OTF_Reader* reader; - * OTF_HandlerArray* handlers; - * \endcode - * - * Initialize the file manager. Do not open more than 100 files. - * \code - * manager= OTF_FileManager_open( 100 ); - * assert( manager ); - * \endcode - * - * Initialize the handler array. - * \code - * handlers = OTF_HandlerArray_open(); - * assert( handlers ); - * \endcode - * - * Initialize the reader. - * \code - * reader = OTF_Reader_open( "mytrace", manager ); - * assert( reader ); - * \endcode - * - * Register your callback functions to the handler array. - * \code - * OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleEnter, OTF_ENTER_RECORD ); - * OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleLeave, OTF_LEAVE_RECORD ); - * \endcode - * - * - * Do the actual reading. - * \code - * OTF_Reader_readEvents( reader, handlers ); - * \endcode - * - * - * Clean everything up before exiting the program. - * \code - * OTF_Reader_close( reader ); - * OTF_HandlerArray_close( handlers ); - * OTF_FileManager_close( manager ); - * - * return 0; - * } - * \endcode - * - * Compile and link this using $ gcc -o test test.c `otfconfig --libs`. - * - * - * \section reader_example2 A second, more complex Example - * - * Same as before - * \code - * #include <stdio.h> - * #include <assert.h> - * #include "otf.h" - * \endcode - * - * Create a structure, which holds information needed in every handler. - * We will register this structure to the handlers, so that the userData pointer - * in every handler will point to it. - * In this example we just want to count the occurences. - * \code - * typedef struct { - * uint64_t count; - * } HandlerArgument; - * \endcode - * - * Define four handlers. - * In every handler we will increase HandlerArgument::count. - * \code - * int handleDefProcess (void *userData, uint32_t stream, uint32_t process, const char *name, uint32_t parent) { - * ((HandlerArgument*)userData)->count++; - * return OTF_RETURN_OK; - * } - * int handleDefFunction (void *userData, uint32_t stream, uint32_t func, const char *name, uint32_t funcGroup, uint32_t source) { - * ((HandlerArgument*)userData)->count++; - * return OTF_RETURN_OK; - * } - * int handleEnter (void *userData, uint64_t time, uint32_t function, uint32_t process, uint32_t source) { - * ((HandlerArgument*)userData)->count++; - * return OTF_RETURN_OK; - * } - * int handleLeave (void *userData, uint64_t time, uint32_t function, uint32_t process, uint32_t source) { - * ((HandlerArgument*)userData)->count++; - * return OTF_RETURN_OK; - * } - * \endcode - * - * - * Same as before - * \code - * int main( int argc, char** argv ) { - * - * OTF_FileManager* manager; - * OTF_Reader* reader; - * OTF_HandlerArray* handlers; - * \endcode - * - * We need some additional variables for the read progress - * \code - * uint64_t minbytes; - * uint64_t curbytes; - * uint64_t maxbytes; - * \endcode - * - * \code - * uint64_t ret; - * HandlerArgument ha; - * ha.count = 0; - * - * manager= OTF_FileManager_open( 100 ); - * assert( manager ); - * - * handlers = OTF_HandlerArray_open(); - * assert( handlers ); - * - * reader = OTF_Reader_open( "mytrace", manager ); - * assert( reader ); - * \endcode - * - * Register handlers for define process records, - * define function records, enter records and leave records - * - * \code - * OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefProcess, OTF_DEFPROCESS_RECORD ); - * \endcode - * Register the first handler argument ha to the handler where it should be passed into. - * \code - * OTF_HandlerArray_setFirstHandlerArg( handlers, &ha, OTF_DEFPROCESS_RECORD ); - * \endcode - * - * \code - * OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefFunction, OTF_DEFFUNCTION_RECORD ); - * OTF_HandlerArray_setFirstHandlerArg( handlers, &ha, OTF_DEFFUNCTION_RECORD ); - * - * OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleEnter, OTF_ENTER_RECORD ); - * OTF_HandlerArray_setFirstHandlerArg( handlers, &ha, OTF_ENTER_RECORD ); - * - * OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleLeave, OTF_LEAVE_RECORD ); - * OTF_HandlerArray_setFirstHandlerArg( handlers, &ha, OTF_LEAVE_RECORD ); - * \endcode - * - * Read definitions ( .def files). - * Inside this function the defProcess and defFunction handler will be called. - * \code - * OTF_Reader_readDefinitions( reader, handlers ); - * \endcode - * - * Set the record limit to zero and read the events once. - * This initializes internal datastructures needed for getting the reading progress. - * \code - * OTF_Reader_setRecordLimit( reader, 0 ); - * OTF_Reader_readEvents( reader, handlers ); - * \endcode - * - * To leave OTF_Reader_readEvents() once in a while, in order to update the progress, - * set the record limit to an appropriate number. 100000 in this case. - * - * \code - * OTF_Reader_setRecordLimit( reader, 100000 ); - * \endcode - * - * Read the trace until no records are left. - * \code - * while ( 0 != ( ret= OTF_Reader_readEvents( reader, handlers ) ) ) { - * \endcode - * - * If an error occurs, leave the program. - * \code - * if( OTF_READ_ERROR == ret ) { - * fprintf( stderr, "Error while reading events. Aborting\n" ); - * - * OTF_Reader_close( reader ); - * OTF_HandlerArray_close( handlers ); - * OTF_FileManager_close( manager ); - * - * exit(1); - * } - * - * \endcode - * Update the progress. - * \code - * OTF_Reader_eventBytesProgress( reader, &minbytes, &curbytes, &maxbytes ); - * printf( "%llub / %llub\n", (long long unsigned)(curbytes - minbytes), (long long unsigned)(maxbytes-minbytes) ); - * \endcode - * - * \code - * } - * \endcode - * Print out the gathered count of occurences of the four record types. - * \code - * printf( "count: %llu\n", (long long unsigned) ha.count ); - * \endcode - * - * Finish everything - * \code - * OTF_Reader_close( reader ); - * OTF_HandlerArray_close( handlers ); - * OTF_FileManager_close( manager ); - * - * return 0; - * } - * \endcode - * Compile and link this using $ gcc -o test test.c `otfconfig --libs`. - * - * When executing this test the output will be something like this: - * \verbatim - * 4194304b / 73530754b - * [..] - * 73530754b / 73530754b - * count: 4582694 \endverbatim - * - */ - -/** reader object \ingroup reader */ -typedef struct struct_OTF_Reader OTF_Reader; - - -/** - * Open a MasterControl file and return a OTF_Reader. - * - * @param namestub File name prefix which is going to be used by - * all sub-files which belong to the trace. - * @param fileManager File handle manager. - * - * @return Initialized OTF_Reader instance or 0 if a failure - * occurred. - * - * \ingroup reader - */ -OTF_Reader* OTF_Reader_open( const char* namestub, OTF_FileManager* manager ); - -/** - * Set the default buffer size for all buffers managed by this Reader. - * This is only effective for future buffers and will not change already - * allocated buffers. Those can be changed with the buffers directly. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param size Intended buffer size. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup reader - */ -int OTF_Reader_setBufferSizes( OTF_Reader* reader, uint32_t size ); - -/** - * Get the default buffer size. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * - * @return Default buffer size. - * - * \ingroup reader - */ -uint32_t OTF_Reader_getBufferSizes( OTF_Reader* reader ); - -/** - * Set the default zbuffer size for all buffers managed by this Reader. - * This is only effective for future files and will not change already - * allocated zbuffers. Those can be changed with the files directly. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * - * @param size Intended zbuffer size. - * - * \ingroup reader - */ -void OTF_Reader_setZBufferSizes( OTF_Reader* reader, uint32_t size ); - -/** - * Get the default zbuffer size. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * - * @return zbuffer size. - * - * \ingroup reader - */ -uint32_t OTF_Reader_getZBufferSizes( OTF_Reader* reader ); - -/** - * Get a pointer to the mastercontrol of the reader - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * - * @return Pointer to the mastercontrol. - * - * \ingroup reader - */ -OTF_MasterControl* OTF_Reader_getMasterControl( OTF_Reader* reader ); - -/** - * Close an OTF_Reader instance and all its related files. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * - * @return 1 if instance was closed successfully and 0 otherwise. - * - * \ingroup reader - */ -int OTF_Reader_close( OTF_Reader* reader ); - -/** - * This function reads all definitions from trace. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param handlers Pointer to the handler array. - * - * @return number of records successfully read or OTF_READ_ERROR - * - * \ingroup reader - */ -uint64_t OTF_Reader_readDefinitions( OTF_Reader* reader, OTF_HandlerArray* handlers ); - -/** - * This function reads all events from trace and calls the appropriate - * handler sorted by time - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param handlers Pointer to the handler array. - * - * @return number of records successfully read or OTF_READ_ERROR - * - * \ingroup reader - */ -uint64_t OTF_Reader_readEvents( OTF_Reader* reader, OTF_HandlerArray* handlers ); - -/** - * This function reads all events from trace and calls the appropriate handler - * NOT sorted by time. - * It calls every handler in ONE stream sorted by time. - * And walks through the streams one by one. - * ( So the handlers of one process will be called, sorted by time, too ) - * - * This function is faster than OTF_Reader_readEvents(), especially for - * a bigger number of streams - * - * @see OTF_Reader_readEvents() - * - * \ingroup reader - */ -uint64_t OTF_Reader_readEventsUnsorted( OTF_Reader* reader, OTF_HandlerArray* handlers ); - -/** - * This function reads all snapshots from trace - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param handlers Pointer to the handler array. - * - * @return number of records successfully read or OTF_READ_ERROR - * - * \ingroup reader - */ -uint64_t OTF_Reader_readSnapshots( OTF_Reader* reader, OTF_HandlerArray* handlers ); - -/** - * This function reads all snapshots from trace and calls the appropriate handler - * NOT sorted by time. - * It calls every handler in ONE stream sorted by time. - * And it walks through the streams one by one. - * ( So the handlers of one process will be called, sorted by time, too ) - * - * This function is faster than OTF_Reader_readSnapshots(), especially for - * a bigger number of streams - * - * @see OTF_Reader_readSnapshots() - * - * \ingroup reader - */ -uint64_t OTF_Reader_readSnapshotsUnsorted( OTF_Reader* reader, OTF_HandlerArray* handlers ); - -/** - * This function reads all statistic records from trace - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param handlers Pointer to the handler array. - * - * @return number of records successfully read or OTF_READ_ERROR - * - * \ingroup reader - */ -uint64_t OTF_Reader_readStatistics( OTF_Reader* reader, OTF_HandlerArray* handlers ); - -/** - * This function reads all statistics from trace and calls the appropriate handler - * NOT sorted by time. - * It calls every handler in ONE stream sorted by time. - * And it walks through the streams one by one. - * ( So the handlers of one process will be called, sorted by time, too ) - * - * This function is faster than OTF_Reader_readStatistics(), especially for - * a bigger number of streams - * - * @see OTF_Reader_readStatistics() - * - * \ingroup reader - */ -uint64_t OTF_Reader_readStatisticsUnsorted( OTF_Reader* reader, OTF_HandlerArray* handlers ); - -/** - * This function reads all markers from trace. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param handlers Pointer to the handler array. - * - * @return number of records successfully read or OTF_READ_ERROR - * - * \ingroup reader - */ -uint64_t OTF_Reader_readMarkers( OTF_Reader* reader, OTF_HandlerArray* handlers ); - -/** - * Searchs a reader stream and returns it. - * If the stream does not exist it will be created. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param id Identifier of the stream searched. - * - * @return Initialised OTF_RStream object. - * - * \ingroup reader - */ -OTF_RStream* OTF_Reader_getStream( OTF_Reader* reader, uint32_t id ); - -/** disable given process. deprecated, use 'OTF_Reader_setProcessStatus()' instead. - -This funktion will destroy a pending read operation, i.e. a read operation -currently interrupted cannot be continued! -\ingroup reader */ -int OTF_Reader_disableProcess( OTF_Reader* reader, uint32_t processId ); - -/** enable given process. deprecated, use 'OTF_Reader_setProcessStatus()' instead. - -This funktion will destroy a pending read operation, i.e. a read operation -currently interrupted cannot be continued! -\ingroup reader */ -int OTF_Reader_enableProcess( OTF_Reader* reader, uint32_t processId ); - - -/** - * Returns the current process status - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param processId Identifier of the process to get the status from - * - * @return Current process status. '1' for enabled, '0' for disabled - * or unknown. - * - * \ingroup reader - */ -uint8_t OTF_Reader_getProcessStatus( OTF_Reader* reader, uint32_t processId ); - - -/** - * Sets the current status of the process. This function will destroy a pending - * read operation, i.e. a read operation currently interrupted cannot be - * continued! - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param processId Identifier of the process. - * @param status new status of the process. '1' for enabled, '0' - * for disabled or unknown. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup reader - */ -int OTF_Reader_setProcessStatus( OTF_Reader* reader, uint32_t processId, - uint8_t status ); - -/** - * Sets the status for all processes with a single call. This function will - * destroy a pending read operation, i.e. a read operation currently - * interrupted cannot be continued! - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param status new status of the process. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup reader - */ -int OTF_Reader_setProcessStatusAll( OTF_Reader* reader, uint8_t status ); - - -/** - * Set the minimum time and the maximum time of the reader. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param minTime minimum to read records - * @param maxTime maximum time to read records - * - * \ingroup reader - */ -void OTF_Reader_setTimeInterval( OTF_Reader* reader, uint64_t minTime, - uint64_t maxTime ); - - -/** - * Returns the begin of current time interval. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * - * \ingroup reader - */ -uint64_t OTF_Reader_getTimeIntervalMin( OTF_Reader* reader ); - - -/** - * Returns end of current time interval. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * - * \ingroup reader - */ -uint64_t OTF_Reader_getTimeIntervalMax( OTF_Reader* reader ); - - -/** - * Set the maximum number of records delivered by a single call to - * OTF_Reader_readXYZ(). Defaults to OTF_READ_MAXRECORDS == \infty. - * 'OTF_Reader_readXYZ()' returns with the number of records processed. - * Successive calls to 'OTF_Reader_readXYZ()' will deliver the remaining - * records. This funktion will NOT destroy a pending read operation, i.e. a - * read operation currently interrupted CAN be continued! - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param limit record limit. has to be smaller than or equal to - * OTF_READ_MAXRECORDS - * - * \ingroup reader - */ -void OTF_Reader_setRecordLimit( OTF_Reader* reader, uint64_t limit ); - - -/** - * Returns the current record limit. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * - * @return Current record limit. - * - * \ingroup reader - */ -uint64_t OTF_Reader_getRecordLimit( OTF_Reader* reader ); - -/** - * Resets all filters for timelimit, process selection and record count limit. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * - * \ingroup reader - */ -void OTF_Reader_reset( OTF_Reader* reader ); - -/** - * Closes all streams that are open in the reader. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup reader - */ -int OTF_Reader_closeAllStreams( OTF_Reader* reader ); - - -/** depricated. @see OTF_Reader_eventTimeProgress() */ -uint8_t OTF_Reader_eventProgress( OTF_Reader* reader, uint64_t* minimum, - uint64_t* current, uint64_t* maximum ); - -/** depricated. @see OTF_Reader_snapshotTimeProgress() */ -uint8_t OTF_Reader_snapshotProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ); - -/** depricated. @see OTF_Reader_statisticTimeProgress() */ -uint8_t OTF_Reader_statisticProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ); - - -/** - * Delivers a progress report for reading events. It is given in terms - * of time stamps. A percentage can be computed as - * ( current - minimum ) / ( maximum - minimum ). - * This computation takes restricted time intervals into account which is not - * possible with OTF_Reader_eventBytesProgress(). - * - * The progress report is only valid after one or several calls to - * OTF_Reader_readEvents(). Otherwise the return arguments 'minimum', 'current' - * and 'maximum' are undefined! - * If 'minimum' > 'maximum' the values are invalid. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param minimum Return value for the minium time. - * @param current Return value for the current time. - * @param maximum Return value for the maximum time. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup reader - */ -uint8_t OTF_Reader_eventTimeProgress( OTF_Reader* reader, uint64_t* minimum, - uint64_t* current, uint64_t* maximum ); - - -/** - * Delivers a progress report for reading snapshots. It is given in terms - * of time stamps. A percentage can be computed as - * ( current - minimum ) / ( maximum - minimum ). - * This computation takes restricted time intervals into account which is not - * possible with OTF_Reader_snapshotBytesProgress(). - * - * The progress report is only valid after one or several calls to - * OTF_Reader_readSnapshots(). Otherwise the return arguments 'minimum', 'current' - * and 'maximum' are undefined! - * If 'minimum' > 'maximum' the values are invalid. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param minimum Return value for the minium time. - * @param current Return value for the current time. - * @param maximum Return value for the maximum time. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup reader - */ -uint8_t OTF_Reader_snapshotTimeProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ); - - -/** - * Delivers a progress report for reading statistics. It is given in terms - * of time stamps. A percentage can be computed as - * ( current - minimum ) / ( maximum - minimum ). - * This computation takes restricted time intervals into account which is not - * possible with OTF_Reader_statisticBytesProgress(). - * - * The progress report is only valid after one or several calls to - * OTF_Reader_readStatistics(). Otherwise the return arguments 'minimum', 'current' - * and 'maximum' are undefined! - * If 'minimum' > 'maximum' the values are invalid. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param minimum Return value for the minium time. - * @param current Return value for the current time. - * @param maximum Return value for the maximum time. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup reader - */ -uint8_t OTF_Reader_statisticTimeProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ); - - -/** - * Delivers a progress report for reading events. Progress is given in terms - * of bytes. The percentage can be computed as ( current - minimum ) / ( maximum - minimum ). - * - * ATTENTION: This is only a rough estimate of the progress, because it is - * computed based on the block I/O from files but not based on the actual bytes - * processed. This may result in constant values for small traces. - * See also OTF_Reader_eventTimeProgress(): - * - * This computation takes the read bytes of every active stream into account. - * The progress report is only valid after one or several calls to - * OTF_Reader_readEvents(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are - * undefined! If 'minimum' > 'maximum' the values are invalid. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param minimum Return value for the minium bytes read ( is 0 everytime ). - * @param current Return value for the current bytes read. - * @param maximum Return value for the filesize. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup reader - */ -uint8_t OTF_Reader_eventBytesProgress( OTF_Reader* reader, uint64_t* minimum, - uint64_t* current, uint64_t* maximum ); - - -/** - * Delivers a progress report for reading snapshots. Progress is given in terms - * of bytes. The percentage can be computed as ( current - minimum ) / ( maximum - minimum ). - * - * ATTENTION: This is only a rough estimate of the progress, because it is - * computed based on the block I/O from files but not based on the actual bytes - * processed. This may result in constant values for small traces. - * See also OTF_Reader_snapshotTimeProgress(): - * - * This computation takes the read bytes of every active stream into account. - * The progress report is only valid after one or several calls to - * OTF_Reader_readSnapshots(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are - * undefined! If 'minimum' > 'maximum' the values are invalid. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param minimum Return value for the minium bytes read ( is 0 everytime ). - * @param current Return value for the current bytes read. - * @param maximum Return value for the filesize. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup reader - */ -uint8_t OTF_Reader_snapshotBytesProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ); - -/** - * Delivers a progress report for reading statistics. Progress is given in terms - * of bytes. The percentage can be computed as ( current - minimum ) / ( maximum - minimum ). - * - * ATTENTION: This is only a rough estimate of the progress, because it is - * computed based on the block I/O from files but not based on the actual bytes - * processed. This may result in constant values for small traces. - * See also OTF_Reader_statisticTimeProgress(): - * - * This computation takes the read bytes of every active stream into account. - * The progress report is only valid after one or several calls to - * OTF_Reader_readStatistics(). Otherwise the return arguments 'minimum', 'current' and 'maximum' are - * undefined! If 'minimum' > 'maximum' the values are invalid. - * - * @param reader Pointer to an initialized OTF_Reader object. See - * also OTF_Reader_open(). - * @param minimum Return value for the minium bytes read ( is 0 everytime ). - * @param current Return value for the current bytes read. - * @param maximum Return value for the filesize. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup reader - */ -uint8_t OTF_Reader_statisticBytesProgress( OTF_Reader* reader, - uint64_t* minimum, uint64_t* current, uint64_t* maximum ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_READER_H */ diff --git a/externals/otf/otflib/OTF_Version.h b/externals/otf/otflib/OTF_Version.h deleted file mode 100644 index f5cf0e962baedb7f78d3c21c3f64b9b96c530efc..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Version.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_Version.h - * - * @brief Provides version information. - * - * \ingroup misc - */ - - -#ifndef OTF_VERSION_H -#define OTF_VERSION_H - - -#define OTF_VERSION_MAJOR 1 -#define OTF_VERSION_MINOR 7 -#define OTF_VERSION_SUB 0 -#define OTF_VERSION_STRING "catfish" - -/** - * Because of a typo, we need to keep this for backward compatibility - * \ingroup internal - */ -#define OTF_VERSION_MAYOR OTF_VERSION_MAJOR - - -#endif /* OTF_VERSION_H */ diff --git a/externals/otf/otflib/OTF_WBuffer.c b/externals/otf/otflib/OTF_WBuffer.c deleted file mode 100644 index 4b8ac99b750a9a6e37f7efe6f3947b72b73dd448..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_WBuffer.c +++ /dev/null @@ -1,865 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#include "OTF_Platform.h" -#include "OTF_WBuffer.h" -#include "OTF_Errno.h" - -#include "OTF_Keywords.h" - - -/** constructor - internal use only */ -int OTF_WBuffer_init( OTF_WBuffer* wbuffer ); - -/** destructor - internal use only */ -int OTF_WBuffer_finish( OTF_WBuffer* wbuffer ); - -/* ************************************************************************** */ - - -int OTF_WBuffer_init( OTF_WBuffer* wbuffer ) { - - - wbuffer->file= NULL; - - /* buffer is allocated on demand */ - wbuffer->buffer = NULL; - wbuffer->size = 0; - wbuffer->pos = 0; - - wbuffer->process = (uint32_t) -1; - wbuffer->time = 0; - -#ifdef HAVE_ZLIB - wbuffer->zbuffersize= 1024*10; -#endif /* HAVE_ZLIB */ - - return 1; -} - - -int OTF_WBuffer_finish( OTF_WBuffer* wbuffer ) { - - - /* buffer shall be empty now */ - if( 0 != wbuffer->pos ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer is not empty (but is supposed to).\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - free( wbuffer->buffer ); - wbuffer->buffer= NULL; - - return 1; -} - - -OTF_WBuffer* OTF_WBuffer_open( const char* filename, OTF_FileManager* manager ) { - - - /* choose standard compression */ - return OTF_WBuffer_open_zlevel( filename, manager, OTF_FILECOMPRESSION_COMPRESSED ); -} - - -int OTF_WBuffer_close( OTF_WBuffer* wbuffer ) { - - -# ifndef OTF_DEBUG - int ret= OTF_WBuffer_flush( wbuffer ); - - ret&= OTF_File_close( wbuffer->file ); - - ret&= OTF_WBuffer_finish( wbuffer ); - -# else - int ret= 1; - int tmpret= OTF_WBuffer_flush( wbuffer ); - if( 0 == tmpret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_flush() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - ret&= tmpret; - - tmpret= OTF_File_close( wbuffer->file ); - if( 0 == tmpret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_File_close() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - ret&= tmpret; - - tmpret= OTF_WBuffer_finish( wbuffer ); - if( 0 == tmpret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_finish() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - ret&= tmpret; - -# endif - - free( wbuffer ); - wbuffer = NULL; - - return ret; -} - - -int OTF_WBuffer_setSize( OTF_WBuffer* wbuffer, size_t size ) { - - - if ( size < wbuffer->size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "cannot shrink buffer from %u to %u.\n", - __FUNCTION__, __FILE__, __LINE__, (uint32_t) wbuffer->size, - (uint32_t) size ); - - return 0; - } - - wbuffer->buffer= (char*) realloc( wbuffer->buffer, - size * sizeof(char) ); - if( NULL == wbuffer->buffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - wbuffer->size= (uint32_t) size; - - return 1; -} - - -void OTF_WBuffer_setZBufferSize( OTF_WBuffer* wbuffer, uint32_t size ) { - - -#ifdef HAVE_ZLIB - - if ( 32 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "intended zbuffer size %u is too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - return; - - } else if ( 512 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "zbuffer size %u is very small, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } else if ( 10 * 1024 *1024 < size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "zbuffer size %u is rather big, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - } - - wbuffer->zbuffersize= size; - - if( NULL != wbuffer->file ) { - OTF_File_setZBufferSize( wbuffer->file, wbuffer->zbuffersize ); - } -#endif /* HAVE_ZLIB */ - -} - - -int OTF_WBuffer_flush( OTF_WBuffer* wbuffer ) { - - - int retval= 1; - size_t ret; - - - ret= OTF_File_write( wbuffer->file, wbuffer->buffer, wbuffer->pos ); - if( ret != wbuffer->pos ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_File_write() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - retval= 0; - } - - wbuffer->pos= 0; - - return retval; -} - - -int OTF_WBuffer_guarantee( OTF_WBuffer* wbuffer, size_t space ) { - - - if ( wbuffer->pos + space <= wbuffer->size ) { - - return 1; - } - - /* not enough space available */ - - if ( space > wbuffer->size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "requested %u bytes > buffer size %u.\n", - __FUNCTION__, __FILE__, __LINE__, - (uint32_t) space, wbuffer->size ); - - return 0; - } - - if( 0 == OTF_WBuffer_flush( wbuffer ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_flush() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - return 1; -} - - -int OTF_WBuffer_setTimeAndProcess( OTF_WBuffer* wbuffer, - uint64_t t, uint32_t p ) { - - - /* write timestamp 0 always in order to generate a valid time stamp - at the very beginning of every stream */ - if ( ( t == wbuffer->time ) && ( 0 < t ) ) { - - if ( p == wbuffer->process ) { - - return 1; - } - - OTF_WBuffer_writeChar( wbuffer, '*' ); - OTF_WBuffer_writeUint32( wbuffer, p ); - OTF_WBuffer_writeNewline( wbuffer ); - - wbuffer->process = p; - - return 1; - } - - - /* time must be strictly monotonous increasing or 0 (see above), - the '==' case is already catched above and must not happen here */ - if ( ( t > wbuffer->time ) || ( 0 == t ) ) { - - OTF_WBuffer_writeUint64( wbuffer, t ); - OTF_WBuffer_writeNewline( wbuffer ); - - OTF_WBuffer_writeChar( wbuffer, '*' ); - OTF_WBuffer_writeUint32( wbuffer, p ); - OTF_WBuffer_writeNewline( wbuffer ); - - wbuffer->time = t; - wbuffer->process = p; - - return 1; - - } else { - - /* print error message only once per buffer. - there should be _no_ way to avoid this error message! */ - if ( ( (uint64_t) -1 ) != wbuffer->time ) { - - OTF_fprintf( stderr, "OTF ERROR in function %s, file: %s, line: %i:\n " - "time not increasing. (t= %llu, p= %u)\n", - __FUNCTION__, __FILE__, __LINE__, - (unsigned long long int) t, (unsigned int) p ); - - /* write comment to the end of the stream */ - OTF_WBuffer_writeKeyword( wbuffer, "#" ); - OTF_WBuffer_writeString( wbuffer, "error due to unsorted time stamp, aborted" ); - OTF_WBuffer_writeNewline( wbuffer ); - - /* disable the buffer for future use, don't repeat the error message*/ - wbuffer->time = (uint64_t) -1; - } - - return 0; - } -} - - -uint32_t OTF_WBuffer_writeKeyword( OTF_WBuffer* wbuffer, - const char* keyword ) { - - - uint32_t i; - uint32_t l= (uint32_t) strlen( keyword ); - - int ret= OTF_WBuffer_guarantee( wbuffer, l ); - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_guarantee() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - i= 0; - while ( i < l ) { - - wbuffer->buffer[ wbuffer->pos +i ]= keyword[i]; - i++; - } - - wbuffer->pos += l; - - return l; -} - - -uint32_t OTF_WBuffer_writeString( OTF_WBuffer* wbuffer, const char* string ) { - - - uint32_t i; - uint32_t l= (uint32_t) (( NULL != string ) ? strlen( string ) : 0); - - if( 0 == OTF_WBuffer_guarantee( wbuffer, l+2 ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_guarantee() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - - wbuffer->buffer[ wbuffer->pos ] = '"'; - ++wbuffer->pos; - - i = 0; - while ( i < l ) { - - if ( ( '\n' != string[i] ) && ( '"' != string[i] ) ) { - - wbuffer->buffer[ wbuffer->pos +i ]= string[i]; - - } else { - - wbuffer->buffer[ wbuffer->pos +i ]= ' '; - } - - i++; - } - - wbuffer->pos += l; - - wbuffer->buffer[ wbuffer->pos ] = '"'; - ++wbuffer->pos; - - return l; -} - - -uint32_t OTF_WBuffer_writeChar( OTF_WBuffer* wbuffer, const char character ) { - - - if( 0 == OTF_WBuffer_guarantee( wbuffer, 1 ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_guarantee() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - - wbuffer->buffer[ wbuffer->pos ]= character; - - wbuffer->pos++; - - return 1; -} - - -uint32_t OTF_WBuffer_writeUint8( OTF_WBuffer* wbuffer, uint8_t value ) { - - - static char dig[16] = { '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; - - uint32_t l= 0; - int s= 4; - uint32_t v= 0; - char* p = NULL; - - - /* at max 2 digits will be written */ - if( 0 == OTF_WBuffer_guarantee( wbuffer, 2 ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_guarantee() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - - p= wbuffer->buffer + wbuffer->pos; - - /* skip leading zeros */ - while ( ( 0 == v ) && ( s >= 0 ) ) { - - v= ( value >> s ) & 0xf ; - s -= 4; - } - - p[l++]= dig[v]; - - while ( s >= 0 ) { - - v= ( value >> s ) & 0xf ; - s -= 4; - - p[l++]= dig[v]; - } - - wbuffer->pos += l; - - return l; -} - - -uint32_t OTF_WBuffer_writeUint16( OTF_WBuffer* wbuffer, uint16_t value ) { - - - static char dig[16] = { '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; - - uint32_t l= 0; - int s= 12; - uint32_t v= 0; - char* p = NULL; - - - /* at max 4 digits will be written */ - if( 0 == OTF_WBuffer_guarantee( wbuffer, 4 ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_guarantee() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - - p= wbuffer->buffer + wbuffer->pos; - - /* skip leading zeros */ - while ( ( 0 == v ) && ( s >= 0 ) ) { - - v= ( value >> s ) & 0xf ; - s -= 4; - } - - p[l++]= dig[v]; - - while ( s >= 0 ) { - - v= ( value >> s ) & 0xf ; - s -= 4; - - p[l++]= dig[v]; - } - - wbuffer->pos += l; - - return l; -} - - -uint32_t OTF_WBuffer_writeUint32( OTF_WBuffer* wbuffer, uint32_t value ) { - - - static char dig[16] = { '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; - - uint32_t l= 0; - int s= 28; - uint32_t v= 0; - char* p = NULL; - - /* at max 8 digits will be written */ - if( 0 == OTF_WBuffer_guarantee( wbuffer, 8 ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_guarantee() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - - p= wbuffer->buffer + wbuffer->pos; - - /* skip leading zeros */ - while ( ( 0 == v ) && ( s >= 0 ) ) { - - v= ( value >> s ) & 0xf ; - s -= 4; - } - - p[l++]= dig[v]; - - while ( s >= 0 ) { - - v= ( value >> s ) & 0xf ; - s -= 4; - - p[l++]= dig[v]; - } - - wbuffer->pos += l; - - return l; -} - - -uint32_t OTF_WBuffer_writeUint64( OTF_WBuffer* wbuffer, uint64_t value ) { - - - static char dig[16] = { '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; - - uint32_t l= 0; - int s= 60; - uint32_t v= 0; - char* p = NULL; - - /* at max 16 digits will be written */ - if( 0 == OTF_WBuffer_guarantee( wbuffer, 16 ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_guarantee() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - - p= wbuffer->buffer + wbuffer->pos; - - /* skip leading zeros */ - while ( ( 0 == v ) && ( s >= 0 ) ) { - - v= (uint32_t) (( value >> s ) & 0xf) ; - s -= 4; - } - - p[l++]= dig[v]; - - while ( s >= 0 ) { - - v= (uint32_t) (( value >> s ) & 0xf) ; - s -= 4; - - p[l++]= dig[v]; - } - - wbuffer->pos += l; - - return l; -} - - -uint32_t OTF_WBuffer_writeNewline( OTF_WBuffer* wbuffer ) { - - - if( 0 == OTF_WBuffer_guarantee( wbuffer, 1 ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_guarantee() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - - wbuffer->buffer[ wbuffer->pos ] = '\n'; - ++wbuffer->pos; - - return 1; -} - -uint32_t OTF_WBuffer_writeBytes( OTF_WBuffer* wbuffer, const uint8_t *value, uint8_t len) { - - static char dig[16] = { '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; - - uint32_t l= 0; - char v; - char* p = NULL; - uint32_t i; - - /* at max 2 * len digits will be written */ - if( 0 == OTF_WBuffer_guarantee( wbuffer, len*2 ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_guarantee() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - - p= wbuffer->buffer + wbuffer->pos; - - for( i=0; i<len; i++) { - v = value[i]; - p[l+1] = dig[v & 0xF]; - v >>= 4; - p[l] = dig[v & 0xF]; - l += 2; - - wbuffer->pos += 2; - - } - - return len*2; -} - - -uint32_t OTF_WBuffer_writeKeyValueList_short(OTF_WBuffer* buffer, OTF_KeyValueList *list ) { - - OTF_KeyValuePairList *p; - uint32_t i; - uint32_t written = 0; - - - if ( list == NULL) { - return 0; - } - - p = list->kvBegin; - - for( i = 0; i < list->count; i++ ) { - - written += OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_KEYVALUE_PREFIX ); - - written += OTF_WBuffer_writeUint32( buffer, p->kvPair.key ); - - written += OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_LOCAL_TYPE ); - - written += OTF_WBuffer_writeUint32( buffer, p->kvPair.type ); - - written += OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_LOCAL_VALUE ); - - switch (p->kvPair.type) { - case OTF_CHAR: - written += OTF_WBuffer_writeUint8( buffer, (uint8_t) p->kvPair.value.otf_char ); - break; - case OTF_INT8: - written += OTF_WBuffer_writeUint8( buffer, p->kvPair.value.otf_int8 ); - break; - case OTF_UINT8: - written += OTF_WBuffer_writeUint8( buffer, p->kvPair.value.otf_uint8 ); - break; - case OTF_INT16: - written += OTF_WBuffer_writeUint16( buffer, p->kvPair.value.otf_int16 ); - break; - case OTF_UINT16: - written += OTF_WBuffer_writeUint16( buffer, p->kvPair.value.otf_uint16 ); - break; - case OTF_INT32: - written += OTF_WBuffer_writeUint32( buffer, p->kvPair.value.otf_int32 ); - break; - case OTF_UINT32: - written += OTF_WBuffer_writeUint32( buffer, p->kvPair.value.otf_uint32 ); - break; - case OTF_INT64: - written += OTF_WBuffer_writeUint64( buffer, p->kvPair.value.otf_int64 ); - break; - case OTF_UINT64: - written += OTF_WBuffer_writeUint64( buffer, p->kvPair.value.otf_uint64 ); - break; - case OTF_DOUBLE: - written += OTF_WBuffer_writeUint64( buffer, OTF_DoubleToInt64(p->kvPair.value.otf_double) ); - break; - case OTF_FLOAT: - written += OTF_WBuffer_writeUint32( buffer, OTF_FloatToInt32(p->kvPair.value.otf_float) ); - break; - case OTF_BYTE_ARRAY: - written += OTF_WBuffer_writeBytes( buffer, p->kvPair.value.otf_byte_array.array, p->kvPair.value.otf_byte_array.len ); - break; - default: - /* wrong type */ - written += OTF_WBuffer_writeNewline( buffer ); - return written; - } - - written += OTF_WBuffer_writeNewline( buffer ); - - p = p->kvNext; - } - - OTF_KeyValueList_reset(list); - - return written; -} - - -uint32_t OTF_WBuffer_writeKeyValueList_long(OTF_WBuffer* buffer, OTF_KeyValueList *list ) { - - OTF_KeyValuePairList *p; - uint32_t i; - uint32_t written = 0; - - - if ( list == NULL) { - return 0; - } - - p = list->kvBegin; - - for( i = 0; i < list->count; i++ ) { - - written += OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_KEYVALUE_PREFIX " " ); - - written += OTF_WBuffer_writeUint32( buffer, p->kvPair.key ); - - written += OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_TYPE " " ); - - written += OTF_WBuffer_writeUint32( buffer, p->kvPair.type ); - - written += OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_VALUE " " ); - - switch (p->kvPair.type) { - case OTF_CHAR: - written += OTF_WBuffer_writeUint8( buffer, (uint8_t) p->kvPair.value.otf_char ); - break; - case OTF_INT8: - written += OTF_WBuffer_writeUint8( buffer, p->kvPair.value.otf_int8 ); - break; - case OTF_UINT8: - written += OTF_WBuffer_writeUint8( buffer, p->kvPair.value.otf_uint8 ); - break; - case OTF_INT16: - written += OTF_WBuffer_writeUint16( buffer, p->kvPair.value.otf_int16 ); - break; - case OTF_UINT16: - written += OTF_WBuffer_writeUint16( buffer, p->kvPair.value.otf_uint16 ); - break; - case OTF_INT32: - written += OTF_WBuffer_writeUint32( buffer, p->kvPair.value.otf_int32 ); - break; - case OTF_UINT32: - written += OTF_WBuffer_writeUint32( buffer, p->kvPair.value.otf_uint32 ); - break; - case OTF_INT64: - written += OTF_WBuffer_writeUint64( buffer, p->kvPair.value.otf_int64 ); - break; - case OTF_UINT64: - written += OTF_WBuffer_writeUint64( buffer, p->kvPair.value.otf_uint64 ); - break; - case OTF_DOUBLE: - written += OTF_WBuffer_writeUint64( buffer, OTF_DoubleToInt64(p->kvPair.value.otf_double) ); - break; - case OTF_FLOAT: - written += OTF_WBuffer_writeUint32( buffer, OTF_FloatToInt32(p->kvPair.value.otf_float) ); - break; - case OTF_BYTE_ARRAY: - written += OTF_WBuffer_writeBytes( buffer, p->kvPair.value.otf_byte_array.array, p->kvPair.value.otf_byte_array.len ); - break; - default: - /* wrong type */ - written += OTF_WBuffer_writeNewline( buffer ); - return written; - } - - written += OTF_WBuffer_writeNewline( buffer ); - - p = p->kvNext; - } - - OTF_KeyValueList_reset(list); - - return written; -} - - -OTF_WBuffer* OTF_WBuffer_open_zlevel( const char* filename, - OTF_FileManager* manager, OTF_FileCompression compression ) { - - - - OTF_WBuffer* ret= (OTF_WBuffer*) malloc( sizeof(OTF_WBuffer) ); - if( NULL == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - OTF_WBuffer_init( ret ); - - if( NULL == manager ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "manager has not been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( ret ); - ret= NULL; - - return NULL; - } - ret->file= OTF_File_open_zlevel( filename, manager, OTF_FILEMODE_WRITE, compression ); - if( NULL == ret->file ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_File_open() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( ret ); - ret= NULL; - - return NULL; - } - -#ifdef HAVE_ZLIB - OTF_File_setZBufferSize( ret->file, ret->zbuffersize ); -#endif /* HAVE_ZLIB */ - - return ret; - -} diff --git a/externals/otf/otflib/OTF_WBuffer.h b/externals/otf/otflib/OTF_WBuffer.h deleted file mode 100644 index 29ada78dad72cfa41a237f12ef9a0fd406aa95bb..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_WBuffer.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_WBuffer.h - * - * @brief Provides write access to trace buffers. - * - * \ingroup internal - */ - - -#ifndef OTF_WBUFFER_H -#define OTF_WBUFFER_H - - -#include <stdlib.h> -#include <stdio.h> - - -#include "OTF_inttypes.h" - - -#include "OTF_File.h" -#include "OTF_Filenames.h" - -#include "OTF_KeyValue.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct struct_OTF_WBuffer { - - - OTF_File* file; - - - /** Begin of the actual buffer. */ - char* buffer; - - /** Current size of buffer. */ - uint32_t size; - - /** Next write position in buffer. */ - uint32_t pos; - - /** Current process inside this file buffer, necessary for state - machine. This must not be part of OTF_WStream because there are - multiple buffers per stream that might be written in parallel. */ - uint32_t process; - - /** Current time inside this file buffer, necessary for state machine. - This must not be part of OTF_WStream because there are multiple - buffers per stream that might be written in parallel. */ - uint64_t time; - -#ifdef HAVE_ZLIB - /** Default size of zbuffers managed by this buffer. */ - uint32_t zbuffersize; -#endif /* HAVE_ZLIB */ -}; -typedef struct struct_OTF_WBuffer OTF_WBuffer; - - -/** Constructor - internal use only */ -OTF_WBuffer* OTF_WBuffer_open( const char* filename, OTF_FileManager* manager ); - -/** Destructor - internal use only */ -int OTF_WBuffer_close( OTF_WBuffer* wbuffer ); - -/** Set the size of the buffer. Cannot shrink buffer but only extend. */ -int OTF_WBuffer_setSize( OTF_WBuffer* wbuffer, size_t size ); - -/** Set the size of the zbuffer. */ -void OTF_WBuffer_setZBufferSize( OTF_WBuffer* wbuffer, uint32_t size ); - -/** Writes the buffer contents to 'file' and marks the buffer empty again. */ -int OTF_WBuffer_flush( OTF_WBuffer* wbuffer ); - -/** Ask the buffer to guarantee at least 'space' bytes at current writing - position before the next flush is necessary. Return 1 on success. */ -int OTF_WBuffer_guarantee( OTF_WBuffer* wbuffer, size_t space ); - - -/** Set process state machine to 'p' and time stamp state machine to 't'. - If 'p' is the current process and 't' is the current time stamp nothing - is done. If the process has changed a process record will be written. - If the time has changed the new time stamp and the current process will - be written. If 't' is lower than the current time stamp - it is regarded as an error. Return != 1 on success and 0 on error. */ -int OTF_WBuffer_setTimeAndProcess( OTF_WBuffer* wbuffer, - uint64_t t, uint32_t p ); - -/* *** basic write operations *** */ - -/** Append a key word to the write buffer. A key word is a string without - quotes. Buffer flush is done if necessary. Return the number of bytes - written. */ -uint32_t OTF_WBuffer_writeKeyword( OTF_WBuffer* wbuffer, const char* keyword ); - -/** Append a string to the write buffer. A string is surrounded by quotes. - Buffer flush is done if necessary. Return the number of bytes written. */ -uint32_t OTF_WBuffer_writeString( OTF_WBuffer* wbuffer, const char* string ); - -/** Append a char to the write buffer. Buffer flush is done if necessary. - Return the number of bytes written (=1). */ -uint32_t OTF_WBuffer_writeChar( OTF_WBuffer* wbuffer, const char character ); - -/** This function append an 8bit unsigned integer 'value' in hex format to - the write buffer. Buffer flush is done if necessary. The return value - is the number of written characters. */ -uint32_t OTF_WBuffer_writeUint8( OTF_WBuffer* wbuffer, uint8_t value ); - -/** This function append an 16bit unsigned integer 'value' in hex format to - the write buffer. Buffer flush is done if necessary. The return value - is the number of written characters. */ -uint32_t OTF_WBuffer_writeUint16( OTF_WBuffer* wbuffer, uint16_t value ); - -/** This function append an unsigned integer 'value' in hex format to - the write buffer. Buffer flush is done if necessary. The return value - is the number of written characters. */ -uint32_t OTF_WBuffer_writeUint32( OTF_WBuffer* wbuffer, uint32_t value ); - -/** This function append an 64bit unsigned integer 'value' in hex format to - the write buffer. Buffer flush is done if necessary. The return value - is the number of written characters. */ -uint32_t OTF_WBuffer_writeUint64( OTF_WBuffer* wbuffer, uint64_t value ); - -/** Append a newline character to the buffer. Buffer flush is done if - necessary. Return the number of bytes written. */ -uint32_t OTF_WBuffer_writeNewline( OTF_WBuffer* wbuffer ); - -/** This function append an byte array in hex format to - the write buffer. Buffer flush is done if necessary. The return value - is the number of written characters. */ -uint32_t OTF_WBuffer_writeBytes( OTF_WBuffer* wbuffer, const uint8_t *value, uint8_t len); - -/** Append a KeyValueList to the buffer (short format). Return the number of bytes written. */ -uint32_t OTF_WBuffer_writeKeyValueList_short(OTF_WBuffer* buffer, OTF_KeyValueList *list ); - -/** Append a KeyValueList to the buffer (long format). Return the number of bytes written. */ -uint32_t OTF_WBuffer_writeKeyValueList_long(OTF_WBuffer* buffer, OTF_KeyValueList *list ); - -/** internal use */ -OTF_WBuffer* OTF_WBuffer_open_zlevel( const char* filename, - OTF_FileManager* manager, OTF_FileCompression compression ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_WBUFFER_H */ - diff --git a/externals/otf/otflib/OTF_WStream.c b/externals/otf/otflib/OTF_WStream.c deleted file mode 100644 index 62fe5e47bd93fdf41660d1ef6b347380e92c6b65..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_WStream.c +++ /dev/null @@ -1,3922 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "OTF_Platform.h" -#include "OTF_Definitions.h" - -#include <string.h> -#include <stdio.h> - -#include "OTF_WStream.h" -#include "OTF_Platform.h" -#include "OTF_Filenames.h" - -#include "OTF_Keywords.h" -#include "OTF_Errno.h" - -/** constructor - internal use only */ -int OTF_WStream_init( OTF_WStream* wstream ); - -/** destructor - internal use only */ -int OTF_WStream_finish( OTF_WStream* wstream ); - -/** Write a DEFVERSION record to stream 'wstream'. */ -int OTF_WStream_writeDefVersion( OTF_WStream* wstream, uint8_t major, - uint8_t minor, uint8_t sub, const char* string ); - -/** Write a DEFVERSION record including an OTF_KeyValueList to stream 'wstream'. */ -int OTF_WStream_writeDefVersionKV( OTF_WStream* wstream, uint8_t major, - uint8_t minor, uint8_t sub, const char* string, OTF_KeyValueList* list ); - -/* ************************************************************************* */ - - -int OTF_WStream_init( OTF_WStream* wstream ) { - - - wstream->namestub= NULL; - wstream->id= (uint32_t) -1; - - wstream->format= OTF_WSTREAM_FORMAT_SHORT; - - wstream->defBuffer= NULL; - wstream->eventBuffer= NULL; - wstream->snapsBuffer= NULL; - wstream->statsBuffer= NULL; - wstream->markerBuffer= NULL; - -#ifdef HAVE_ZLIB - wstream->compression= 0; - wstream->zbuffersizes= 1024*10; -#endif /* HAVE_ZLIB */ - - wstream->buffersizes= 1024*1024; - - return 1; -} - - -int OTF_WStream_finish( OTF_WStream* wstream ) { - - - int ret= 1; -# ifdef OTF_DEBUG - int tmpret; -# endif - - free( wstream->namestub ); - wstream->namestub= NULL; - - wstream->id= (uint32_t) -1; - - - if ( NULL != wstream->defBuffer ) { - -# ifndef OTF_DEBUG - ret&= OTF_WBuffer_close( wstream->defBuffer ); -# else - tmpret= OTF_WBuffer_close( wstream->defBuffer ); - if( 0 == tmpret ) { - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_close() failed for the def buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - ret&= tmpret; -# endif - - wstream->defBuffer= NULL; - } - - if ( NULL != wstream->eventBuffer ) { - -# ifndef OTF_DEBUG - ret&= OTF_WBuffer_close( wstream->eventBuffer ); -# else - tmpret= OTF_WBuffer_close( wstream->eventBuffer ); - if( 0 == tmpret ) { - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_close() failed for the event buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - ret&= tmpret; -# endif - - wstream->eventBuffer= NULL; - } - - if ( NULL != wstream->snapsBuffer ) { - -# ifndef OTF_DEBUG - ret&= OTF_WBuffer_close( wstream->snapsBuffer ); -# else - tmpret= OTF_WBuffer_close( wstream->snapsBuffer ); - if( 0 == tmpret ) { - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_close() failed for the snapshots buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - ret&= tmpret; -# endif - - wstream->snapsBuffer= NULL; - } - - if ( NULL != wstream->statsBuffer ) { - -# ifndef OTF_DEBUG - ret&= OTF_WBuffer_close( wstream->statsBuffer ); -# else - tmpret= OTF_WBuffer_close( wstream->statsBuffer ); - if( 0 == tmpret ) { - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_close() failed for the statistics buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - ret&= tmpret; -# endif - - wstream->statsBuffer= NULL; - } - - if ( NULL != wstream->markerBuffer ) { - -# ifndef OTF_DEBUG - ret&= OTF_WBuffer_close( wstream->markerBuffer ); -# else - tmpret= OTF_WBuffer_close( wstream->markerBuffer ); - if( 0 == tmpret ) { - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_close() failed for the statistics buffer.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - ret&= tmpret; -# endif - - wstream->markerBuffer= NULL; - } - - return ret; -} - - -OTF_WStream* OTF_WStream_open( const char* namestub, uint32_t id, - OTF_FileManager* manager ) { - - - OTF_WStream* ret= NULL; - - if( NULL == manager ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "manager has not been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - ret= (OTF_WStream*) malloc( sizeof(OTF_WStream) ); - if( NULL == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - OTF_WStream_init( ret ); - - ret->namestub= strdup( namestub ); - ret->id= id; - ret->manager= manager; - - /* leave buffers allone, they are allocated on demand */ - - return ret; -} - - -int OTF_WStream_close( OTF_WStream* wstream ) { - - - int ret= 0; - - if ( NULL != wstream ) { - - ret= OTF_WStream_finish( wstream ); - if( 0 == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WStream_finish() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - - free( wstream ); - wstream = NULL; - } - - return ret; -} - - -int OTF_WStream_flush( OTF_WStream* wstream ) { - - - int retval= 1; - - if ( NULL != wstream->defBuffer ) { - - retval= retval & OTF_WBuffer_flush( wstream->defBuffer ); - } - - if ( NULL != wstream->eventBuffer ) { - - retval= retval & OTF_WBuffer_flush( wstream->eventBuffer ); - } - - if ( NULL != wstream->snapsBuffer ) { - - retval= retval & OTF_WBuffer_flush( wstream->snapsBuffer ); - } - - if ( NULL != wstream->statsBuffer ) { - - retval= retval & OTF_WBuffer_flush( wstream->statsBuffer ); - } - - if ( NULL != wstream->markerBuffer ) { - - retval= retval & OTF_WBuffer_flush( wstream->markerBuffer ); - } - - return retval; -} - - -OTF_WBuffer* OTF_WStream_getDefBuffer( OTF_WStream* wstream ) { - - - /* have filename allocated an freed in order to avoid problems with - pre-allocated buffer being too short */ - - - char* filename; - - - if ( NULL == wstream->defBuffer ) { - - - filename= OTF_getFilename( wstream->namestub, - wstream->id, OTF_FILETYPE_DEF, 0, NULL ); - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_getFilename() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - -#ifdef HAVE_ZLIB - if ( wstream->compression > 0 ) { - - filename = strcat( filename, ".z" ); - } -#endif /* HAVE_ZLIB */ - - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - wstream->defBuffer= OTF_WBuffer_open_zlevel( filename, wstream->manager, - wstream->compression ); - - if( NULL == wstream->defBuffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_open() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - -#ifdef HAVE_ZLIB - OTF_WBuffer_setZBufferSize( wstream->defBuffer, wstream->zbuffersizes ); -#endif /* HAVE_ZLIB */ - - free( filename ); - filename = NULL; - -# ifndef OTF_DEBUG - OTF_WBuffer_setSize( wstream->defBuffer, wstream->buffersizes ); -# else - if( 0 == OTF_WBuffer_setSize( wstream->defBuffer, - wstream->buffersizes ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_setSize() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - } - - return wstream->defBuffer; -} - - -OTF_WBuffer* OTF_WStream_getEventBuffer( OTF_WStream* wstream ) { - - - /* have filename allocated an freed in order to avoid problems with - pre-allocated buffer being too short */ - - - char* filename; - - - if ( NULL == wstream->eventBuffer ) { - - - filename= OTF_getFilename( wstream->namestub, - wstream->id, OTF_FILETYPE_EVENT, 0, NULL ); - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_getFilename() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - -#ifdef HAVE_ZLIB - if ( wstream->compression > 0 ) { - - filename = strcat( filename, ".z" ); - } -#endif /* HAVE_ZLIB */ - - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - wstream->eventBuffer= OTF_WBuffer_open_zlevel( filename, wstream->manager, - wstream->compression ); - - if( NULL == wstream->eventBuffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_open() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - -#ifdef HAVE_ZLIB - OTF_WBuffer_setZBufferSize( wstream->eventBuffer, wstream->zbuffersizes ); -#endif /* HAVE_ZLIB */ - - free( filename ); - filename = NULL; - -# ifndef OTF_DEBUG - OTF_WBuffer_setSize( wstream->eventBuffer, wstream->buffersizes ); -# else - if( 0 == OTF_WBuffer_setSize( wstream->eventBuffer, - wstream->buffersizes ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_setSize() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - } - - return wstream->eventBuffer; -} - - -OTF_WBuffer* OTF_WStream_getSnapshotBuffer( OTF_WStream* wstream ) { - - - /* have filename allocated an freed in order to avoid problems with - pre-allocated buffer being too short */ - - - char* filename; - - - if ( NULL == wstream->snapsBuffer ) { - - - filename= OTF_getFilename( wstream->namestub, - wstream->id, OTF_FILETYPE_SNAPS, 0, NULL ); - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_getFilename() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - -#ifdef HAVE_ZLIB - if ( wstream->compression > 0) { - - filename = strcat( filename, ".z" ); - } -#endif /* HAVE_ZLIB */ - - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - wstream->snapsBuffer= OTF_WBuffer_open_zlevel( filename, wstream->manager, - wstream->compression ); - if( NULL == wstream->snapsBuffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_open() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - -#ifdef HAVE_ZLIB - OTF_WBuffer_setZBufferSize( wstream->snapsBuffer, wstream->zbuffersizes ); -#endif /* HAVE_ZLIB */ - - free( filename ); - filename = NULL; - -# ifndef OTF_DEBUG - OTF_WBuffer_setSize( wstream->snapsBuffer, wstream->buffersizes ); -# else - if( 0 == OTF_WBuffer_setSize( wstream->snapsBuffer, - wstream->buffersizes ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_setSize() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - } - - return wstream->snapsBuffer; -} - - -OTF_WBuffer* OTF_WStream_getStatsBuffer( OTF_WStream* wstream ) { - - - /* have filename allocated an freed in order to avoid problems with - pre-allocated buffer being too short */ - - - char* filename; - - - if ( NULL == wstream->statsBuffer ) { - - - filename= OTF_getFilename( wstream->namestub, - wstream->id, OTF_FILETYPE_STATS, 0, NULL ); - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_getFilename() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - -#ifdef HAVE_ZLIB - if ( wstream->compression > 0) { - - filename = strcat( filename, ".z" ); - } -#endif /* HAVE_ZLIB */ - - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - wstream->statsBuffer= OTF_WBuffer_open_zlevel( filename, wstream->manager, - wstream->compression ); - if( NULL == wstream->statsBuffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_open() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - free( filename ); - filename = NULL; - -# ifndef OTF_DEBUG - OTF_WBuffer_setSize( wstream->statsBuffer, wstream->buffersizes ); -# else - if( 0 == OTF_WBuffer_setSize( wstream->statsBuffer, - wstream->buffersizes ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_setSize() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - } - - return wstream->statsBuffer; -} - - -OTF_WBuffer* OTF_WStream_getMarkerBuffer( OTF_WStream* wstream ) { - - - /* have filename allocated an freed in order to avoid problems with - pre-allocated buffer being too short */ - - - char* filename; - - - if ( NULL == wstream->markerBuffer ) { - - - filename= OTF_getFilename( wstream->namestub, - wstream->id, OTF_FILETYPE_MARKER, 0, NULL ); - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_getFilename() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - -#ifdef HAVE_ZLIB - if ( wstream->compression > 0) { - - filename = strcat( filename, ".z" ); - } -#endif /* HAVE_ZLIB */ - - if( NULL == filename ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - wstream->markerBuffer= OTF_WBuffer_open_zlevel( filename, wstream->manager, - wstream->compression ); - if( NULL == wstream->markerBuffer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_open() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - free( filename ); - filename = NULL; - -# ifndef OTF_DEBUG - OTF_WBuffer_setSize( wstream->markerBuffer, wstream->buffersizes ); -# else - if( 0 == OTF_WBuffer_setSize( wstream->markerBuffer, - wstream->buffersizes ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_WBuffer_setSize() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - } - - return wstream->markerBuffer; -} - - -int OTF_WStream_setCompression( OTF_WStream* wstream, OTF_FileCompression - compression ) { - - -#ifdef HAVE_ZLIB - if ( compression <= 9 ) { - - wstream->compression = compression; - - return 1; - - } else { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "compression is no expected value (%u). ignored.\n", - __FUNCTION__, __FILE__, __LINE__, compression ); - - return 0; - } - -#else /* HAVE_ZLIB */ - - if( 0 == compression ) { - - return 1; - - } else { - - return 0; - } - -#endif /* HAVE_ZLIB */ -} - - -OTF_FileCompression OTF_WStream_getCompression( OTF_WStream* wstream ) { - -#ifdef HAVE_ZLIB - return wstream->compression; -#else - return 0; -#endif /* HAVE_ZLIB */ -} - - -void OTF_WStream_setBufferSizes( OTF_WStream* wstream, uint32_t size ) { - - - if ( 50 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "intended buffer size %u is too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - return; - - } else if ( 500 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u is very small, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } else if ( 10 * 1024 *1024 < size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u is rather big, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } - - wstream->buffersizes= size; -} - - -uint32_t OTF_WStream_getBufferSizes(OTF_WStream* wstream) { - - - return wstream->buffersizes; -} - - -void OTF_WStream_setZBufferSizes( OTF_WStream* wstream, uint32_t size ) { - - -#ifdef HAVE_ZLIB - - if ( 32 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "intended zbuffer size %u is too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - return; - - } else if ( 512 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "zbuffer size %u is very small, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } else if ( 10 * 1024 *1024 < size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "zbuffer size %u is rather big, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } - - wstream->zbuffersizes= size; - -#endif /* HAVE_ZLIB */ -} - - -uint32_t OTF_WStream_getZBufferSizes(OTF_WStream* wstream) { - - -#ifdef HAVE_ZLIB - return wstream->zbuffersizes; -#else /* HAVE_ZLIB */ - return 0; -#endif /* HAVE_ZLIB */ -} - - -void OTF_WStream_setFormat( OTF_WStream* wstream, uint32_t format ) { - - - if ( format > 1 ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "unknown ouput format chosen.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - - wstream->format= format; -} - - -uint32_t OTF_WStream_getFormat( OTF_WStream* wstream ) { - - - return wstream->format; -} - - -/* *** definition record write handlers *** ******************************** */ - - -int OTF_WStream_writeDefinitionCommentKV( OTF_WStream* wstream, - const char* comment, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFINITIONCOMMENT ); - - OTF_WBuffer_writeString( buffer, comment ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFINITIONCOMMENT " " ); - - OTF_WBuffer_writeString( buffer, comment ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefinitionComment( OTF_WStream* wstream, - const char* comment ) { - - return OTF_WStream_writeDefinitionCommentKV(wstream, comment, NULL); -} - - -int OTF_WStream_writeDefTimerResolutionKV( OTF_WStream* wstream, - uint64_t ticksPerSecond, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFTIMERRESOLUTION ); - - OTF_WBuffer_writeUint64( buffer, ticksPerSecond ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFTIMERRESOLUTION " " ); - - OTF_WBuffer_writeUint64( buffer, ticksPerSecond ); - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefTimerResolution( OTF_WStream* wstream, - uint64_t ticksPerSecond ) { - - return OTF_WStream_writeDefTimerResolutionKV( wstream, ticksPerSecond, NULL ); -} - - -int OTF_WStream_writeDefProcessKV( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t parent, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - -# ifdef OTF_DEBUG - if( 0 == deftoken ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "'0' is an invalid token.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFPROCESS ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - - if ( NULL != name ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ); - OTF_WBuffer_writeString( buffer, name ); - } - - if ( 0 != parent ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_PARENT ); - OTF_WBuffer_writeUint32( buffer, parent ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFPROCESS " " ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - - if ( NULL != name ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NAME " " ); - OTF_WBuffer_writeString( buffer, name ); - } - - if ( 0 != parent ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_PARENT " " ); - OTF_WBuffer_writeUint32( buffer, parent ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefProcess( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t parent ) { - - return OTF_WStream_writeDefProcessKV(wstream, deftoken, name, parent, NULL); -} - - -int OTF_WStream_writeDefProcessGroupKV( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t n, const uint32_t* array, OTF_KeyValueList* list ) { - - - unsigned int i; - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - -# ifdef OTF_DEBUG - if( 0 == deftoken ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "'0' is an invalid token.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFPROCESSGROUP ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_MEMBERS ); - - for ( i = 0; i < n; ++i ) { - - OTF_WBuffer_writeUint32( buffer, array[i] ); - OTF_WBuffer_writeChar( buffer, ',' ); - } - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ); - OTF_WBuffer_writeString( buffer, name ); - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFPROCESSGROUP " " ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_MEMBERS " " ); - - for ( i = 0; i < n; ++i ) { - - OTF_WBuffer_writeUint32( buffer, array[i] ); - OTF_WBuffer_writeChar( buffer, ',' ); - } - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NAME " " ); - OTF_WBuffer_writeString( buffer, name ); - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefProcessGroup( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t n, const uint32_t* array ) { - - return OTF_WStream_writeDefProcessGroupKV(wstream, deftoken, name, n, array, NULL); -} - - -int OTF_WStream_writeDefAttributeListKV( OTF_WStream* wstream, uint32_t attr_token, - uint32_t num, OTF_ATTR_TYPE* array, OTF_KeyValueList* list ) { - - - uint32_t i; - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFATTRLIST ); - - OTF_WBuffer_writeUint32( buffer, attr_token ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_MEMBERS ); - - for ( i = 0; i < num; ++i ) { - - OTF_WBuffer_writeUint32( buffer, array[i] ); - OTF_WBuffer_writeChar( buffer, ',' ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFATTRLIST " " ); - - OTF_WBuffer_writeUint32( buffer, attr_token ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_MEMBERS " " ); - - for ( i = 0; i < num; ++i ) { - - OTF_WBuffer_writeUint32( buffer, array[i] ); - OTF_WBuffer_writeChar( buffer, ',' ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } - - return 1; -} - -int OTF_WStream_writeDefAttributeList( OTF_WStream* wstream, uint32_t attr_token, - uint32_t num, OTF_ATTR_TYPE* array ) { - - return OTF_WStream_writeDefAttributeListKV(wstream, attr_token, num, array, NULL); -} - - -int OTF_WStream_writeDefProcessOrGroupAttributesKV( OTF_WStream* wstream, - uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFPROCESSORGROUPATTR ); - - OTF_WBuffer_writeUint32( buffer, proc_token ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_VALUE ); - OTF_WBuffer_writeUint32( buffer, attr_token ); - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFPROCESSORGROUPATTR " " ); - - OTF_WBuffer_writeUint32( buffer, proc_token ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_VALUE " " ); - OTF_WBuffer_writeUint32( buffer, attr_token ); - - OTF_WBuffer_writeNewline( buffer ); - - } - - return 1; -} - -int OTF_WStream_writeDefProcessOrGroupAttributes( OTF_WStream* wstream, - uint32_t proc_token, uint32_t attr_token ) { - - return OTF_WStream_writeDefProcessOrGroupAttributesKV(wstream, proc_token, attr_token, NULL); -} - - -int OTF_WStream_writeDefFunctionKV( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t group, uint32_t scltoken, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - -# ifdef OTF_DEBUG - if( 0 == deftoken ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "'0' is an invalid token.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFFUNCTION ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_GROUP ); - OTF_WBuffer_writeUint32( buffer, group ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ); - OTF_WBuffer_writeString( buffer, name ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFFUNCTION " " ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_GROUP " " ); - OTF_WBuffer_writeUint32( buffer, group ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NAME " " ); - OTF_WBuffer_writeString( buffer, name ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefFunction( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t group, uint32_t scltoken ) { - - return OTF_WStream_writeDefFunctionKV(wstream, deftoken, name, group, scltoken, NULL); -} - - -int OTF_WStream_writeDefFunctionGroupKV( OTF_WStream* wstream, - uint32_t deftoken, const char* name, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - -# ifdef OTF_DEBUG - if( 0 == deftoken ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "'0' is an invalid token.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFFUNCTIONGROUP ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFFUNCTIONGROUP " " ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NAME " " ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefFunctionGroup( OTF_WStream* wstream, - uint32_t deftoken, const char* name ) { - - return OTF_WStream_writeDefFunctionGroupKV(wstream, deftoken, name, NULL); -} - - -int OTF_WStream_writeDefCollectiveOperationKV( OTF_WStream* wstream, - uint32_t collOp, const char* name, uint32_t type, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - -# ifdef OTF_DEBUG - if( 0 == collOp ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "'0' is an invalid token.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFCOLLOP ); - - OTF_WBuffer_writeUint32( buffer, collOp ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TYPE ); - OTF_WBuffer_writeUint32( buffer, type ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFCOLLOP " " ); - - OTF_WBuffer_writeUint32( buffer, collOp ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NAME " " ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TYPE " " ); - OTF_WBuffer_writeUint32( buffer, type ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefCollectiveOperation( OTF_WStream* wstream, - uint32_t collOp, const char* name, uint32_t type ) { - - return OTF_WStream_writeDefCollectiveOperationKV(wstream, collOp, name, type, NULL); -} - - -int OTF_WStream_writeDefCounterKV( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t properties, uint32_t countergroup, - const char* unit, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - -# ifdef OTF_DEBUG - if( 0 == deftoken ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "'0' is an invalid token.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFCOUNTER ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_GROUP ); - OTF_WBuffer_writeUint32( buffer, countergroup ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_PROPERTIES ); - OTF_WBuffer_writeUint32( buffer, properties ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_UNIT ); - OTF_WBuffer_writeString( buffer, unit ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFCOUNTER " " ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_GROUP " " ); - OTF_WBuffer_writeUint32( buffer, countergroup ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NAME " " ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_PROPERTIES " " ); - OTF_WBuffer_writeUint32( buffer, properties ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_UNIT " " ); - OTF_WBuffer_writeString( buffer, unit ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefCounter( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t properties, uint32_t countergroup, - const char* unit ) { - - return OTF_WStream_writeDefCounterKV(wstream, deftoken, name, properties, - countergroup, unit, NULL); -} - - -int OTF_WStream_writeDefCounterGroupKV( OTF_WStream* wstream, - uint32_t deftoken, const char* name, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - -# ifdef OTF_DEBUG - if( 0 == deftoken ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "'0' is an invalid token.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFCOUNTERGROUP ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFCOUNTERGROUP " " ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NAME " " ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefCounterGroup( OTF_WStream* wstream, - uint32_t deftoken, const char* name ) { - - return OTF_WStream_writeDefCounterGroupKV(wstream, deftoken, name, NULL); -} - - -int OTF_WStream_writeDefSclKV( OTF_WStream* wstream, uint32_t deftoken, - uint32_t sclfile, uint32_t sclline, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - -# ifdef OTF_DEBUG - if( 0 == deftoken ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "'0' is an invalid token.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFSCL ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_FILE ); - OTF_WBuffer_writeUint32( buffer, sclfile ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_LINE ); - OTF_WBuffer_writeUint32( buffer, sclline ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFSCL " " ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_FILE " " ); - OTF_WBuffer_writeUint32( buffer, sclfile ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_LINE " " ); - OTF_WBuffer_writeUint32( buffer, sclline ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefScl( OTF_WStream* wstream, uint32_t deftoken, - uint32_t sclfile, uint32_t sclline ) { - - return OTF_WStream_writeDefSclKV(wstream, deftoken, sclfile, sclline, NULL); -} - - -int OTF_WStream_writeDefSclFileKV( OTF_WStream* wstream, uint32_t deftoken, - const char* filename, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - -# ifdef OTF_DEBUG - if( 0 == deftoken ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "'0' is an invalid token.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFSCLFILE ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ); - OTF_WBuffer_writeString( buffer, filename ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFSCLFILE " " ); - - OTF_WBuffer_writeUint32( buffer, deftoken ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NAME " " ); - OTF_WBuffer_writeString( buffer, filename ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefSclFile( OTF_WStream* wstream, uint32_t deftoken, - const char* filename ) { - - return OTF_WStream_writeDefSclFileKV(wstream, deftoken, filename, NULL); -} - - -int OTF_WStream_writeDefVersionKV( OTF_WStream* wstream, uint8_t major, - uint8_t minor, uint8_t sub, const char* string, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFVERSION ); - - OTF_WBuffer_writeUint32( buffer, major ); - OTF_WBuffer_writeChar( buffer, '.' ); - OTF_WBuffer_writeUint32( buffer, minor ); - OTF_WBuffer_writeChar( buffer, '.' ); - OTF_WBuffer_writeUint32( buffer, sub ); - OTF_WBuffer_writeString( buffer, string ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFVERSION " " ); - - OTF_WBuffer_writeUint32( buffer, major ); - OTF_WBuffer_writeChar( buffer, '.' ); - OTF_WBuffer_writeUint32( buffer, minor ); - OTF_WBuffer_writeChar( buffer, '.' ); - OTF_WBuffer_writeUint32( buffer, sub ); - OTF_WBuffer_writeString( buffer, string ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefVersion( OTF_WStream* wstream, uint8_t major, - uint8_t minor, uint8_t sub, const char* string ) { - - return OTF_WStream_writeDefVersionKV(wstream, major, minor, sub, string, NULL); -} - - -int OTF_WStream_writeOtfVersion( OTF_WStream* wstream ) { - - return OTF_WStream_writeDefVersion( wstream, OTF_VERSION_MAJOR, - OTF_VERSION_MINOR, OTF_VERSION_SUB, OTF_VERSION_STRING ); -} - - -int OTF_WStream_writeDefCreatorKV( OTF_WStream* wstream, const char* creator, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFCREATOR ); - - OTF_WBuffer_writeString( buffer, creator ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFCREATOR " " ); - - OTF_WBuffer_writeString( buffer, creator ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefCreator( OTF_WStream* wstream, const char* creator ) { - - return OTF_WStream_writeDefCreatorKV(wstream, creator, NULL); -} - - -int OTF_WStream_writeDefFileKV( OTF_WStream* wstream, uint32_t token, - const char* name, uint32_t group, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - -# ifdef OTF_DEBUG - if( 0 == token ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "'0' is an invalid token.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFFILE ); - - OTF_WBuffer_writeUint32( buffer, token ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_GROUP ); - OTF_WBuffer_writeUint32( buffer, group ); - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFFILE " " ); - - OTF_WBuffer_writeUint32( buffer, token ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NAME " " ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_GROUP " " ); - OTF_WBuffer_writeUint32( buffer, group ); - - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefFile( OTF_WStream* wstream, uint32_t token, - const char* name, uint32_t group ) { - - return OTF_WStream_writeDefFileKV(wstream, token, name, group, NULL); -} - -int OTF_WStream_writeDefFileGroupKV( OTF_WStream* wstream, uint32_t token, - const char* name, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - -# ifdef OTF_DEBUG - if( 0 == token ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "'0' is an invalid token.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } -# endif - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFFILEGROUP ); - - OTF_WBuffer_writeUint32( buffer, token ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ); - OTF_WBuffer_writeString( buffer, name ); - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFFILEGROUP " " ); - - OTF_WBuffer_writeUint32( buffer, token ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NAME " " ); - OTF_WBuffer_writeString( buffer, name ); - - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefFileGroup( OTF_WStream* wstream, uint32_t token, - const char* name ) { - - return OTF_WStream_writeDefFileGroupKV(wstream, token, name, NULL); -} - - -int OTF_WStream_writeDefKeyValueKV( OTF_WStream* wstream, uint32_t key, OTF_Type type, - const char* name, const char *description, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getDefBuffer( wstream ); - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_DEF_PREFIX - OTF_KEYWORD_S_DEFKEYVALUE ); - - OTF_WBuffer_writeUint32( buffer, key ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TYPE ); - OTF_WBuffer_writeUint32( buffer, type ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ); - OTF_WBuffer_writeString( buffer, description ); - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_DEF_PREFIX - OTF_KEYWORD_L_DEFKEYVALUE " " ); - - OTF_WBuffer_writeUint32( buffer, key ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TYPE " " ); - OTF_WBuffer_writeUint32( buffer, type ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NAME " " ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TAG " " ); - OTF_WBuffer_writeString( buffer, description ); - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefKeyValue( OTF_WStream* wstream, uint32_t key, - OTF_Type type, const char* name, const char *description ) { - - return OTF_WStream_writeDefKeyValueKV(wstream, key, type, name, description, NULL); -} - - -/* *** event record write handlers *** ************************************* */ - -int OTF_WStream_writeNoOpKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_NOOP ); - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_NOOP " " ); - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeEnterKV( OTF_WStream* wstream, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, - OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, cpuid ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_ENTER ); - - OTF_WBuffer_writeUint32( buffer, statetoken ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_ENTER " " ); - - OTF_WBuffer_writeUint32( buffer, statetoken ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeEnter( OTF_WStream* wstream, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken ) { - - return OTF_WStream_writeEnterKV(wstream, time, statetoken, cpuid, scltoken, NULL); -} - - -int OTF_WStream_writeRecvMsgKV( OTF_WStream* wstream, uint64_t time, - uint32_t receiver, uint32_t sender, uint32_t communicator, - uint32_t msgtag, uint32_t msglength, uint32_t scltoken, - OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, receiver ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_RECEIVE ); - - OTF_WBuffer_writeUint32( buffer, sender ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_LENGTH ); - OTF_WBuffer_writeUint32( buffer, msglength ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ); - OTF_WBuffer_writeUint32( buffer, msgtag ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ); - OTF_WBuffer_writeUint32( buffer, communicator ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_RECEIVE " " ); - - OTF_WBuffer_writeUint32( buffer, sender ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_LENGTH " " ); - OTF_WBuffer_writeUint32( buffer, msglength ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TAG " " ); - OTF_WBuffer_writeUint32( buffer, msgtag ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_COMMUNICATOR " " ); - OTF_WBuffer_writeUint32( buffer, communicator ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeRecvMsg( OTF_WStream* wstream, uint64_t time, - uint32_t receiver, uint32_t sender, uint32_t communicator, - uint32_t msgtag, uint32_t msglength, uint32_t scltoken ) { - - - return OTF_WStream_writeRecvMsgKV(wstream, time, receiver, sender, communicator, - msgtag, msglength, scltoken, NULL); -} - - -int OTF_WStream_writeSendMsgKV( OTF_WStream* wstream, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t communicator, uint32_t msgtag, - uint32_t msglength, uint32_t scltoken, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, sender ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_SEND ); - - OTF_WBuffer_writeUint32( buffer, receiver ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_LENGTH ); - OTF_WBuffer_writeUint32( buffer, msglength ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ); - OTF_WBuffer_writeUint32( buffer, msgtag ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ); - OTF_WBuffer_writeUint32( buffer, communicator ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_SEND " " ); - - OTF_WBuffer_writeUint32( buffer, receiver ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_LENGTH " " ); - OTF_WBuffer_writeUint32( buffer, msglength ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TAG " " ); - OTF_WBuffer_writeUint32( buffer, msgtag ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_COMMUNICATOR " " ); - OTF_WBuffer_writeUint32( buffer, communicator ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeSendMsg( OTF_WStream* wstream, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t communicator, uint32_t msgtag, - uint32_t msglength, uint32_t scltoken ) { - - return OTF_WStream_writeSendMsgKV(wstream, time, sender, receiver, communicator, - msgtag, msglength, scltoken, NULL); -} - - -int OTF_WStream_writeLeaveKV( OTF_WStream* wstream, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, - OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, cpuid ) ) return 0; - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_LEAVE ); - - if( 0 != statetoken || 0 != scltoken ) { - - OTF_WBuffer_writeUint32( buffer, statetoken ); - } - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_LEAVE " " ); - - if( 0 != statetoken || 0 != scltoken ) { - - OTF_WBuffer_writeUint32( buffer, statetoken ); - } - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeLeave( OTF_WStream* wstream, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken ) { - - return OTF_WStream_writeLeaveKV(wstream, time, statetoken, cpuid, scltoken, NULL); -} - - -int OTF_WStream_writeCounterKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t counter_token, uint64_t value, - OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_COUNTER ); - - OTF_WBuffer_writeUint32( buffer, counter_token ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_VALUE ); - OTF_WBuffer_writeUint64( buffer, value ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_COUNTER " " ); - - OTF_WBuffer_writeUint32( buffer, counter_token ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_VALUE " " ); - OTF_WBuffer_writeUint64( buffer, value ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeCounter( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t counter_token, uint64_t value ) { - - return OTF_WStream_writeCounterKV(wstream, time, process, counter_token, value, NULL); -} - - -int OTF_WStream_writeCollectiveOperationKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t functionToken, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_COLLECTIVEOPERATION ); - - OTF_WBuffer_writeUint32( buffer, functionToken ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ); - OTF_WBuffer_writeUint32( buffer, communicator ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_ROOT ); - OTF_WBuffer_writeUint32( buffer, rootprocess ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SENT ); - OTF_WBuffer_writeUint32( buffer, sent ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_RECVD ); - OTF_WBuffer_writeUint32( buffer, received ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_DURATION ); - OTF_WBuffer_writeUint64( buffer, duration ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_L_COLLECTIVEOPERATION " " ); - - OTF_WBuffer_writeUint32( buffer, functionToken ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_COMMUNICATOR " " ); - OTF_WBuffer_writeUint32( buffer, communicator ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_ROOT " " ); - OTF_WBuffer_writeUint32( buffer, rootprocess ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SENT " " ); - OTF_WBuffer_writeUint32( buffer, sent ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_RECVD " " ); - OTF_WBuffer_writeUint32( buffer, received ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_DURATION " " ); - OTF_WBuffer_writeUint64( buffer, duration ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeCollectiveOperation( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t functionToken, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken ) { - - return OTF_WStream_writeCollectiveOperationKV(wstream, time, process, functionToken, - communicator, rootprocess, sent, received, duration, scltoken, NULL); -} - - -int OTF_WStream_writeBeginCollectiveOperationKV( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken, - OTF_KeyValueList* list ) { - - OTF_WBuffer* buffer = OTF_WStream_getEventBuffer( wstream ); - - if( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) - return 0; - - if( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_BEGINCOLLECTIVEOPERATION ); - - OTF_WBuffer_writeUint32( buffer, collOp ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_HANDLEID ); - OTF_WBuffer_writeUint64( buffer, matchingId ); - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_LOCAL_COMMUNICATOR ); - OTF_WBuffer_writeUint32( buffer, procGroup ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_ROOT ); - OTF_WBuffer_writeUint32( buffer, rootProc ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SENT ); - OTF_WBuffer_writeUint64( buffer, sent ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_RECVD ); - OTF_WBuffer_writeUint64( buffer, received ); - - if( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_BEGINCOLLECTIVEOPERATION " " ); - - OTF_WBuffer_writeUint32( buffer, collOp ); - OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_HANDLEID " " ); - OTF_WBuffer_writeUint64( buffer, matchingId ); - OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_COMMUNICATOR " " ); - OTF_WBuffer_writeUint32( buffer, procGroup ); - OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_ROOT " " ); - OTF_WBuffer_writeUint32( buffer, rootProc ); - OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_SENT " " ); - OTF_WBuffer_writeUint64( buffer, sent ); - OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_RECVD " " ); - OTF_WBuffer_writeUint64( buffer, received ); - - if( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeBeginCollectiveOperation( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken ) { - - return OTF_WStream_writeBeginCollectiveOperationKV(wstream, time, process, - collOp, matchingId, procGroup, rootProc, sent, received, - scltoken, NULL); -} - - -int OTF_WStream_writeEndCollectiveOperationKV( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint64_t matchingId, - OTF_KeyValueList* list ) { - - OTF_WBuffer* buffer = OTF_WStream_getEventBuffer( wstream ); - - if( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) - return 0; - - if( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_ENDCOLLECTIVEOPERATION ); - - OTF_WBuffer_writeUint64( buffer, matchingId ); - - OTF_WBuffer_writeNewline( buffer ); - - } else if( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_ENDCOLLECTIVEOPERATION " " ); - - OTF_WBuffer_writeUint64( buffer, matchingId ); - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeEndCollectiveOperation( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint64_t matchingId ) { - - return OTF_WStream_writeEndCollectiveOperationKV(wstream, time, process, matchingId, NULL); -} - - -int OTF_WStream_writeEventCommentKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_EVENTCOMMENT ); - - OTF_WBuffer_writeString( buffer, comment ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_EVENTCOMMENT " " ); - - OTF_WBuffer_writeString( buffer, comment ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeEventComment( OTF_WStream* wstream, uint64_t time, - uint32_t process, const char* comment ) { - - return OTF_WStream_writeEventCommentKV(wstream, time, process, comment, NULL); -} - - -int OTF_WStream_writeBeginProcessKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_BEGINPROCESS ); - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_BEGINPROCESS " " ); - - OTF_WBuffer_writeNewline( buffer ); - - } - - return 1; -} - -int OTF_WStream_writeBeginProcess( OTF_WStream* wstream, uint64_t time, - uint32_t process ) { - - return OTF_WStream_writeBeginProcessKV(wstream, time, process, NULL); -} - - -int OTF_WStream_writeEndProcessKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_ENDPROCESS ); - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_ENDPROCESS " " ); - - OTF_WBuffer_writeNewline( buffer ); - - } - - return 1; -} - -int OTF_WStream_writeEndProcess( OTF_WStream* wstream, uint64_t time, - uint32_t process ) { - - return OTF_WStream_writeEndProcessKV(wstream, time, process, NULL); -} - - -int OTF_WStream_writeFileOperationKV( OTF_WStream* wstream, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t handleid, uint32_t operation, - uint64_t bytes, uint64_t duration, uint32_t source, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_FILEOPERATION ); - - - OTF_WBuffer_writeUint32( buffer, fileid ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_HANDLEID ); - OTF_WBuffer_writeUint64( buffer, handleid ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_OPERATION ); - OTF_WBuffer_writeUint32( buffer, operation ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTES ); - OTF_WBuffer_writeUint64( buffer, bytes ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_DURATION ); - OTF_WBuffer_writeUint64( buffer, duration ); - - if( 0 != source ) { - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, source ); - } - - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_FILEOPERATION " " ); - - - OTF_WBuffer_writeUint32( buffer, fileid ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_HANDLEID " " ); - OTF_WBuffer_writeUint64( buffer, handleid ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_OPERATION " " ); - OTF_WBuffer_writeUint32( buffer, operation ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_BYTES " " ); - OTF_WBuffer_writeUint64( buffer, bytes ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_DURATION " " ); - OTF_WBuffer_writeUint64( buffer, duration ); - - if( 0 != source ) { - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, source ); - } - - - OTF_WBuffer_writeNewline( buffer ); - - } - - return 1; -} - -int OTF_WStream_writeFileOperation( OTF_WStream* wstream, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t handleid, uint32_t operation, - uint64_t bytes, uint64_t duration, uint32_t source ) { - - return OTF_WStream_writeFileOperationKV(wstream, time, fileid, process, - handleid, operation, bytes, duration, source, NULL); -} - - -int OTF_WStream_writeBeginFileOperationKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList* list ) { - - OTF_WBuffer* buffer = OTF_WStream_getEventBuffer( wstream ); - - if( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) - return 0; - - if( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_BEGINFILEOPERATION_NEW ); - - OTF_WBuffer_writeUint64( buffer, matchingId ); - - if( 0 != scltoken ) { - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_BEGINFILEOPERATION_NEW " " ); - - OTF_WBuffer_writeUint64( buffer, matchingId ); - - if( 0 != scltoken ) { - OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } - - return 1; -} - -int OTF_WStream_writeBeginFileOperation( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint64_t matchingId, uint32_t scltoken ) { - - return OTF_WStream_writeBeginFileOperationKV(wstream, time, process, - matchingId, scltoken, NULL); -} - - -int OTF_WStream_writeEndFileOperationKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t fileid, uint64_t matchingId, - uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList* list ) { - - OTF_WBuffer* buffer = OTF_WStream_getEventBuffer( wstream ); - - if( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) - return 0; - - if( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_ENDFILEOPERATION_NEW ); - - OTF_WBuffer_writeUint32( buffer, fileid ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_MATCHID ); - OTF_WBuffer_writeUint64( buffer, matchingId ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_HANDLEID ); - OTF_WBuffer_writeUint64( buffer, handleId ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_OPERATION ); - OTF_WBuffer_writeUint32( buffer, operation ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTES ); - OTF_WBuffer_writeUint64( buffer, bytes ); - - if( 0 != scltoken ) { - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_ENDFILEOPERATION_NEW " " ); - - OTF_WBuffer_writeUint32( buffer, fileid ); - OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_MATCHID " " ); - OTF_WBuffer_writeUint64( buffer, matchingId ); - OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_HANDLEID " " ); - OTF_WBuffer_writeUint64( buffer, handleId ); - OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_OPERATION " " ); - OTF_WBuffer_writeUint32( buffer, operation ); - OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_BYTES " " ); - OTF_WBuffer_writeUint64( buffer, bytes ); - - if( 0 != scltoken ) { - OTF_WBuffer_writeKeyword( buffer, - " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } - - return 1; -} - -int OTF_WStream_writeEndFileOperation( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t fileid, uint64_t matchingId, - uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken ) { - - return OTF_WStream_writeEndFileOperationKV(wstream, time, process, fileid, - matchingId, handleId, operation, bytes, scltoken, NULL); -} - - -int OTF_WStream_writeRMAPutKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_RMAPUT ); - - OTF_WBuffer_writeUint32( buffer, origin ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_PROCESS ); - OTF_WBuffer_writeUint32( buffer, target ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ); - OTF_WBuffer_writeUint32( buffer, communicator ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ); - OTF_WBuffer_writeUint32( buffer, tag ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_LENGTH ); - OTF_WBuffer_writeUint64( buffer, bytes ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_RMAPUT " " ); - - OTF_WBuffer_writeUint32( buffer, origin ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_PROCESS " " ); - OTF_WBuffer_writeUint32( buffer, target ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_COMMUNICATOR " " ); - OTF_WBuffer_writeUint32( buffer, communicator ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TAG " " ); - OTF_WBuffer_writeUint32( buffer, tag ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_LENGTH " " ); - OTF_WBuffer_writeUint64( buffer, bytes ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeRMAPut( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t scltoken ) { - - return OTF_WStream_writeRMAPutKV(wstream, time, process, origin, target, - communicator, tag, bytes, scltoken, NULL); -} - - -int OTF_WStream_writeRMAPutRemoteEndKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_RMAPUTRE ); - - OTF_WBuffer_writeUint32( buffer, origin ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_PROCESS ); - OTF_WBuffer_writeUint32( buffer, target ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ); - OTF_WBuffer_writeUint32( buffer, communicator ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ); - OTF_WBuffer_writeUint32( buffer, tag ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_LENGTH ); - OTF_WBuffer_writeUint64( buffer, bytes ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_RMAPUTRE " " ); - - OTF_WBuffer_writeUint32( buffer, origin ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_PROCESS " " ); - OTF_WBuffer_writeUint32( buffer, target ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_COMMUNICATOR " " ); - OTF_WBuffer_writeUint32( buffer, communicator ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TAG " " ); - OTF_WBuffer_writeUint32( buffer, tag ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_LENGTH " " ); - OTF_WBuffer_writeUint64( buffer, bytes ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeRMAPutRemoteEnd( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t scltoken ) { - - return OTF_WStream_writeRMAPutRemoteEndKV(wstream, time, process, origin, - target, communicator, tag, bytes, scltoken, NULL); -} - - -int OTF_WStream_writeRMAGetKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_RMAGET ); - - OTF_WBuffer_writeUint32( buffer, origin ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_PROCESS ); - OTF_WBuffer_writeUint32( buffer, target ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ); - OTF_WBuffer_writeUint32( buffer, communicator ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ); - OTF_WBuffer_writeUint32( buffer, tag ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_LENGTH ); - OTF_WBuffer_writeUint64( buffer, bytes ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_RMAGET " " ); - - OTF_WBuffer_writeUint32( buffer, origin ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_PROCESS " " ); - OTF_WBuffer_writeUint32( buffer, target ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_COMMUNICATOR " " ); - OTF_WBuffer_writeUint32( buffer, communicator ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TAG " " ); - OTF_WBuffer_writeUint32( buffer, tag ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_LENGTH " " ); - OTF_WBuffer_writeUint64( buffer, bytes ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeRMAGet( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t scltoken ) { - - return OTF_WStream_writeRMAGetKV(wstream, time, process, origin, target, - communicator, tag, bytes, scltoken, NULL); -} - - -int OTF_WStream_writeRMAEndKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t remote, uint32_t communicator, uint32_t tag, - uint32_t scltoken, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getEventBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_RMAEND ); - - OTF_WBuffer_writeUint32( buffer, remote ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ); - OTF_WBuffer_writeUint32( buffer, communicator ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ); - OTF_WBuffer_writeUint32( buffer, tag ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_RMAEND " " ); - - OTF_WBuffer_writeUint32( buffer, remote ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_COMMUNICATOR " " ); - OTF_WBuffer_writeUint32( buffer, communicator ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TAG " " ); - OTF_WBuffer_writeUint32( buffer, tag ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeRMAEnd( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t remote, uint32_t communicator, uint32_t tag, - uint32_t scltoken ) { - - return OTF_WStream_writeRMAEndKV(wstream, time, process, remote, - communicator, tag, scltoken, NULL); -} - - -/* *** public snapshot record write handlers *** */ - - -int OTF_WStream_writeSnapshotCommentKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getSnapshotBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_PREFIX OTF_KEYWORD_S_SNAPSHOT_COMMENT ); - - OTF_WBuffer_writeString( buffer, comment ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_SNAPSHOT_PREFIX OTF_KEYWORD_L_SNAPSHOT_COMMENT " " ); - - OTF_WBuffer_writeString( buffer, comment ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeSnapshotComment( OTF_WStream* wstream, uint64_t time, - uint32_t process, const char* comment ) { - - return OTF_WStream_writeSnapshotCommentKV(wstream, time, process, comment, NULL); -} - - -int OTF_WStream_writeEnterSnapshotKV( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t statetoken, uint32_t cpuid, - uint32_t scltoken, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getSnapshotBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, cpuid ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_PREFIX OTF_KEYWORD_S_SNAPSHOT_ENTER ); - - OTF_WBuffer_writeUint32( buffer, statetoken ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_OTIME ); - OTF_WBuffer_writeUint64( buffer, originaltime ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_SNAPSHOT_PREFIX OTF_KEYWORD_L_SNAPSHOT_ENTER " " ); - - OTF_WBuffer_writeUint32( buffer, statetoken ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_OTIME " " ); - OTF_WBuffer_writeUint64( buffer, originaltime ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeEnterSnapshot( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t statetoken, uint32_t cpuid, uint32_t scltoken ) { - - return OTF_WStream_writeEnterSnapshotKV(wstream, time, originaltime, - statetoken, cpuid, scltoken, NULL); -} - - -int OTF_WStream_writeSendSnapshotKV( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t tag, uint32_t length, uint32_t source, - OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getSnapshotBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, sender ) ) return 0; - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_PREFIX OTF_KEYWORD_S_SNAPSHOT_SEND ); - - OTF_WBuffer_writeUint32( buffer, receiver ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_OTIME ); - OTF_WBuffer_writeUint64( buffer, originaltime ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_GROUP ); - OTF_WBuffer_writeUint32( buffer, procGroup ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ); - OTF_WBuffer_writeUint32( buffer, tag ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_LENGTH ); - OTF_WBuffer_writeUint32( buffer, length ); - - if ( 0 != source ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, source ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_PREFIX OTF_KEYWORD_L_SNAPSHOT_SEND " " ); - - OTF_WBuffer_writeUint32( buffer, receiver ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_OTIME " " ); - OTF_WBuffer_writeUint64( buffer, originaltime ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_GROUP " " ); - OTF_WBuffer_writeUint32( buffer, procGroup ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TAG " " ); - OTF_WBuffer_writeUint32( buffer, tag ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_LENGTH " " ); - OTF_WBuffer_writeUint32( buffer, length ); - - if ( 0 != source ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, source ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeSendSnapshot( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t tag, uint32_t length, uint32_t source ) { - - return OTF_WStream_writeSendSnapshotKV(wstream, time, originaltime, sender, - receiver, procGroup, tag, length, source, NULL); -} - - -int OTF_WStream_writeOpenFileSnapshotKV( OTF_WStream* wstream,uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, - uint32_t source, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getSnapshotBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_PREFIX OTF_KEYWORD_S_SNAPSHOT_OPENFILE ); - - OTF_WBuffer_writeUint32( buffer, fileid ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_OTIME ); - OTF_WBuffer_writeUint64( buffer, originaltime ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_HANDLEID ); - OTF_WBuffer_writeUint64( buffer, handleid ); - - if ( 0 != source ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, source ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_SNAPSHOT_PREFIX OTF_KEYWORD_L_SNAPSHOT_OPENFILE " " ); - - OTF_WBuffer_writeUint32( buffer, fileid ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_OTIME " " ); - OTF_WBuffer_writeUint64( buffer, originaltime ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_HANDLEID " " ); - OTF_WBuffer_writeUint64( buffer, handleid ); - - if ( 0 != source ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, source ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; - -} - -int OTF_WStream_writeOpenFileSnapshot( OTF_WStream* wstream,uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, - uint32_t source ) { - - return OTF_WStream_writeOpenFileSnapshotKV(wstream, time, originaltime, fileid, - process, handleid, source, NULL); -} - -int OTF_WStream_writeBeginCollopSnapshotKV( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t process, uint32_t collOp, uint64_t matchingId, - uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received, - uint32_t scltoken, OTF_KeyValueList *list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getSnapshotBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) - return 0; - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_PREFIX OTF_KEYWORD_S_SNAPSHOT_BEGINCOLLOP ); - - OTF_WBuffer_writeUint64( buffer, originaltime ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_COLLECTIVE ); - OTF_WBuffer_writeUint32( buffer, collOp ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_HANDLEID ); - OTF_WBuffer_writeUint64( buffer, matchingId ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_GROUP ); - OTF_WBuffer_writeUint32( buffer, procGroup ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_ROOT ); - OTF_WBuffer_writeUint32( buffer, rootProc ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SENT ); - OTF_WBuffer_writeUint64( buffer, sent ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_RECVD ); - OTF_WBuffer_writeUint64( buffer, received ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_SNAPSHOT_PREFIX OTF_KEYWORD_L_SNAPSHOT_BEGINCOLLOP " " ); - - OTF_WBuffer_writeUint64( buffer, originaltime ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_COLLECTIVE " " ); - OTF_WBuffer_writeUint32( buffer, collOp ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_HANDLEID " " ); - OTF_WBuffer_writeUint64( buffer, matchingId ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_GROUP " " ); - OTF_WBuffer_writeUint32( buffer, procGroup ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_ROOT " " ); - OTF_WBuffer_writeUint32( buffer, rootProc ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SENT " " ); - OTF_WBuffer_writeUint64( buffer, sent ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_RECVD " " ); - OTF_WBuffer_writeUint64( buffer, received ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; - -} - -int OTF_WStream_writeBeginCollopSnapshot( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t process, uint32_t collOp, uint64_t matchingId, - uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received, - uint32_t scltoken ) { - - - return OTF_WStream_writeBeginCollopSnapshotKV(wstream, time, originaltime, - process, collOp, matchingId, procGroup, rootProc, sent, received, - scltoken, NULL ); - -} - -int OTF_WStream_writeBeginFileOpSnapshotKV( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, - uint32_t scltoken, OTF_KeyValueList *list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getSnapshotBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) - return 0; - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_SNAPSHOT_PREFIX OTF_KEYWORD_S_SNAPSHOT_BEGINFILEOP ); - - OTF_WBuffer_writeUint64( buffer, originaltime ); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_MATCHID ); - OTF_WBuffer_writeUint64( buffer, matchingId ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SCL ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_SNAPSHOT_PREFIX OTF_KEYWORD_L_SNAPSHOT_BEGINFILEOP " " ); - - OTF_WBuffer_writeUint64( buffer, originaltime ); - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_MATCHID " " ); - OTF_WBuffer_writeUint64( buffer, matchingId ); - - if ( 0 != scltoken ) { - - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SCL " " ); - OTF_WBuffer_writeUint32( buffer, scltoken ); - } - - OTF_WBuffer_writeNewline( buffer ); - } - - - return 1; - -} - -int OTF_WStream_writeBeginFileOpSnapshot( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, uint32_t scltoken ) { - - - return OTF_WStream_writeBeginFileOpSnapshotKV( wstream, time, originaltime, - process, matchingId, scltoken, NULL); - -} - - -/* *** public summary record write handlers *** */ - - -int OTF_WStream_writeSummaryCommentKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getStatsBuffer( wstream ); - - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_SUM_PREFIX OTF_KEYWORD_S_SUMCOMMENT ); - - OTF_WBuffer_writeString( buffer, comment ); - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_SUM_PREFIX OTF_KEYWORD_L_SUMCOMMENT " " ); - - OTF_WBuffer_writeString( buffer, comment ); - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeSummaryComment( OTF_WStream* wstream, uint64_t time, - uint32_t process, const char* comment ) { - - return OTF_WStream_writeSummaryCommentKV(wstream, time, process, comment, NULL); -} - - -int OTF_WStream_writeFunctionSummaryKV( OTF_WStream* wstream, - uint64_t time, uint32_t function, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, - OTF_KeyValueList* list) { - - - OTF_WBuffer* buffer= OTF_WStream_getStatsBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_SUM_PREFIX - OTF_KEYWORD_S_SUMFUNCTION ); - - OTF_WBuffer_writeUint32( buffer, function ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_COUNT ); - OTF_WBuffer_writeUint64( buffer, count ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_EXCLTIME ); - OTF_WBuffer_writeUint64( buffer, excltime ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_INCLTIME ); - OTF_WBuffer_writeUint64( buffer, incltime ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_L_SUM_PREFIX - OTF_KEYWORD_L_SUMFUNCTION " " ); - - OTF_WBuffer_writeUint32( buffer, function ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_COUNT " " ); - OTF_WBuffer_writeUint64( buffer, count ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_EXCLTIME " " ); - OTF_WBuffer_writeUint64( buffer, excltime ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_INCLTIME " " ); - OTF_WBuffer_writeUint64( buffer, incltime ); - } - - OTF_WBuffer_writeNewline( buffer ); - - return 1; -} - -int OTF_WStream_writeFunctionSummary( OTF_WStream* wstream, - uint64_t time, uint32_t function, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime ) { - - return OTF_WStream_writeFunctionSummaryKV(wstream, time, function, process, - count, excltime, incltime, NULL); -} - - -int OTF_WStream_writeFunctionGroupSummaryKV( OTF_WStream* wstream, - uint64_t time, uint32_t functiongroup, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, - OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getStatsBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_SUM_PREFIX - OTF_KEYWORD_S_SUMFUNCTIONGROUP ); - - OTF_WBuffer_writeUint32( buffer, functiongroup ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_COUNT ); - OTF_WBuffer_writeUint64( buffer, count ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_EXCLTIME ); - OTF_WBuffer_writeUint64( buffer, excltime ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_INCLTIME ); - OTF_WBuffer_writeUint64( buffer, incltime ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_L_SUM_PREFIX - OTF_KEYWORD_L_SUMFUNCTIONGROUP " " ); - - OTF_WBuffer_writeUint32( buffer, functiongroup ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_COUNT " " ); - OTF_WBuffer_writeUint64( buffer, count ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_EXCLTIME " " ); - OTF_WBuffer_writeUint64( buffer, excltime ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_INCLTIME " " ); - OTF_WBuffer_writeUint64( buffer, incltime ); - } - - OTF_WBuffer_writeNewline( buffer ); - - return 1; -} - -int OTF_WStream_writeFunctionGroupSummary( OTF_WStream* wstream, - uint64_t time, uint32_t functiongroup, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime ) { - - return OTF_WStream_writeFunctionGroupSummaryKV(wstream, time, functiongroup, - process, count, excltime, incltime, NULL); -} - - -int OTF_WStream_writeMessageSummaryKV( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t peer, - uint32_t comm, uint32_t tag, uint64_t number_sent, - uint64_t number_recvd, uint64_t bytes_sent, - uint64_t bytes_recved, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getStatsBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_SUM_PREFIX - OTF_KEYWORD_S_SUMMESSAGE ); - - OTF_WBuffer_writeUint32( buffer, peer ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_COMMUNICATOR ); - OTF_WBuffer_writeUint32( buffer, comm ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TAG ); - OTF_WBuffer_writeUint32( buffer, tag ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERSENT ); - OTF_WBuffer_writeUint64( buffer, number_sent ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERRECVD ); - OTF_WBuffer_writeUint64( buffer, number_recvd ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SENT ); - OTF_WBuffer_writeUint64( buffer, bytes_sent ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_RECVD ); - OTF_WBuffer_writeUint64( buffer, bytes_recved ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_L_SUM_PREFIX - OTF_KEYWORD_L_SUMMESSAGE " " ); - - OTF_WBuffer_writeUint32( buffer, peer ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_COMMUNICATOR " " ); - OTF_WBuffer_writeUint32( buffer, comm ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TAG " " ); - OTF_WBuffer_writeUint32( buffer, tag ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBERSENT " " ); - OTF_WBuffer_writeUint64( buffer, number_sent ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBERRECVD " " ); - OTF_WBuffer_writeUint64( buffer, number_recvd ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SENT " " ); - OTF_WBuffer_writeUint64( buffer, bytes_sent ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_RECVD " " ); - OTF_WBuffer_writeUint64( buffer, bytes_recved ); - } - - OTF_WBuffer_writeNewline( buffer ); - - return 1; -} - -int OTF_WStream_writeMessageSummary( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t peer, - uint32_t comm, uint32_t tag, uint64_t number_sent, - uint64_t number_recvd, uint64_t bytes_sent, - uint64_t bytes_recved ) { - - return OTF_WStream_writeMessageSummaryKV(wstream, time, process, peer, comm, - tag, number_sent, number_recvd, bytes_sent, bytes_recved, NULL); -} - - -int OTF_WStream_writeCollopSummaryKV( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, - uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, - uint64_t bytes_recved, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getStatsBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_SUM_PREFIX - OTF_KEYWORD_S_COLLOPMESSAGE ); - - OTF_WBuffer_writeUint32( buffer, comm ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_COLLECTIVE ); - OTF_WBuffer_writeUint32( buffer, collective ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERSENT ); - OTF_WBuffer_writeUint64( buffer, number_sent ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERRECVD ); - OTF_WBuffer_writeUint64( buffer, number_recved ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_SENT ); - OTF_WBuffer_writeUint64( buffer, bytes_sent ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_RECVD ); - OTF_WBuffer_writeUint64( buffer, bytes_recved ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_L_SUM_PREFIX - OTF_KEYWORD_L_COLLOPMESSAGE " " ); - - OTF_WBuffer_writeUint32( buffer, comm ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_COLLECTIVE " " ); - OTF_WBuffer_writeUint32( buffer, collective ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBERSENT " " ); - OTF_WBuffer_writeUint64( buffer, number_sent ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBERRECVD " " ); - OTF_WBuffer_writeUint64( buffer, number_recved ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_SENT " " ); - OTF_WBuffer_writeUint64( buffer, bytes_sent ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_RECVD " " ); - OTF_WBuffer_writeUint64( buffer, bytes_recved ); - } - - OTF_WBuffer_writeNewline( buffer ); - - return 1; -} - -int OTF_WStream_writeCollopSummary( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, - uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, - uint64_t bytes_recved ) { - - return OTF_WStream_writeCollopSummaryKV(wstream, time, process, comm, collective, - number_sent, number_recved, bytes_sent, bytes_recved, NULL); -} - - -int OTF_WStream_writeFileOperationSummaryKV( OTF_WStream* wstream, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getStatsBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_SUM_PREFIX - OTF_KEYWORD_S_SUMFILEOPERATION ); - - OTF_WBuffer_writeUint32( buffer, fileid ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBEROPEN ); - OTF_WBuffer_writeUint64( buffer, nopen ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERCLOSE ); - OTF_WBuffer_writeUint64( buffer, nclose ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERREAD ); - OTF_WBuffer_writeUint64( buffer, nread ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERWRITE ); - OTF_WBuffer_writeUint64( buffer, nwrite ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERSEEK ); - OTF_WBuffer_writeUint64( buffer, nseek ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTESREAD ); - OTF_WBuffer_writeUint64( buffer, bytesread ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTESWRITE ); - OTF_WBuffer_writeUint64( buffer, byteswrite ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_L_SUM_PREFIX - OTF_KEYWORD_L_SUMFILEOPERATION " " ); - - OTF_WBuffer_writeUint32( buffer, fileid ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBEROPEN " " ); - OTF_WBuffer_writeUint64( buffer, nopen ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBERCLOSE " " ); - OTF_WBuffer_writeUint64( buffer, nclose ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBERREAD " " ); - OTF_WBuffer_writeUint64( buffer, nread ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBERWRITE " " ); - OTF_WBuffer_writeUint64( buffer, nwrite ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBERSEEK " " ); - OTF_WBuffer_writeUint64( buffer, nseek ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_BYTESREAD " " ); - OTF_WBuffer_writeUint64( buffer, bytesread ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_BYTESWRITE " " ); - OTF_WBuffer_writeUint64( buffer, byteswrite ); - } - - OTF_WBuffer_writeNewline( buffer ); - - return 1; - -} - -int OTF_WStream_writeFileOperationSummary( OTF_WStream* wstream, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite ) { - - return OTF_WStream_writeFileOperationSummaryKV(wstream, time, fileid, process, nopen, - nclose, nread, nwrite, nseek, bytesread, byteswrite, NULL); -} - - -int OTF_WStream_writeFileGroupOperationSummaryKV( OTF_WStream* wstream, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getStatsBuffer( wstream ); - - if ( 0 == OTF_WBuffer_setTimeAndProcess( buffer, time, process ) ) return 0; - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_SUM_PREFIX - OTF_KEYWORD_S_SUMFILEGROUPOPERATION ); - - OTF_WBuffer_writeUint32( buffer, groupid ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBEROPEN ); - OTF_WBuffer_writeUint64( buffer, nopen ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERCLOSE ); - OTF_WBuffer_writeUint64( buffer, nclose ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERREAD ); - OTF_WBuffer_writeUint64( buffer, nread ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERWRITE ); - OTF_WBuffer_writeUint64( buffer, nwrite ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NUMBERSEEK ); - OTF_WBuffer_writeUint64( buffer, nseek ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTESREAD ); - OTF_WBuffer_writeUint64( buffer, bytesread ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_BYTESWRITE ); - OTF_WBuffer_writeUint64( buffer, byteswrite ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_L_SUM_PREFIX - OTF_KEYWORD_L_SUMFILEGROUPOPERATION " " ); - - OTF_WBuffer_writeUint32( buffer, groupid ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBEROPEN " " ); - OTF_WBuffer_writeUint64( buffer, nopen ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBERCLOSE " " ); - OTF_WBuffer_writeUint64( buffer, nclose ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBERREAD " " ); - OTF_WBuffer_writeUint64( buffer, nread ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBERWRITE " " ); - OTF_WBuffer_writeUint64( buffer, nwrite ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NUMBERSEEK " " ); - OTF_WBuffer_writeUint64( buffer, nseek ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_BYTESREAD " " ); - OTF_WBuffer_writeUint64( buffer, bytesread ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_BYTESWRITE " " ); - OTF_WBuffer_writeUint64( buffer, byteswrite ); - } - - OTF_WBuffer_writeNewline( buffer ); - - return 1; - -} - -int OTF_WStream_writeFileGroupOperationSummary( OTF_WStream* wstream, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite ) { - - return OTF_WStream_writeFileGroupOperationSummaryKV(wstream, time, groupid, - process, nopen, nclose, nread, nwrite, nseek, bytesread, - byteswrite, NULL); -} - - -/** Write a def marker record to stream 'wstream'. \ingroup wstream */ -int OTF_WStream_writeDefMarkerKV( OTF_WStream* wstream, - uint32_t token, const char* name, uint32_t type, - OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getMarkerBuffer( wstream ); - - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_MARKER_PREFIX - OTF_KEYWORD_S_MARKER_DEFMARKER ); - OTF_WBuffer_writeUint32( buffer, token ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_NAME ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TYPE ); - OTF_WBuffer_writeUint32( buffer, type ); - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_MARKER_PREFIX - OTF_KEYWORD_L_MARKER_DEFMARKER " " ); - OTF_WBuffer_writeUint32( buffer, token ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_NAME " " ); - OTF_WBuffer_writeString( buffer, name ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TYPE " " ); - OTF_WBuffer_writeUint32( buffer, type ); - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeDefMarker( OTF_WStream* wstream, - uint32_t token, const char* name, uint32_t type ) { - - return OTF_WStream_writeDefMarkerKV(wstream, token, name, type, NULL); -} - - -/** Write a marker record to stream 'wstream'. \ingroup wstream */ -int OTF_WStream_writeMarkerKV( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t token, const char* text, - OTF_KeyValueList* list ) { - - - OTF_WBuffer* buffer= OTF_WStream_getMarkerBuffer( wstream ); - - - /* time and process are written directly, - this is completely different from event records! */ - - if ( OTF_WSTREAM_FORMAT_SHORT == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_short(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_S_MARKER_PREFIX - OTF_KEYWORD_S_MARKER_MARKERSPOT ); - OTF_WBuffer_writeUint32( buffer, token ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_TIME ); - OTF_WBuffer_writeUint64( buffer, time ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_PROCESS ); - OTF_WBuffer_writeUint32( buffer, process ); - OTF_WBuffer_writeKeyword( buffer, OTF_KEYWORD_S_LOCAL_VALUE ); - OTF_WBuffer_writeString( buffer, text ); - - OTF_WBuffer_writeNewline( buffer ); - - } else if ( OTF_WSTREAM_FORMAT_LONG == wstream->format ) { - - OTF_WBuffer_writeKeyValueList_long(buffer, list); - - OTF_WBuffer_writeKeyword( buffer, - OTF_KEYWORD_L_MARKER_PREFIX - OTF_KEYWORD_L_MARKER_MARKERSPOT " " ); - OTF_WBuffer_writeUint32( buffer, token ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_TIME " " ); - OTF_WBuffer_writeUint64( buffer, time ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_PROCESS " " ); - OTF_WBuffer_writeUint32( buffer, process ); - OTF_WBuffer_writeKeyword( buffer, " " OTF_KEYWORD_L_LOCAL_VALUE " " ); - OTF_WBuffer_writeString( buffer, text ); - - OTF_WBuffer_writeNewline( buffer ); - } - - return 1; -} - -int OTF_WStream_writeMarker( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t token, const char* text ) { - - return OTF_WStream_writeMarkerKV(wstream, time, process, token, text, NULL); -} diff --git a/externals/otf/otflib/OTF_WStream.h b/externals/otf/otflib/OTF_WStream.h deleted file mode 100644 index 2621e1db340c124f076c8fe31442c1ac0182cf31..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_WStream.h +++ /dev/null @@ -1,1198 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_WStream.h - * - * @brief Provides write access to trace streams, which consist of multiple - * buffers. - * - * \ingroup wstream - */ - -/** \defgroup wstream Stream Writer Interface - * - * This interface provides functions for writing trace at stream level. - * A stream is part of a trace and consists of up to four buffers - * (event buffer, definition buffer, snapshots buffer, statistics buffer). - * - * wstream is structured similarly to writer. - * - * Use this interface, if you want to a specific stream and the writer - * interface does not provide the desired access. - * - * \section wstream_example A short Example - * - * \code - * #include <assert.h> - * #include "otf.h" - * - * int main( int argc, char** argv ) { - * \endcode - * - * Declare a file manager and a writer. - * \code - * OTF_FileManager* manager; - * OTF_WStream* wstream; - * \endcode - * - * Initialize the file manager. Open at most 100 OS files. - * \code - * manager= OTF_FileManager_open( 100 ); - * assert( manager ); - * \endcode - * - * Initialize the wstream object. Open file "test", writing the first stream. - * \code - * wstream = OTF_WStream_open( "test", 0, manager ); - * assert( wstream ); - * \endcode - * - * Write some definition records. - * \code - * OTF_WStream_writeDefTimerResolution( wstream, 1000 ); - * OTF_WStream_writeDefProcess( wstream, 1, "proc one", 0 ); - * \endcode - * - * Clean up before exiting the program. - * \code - * OTF_WStream_close( wstream ); - * OTF_FileManager_close( manager ); - * - * return 0; - * } - * \endcode - * - * Compile this using $ gcc -o test test.c `otfconfig --libs`. - * - * When executing this program it only writes one file (test.0.def), - * containg the written records. - * - */ - -#ifndef OTF_WSTREAM_H -#define OTF_WSTREAM_H - - -#include <stdlib.h> - - -#include "OTF_inttypes.h" - - -#include "OTF_Definitions.h" -#include "OTF_FileManager.h" -#include "OTF_WBuffer.h" -#include "OTF_Filenames.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct struct_OTF_WStream { - - - /** name stub: all files will begin with this name */ - char* namestub; - - /** Unique id for the current stream. */ - uint32_t id; - - /** State wether to use long or short format, - see OTF_WSTREAM_FORMAT_XXX macros above. */ - uint32_t format; - - - /** Definitions buffer. Definitions buffer carries definition - records. */ - OTF_WBuffer* defBuffer; - - /** Event buffer. The event buffer carries records for actual - events, i.e. records with a time stamp */ - OTF_WBuffer* eventBuffer; - - /** Snaps (snapshots) buffer. The snapshots buffer carries - snapshots of the whole state at a point in time - as oppossed to - events which only show changes in the state. This can be used to - start from such a snapshot instead of from the very begining. */ - OTF_WBuffer* snapsBuffer; - - /** Statistics buffer. Statistics buffer carries statistical - information information about a certain time interval resp. - data at points of time that allow to derive statistics without - reading through all events of that interval. */ - OTF_WBuffer* statsBuffer; - - /** Marker buffer. Marker buffer carries marker definitions and spots - which live in a separate file and wich are not sorted according to time stamp - in any way. */ - OTF_WBuffer* markerBuffer; - - /** Default compression method for all buffers managed by this stream */ - OTF_FileCompression compression; - - /** Default size of buffers managed by this WStream. */ - uint32_t buffersizes; - -#ifdef HAVE_ZLIB - /** Default size of zbuffers managed by this RStream. */ - uint32_t zbuffersizes; -#endif /* HAVE_ZLIB */ - - /** file handle manager */ - OTF_FileManager* manager; -}; -/** wstream object \ingroup wstream */ -typedef struct struct_OTF_WStream OTF_WStream; - - -/** - * Create a new OTF_WStream instance. - * - * @param namestub File name prefix which is going to be used by - * all sub-files which belong to the writer stream. - * @param id Abitrary but unique identifier of the writer stream. - Must be > '0' for real streams. Use '0' for global definitions. - * @param manager File handle manager. - * - * @return Initialized OTF_WStream instance or 0 if an error - * occurred. - * - * \ingroup wstream - */ -OTF_WStream* OTF_WStream_open( const char* namestub, uint32_t id, - OTF_FileManager* manager ); - - -/** - * Close an OTF_WStream instance and all its related files. - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @return 1 if instance was closed successfully and 0 otherwise. - * - * \ingroup wstream - */ -int OTF_WStream_close( OTF_WStream* wstream ); - - -/** - * Flush an OTF_WStream instance, i.e. flush all associated buffers if existing. - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @return 1 if everything flushed successfully and 0 otherwise. - * - * \ingroup wstream - */ -int OTF_WStream_flush( OTF_WStream* wstream ); - - -/** - * Returns the definition buffer of the according writer stream. - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @return Initialized OTF_WBuffer instance or 0 if an error occured. - * - * \ingroup wstream - */ -OTF_WBuffer* OTF_WStream_getDefBuffer( OTF_WStream* wstream ); - - -/** - * Returns the event buffer of the according writer stream. - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @return Initialized OTF_WBuffer instance or 0 if an error occured. - * - * \ingroup wstream - */ -OTF_WBuffer* OTF_WStream_getEventBuffer( OTF_WStream* wstream ); - - -/** - * Returns the snapshots buffer of the according writer stream. - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @return Initialized OTF_WBuffer instance or 0 if an error occured. - * - * \ingroup wstream - */ -OTF_WBuffer* OTF_WStream_getSnapshotBuffer( OTF_WStream* wstream ); - - -/** - * Returns the statistics buffer of the according writer stream. - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @return Initialized OTF_WBuffer instance or 0 if an error occured. - * - * \ingroup wstream - */ -OTF_WBuffer* OTF_WStream_getStatsBuffer( OTF_WStream* wstream ); - - -/** - * Returns the marker buffer of the according writer stream. - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @return Initialized OTF_WBuffer instance or 0 if an error occured. - * - * \ingroup wstream - */ -OTF_WBuffer* OTF_WStream_getMarkerBuffer( OTF_WStream* wstream ); - - -/** - * Set the standard compression method for all buffers managed by this writer - * stream - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @param compression Default compression level. - * 0-9, where 0 means no compression is applied, and 9 is - * the highest level of compression. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup wstream - */ -int OTF_WStream_setCompression( OTF_WStream* wstream, OTF_FileCompression - compression ); - - -/** - * Return the standard compression method for all buffers managed by this writer - * stream - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @return Standard compression level for all buffers managed by - * this writer stream. - * - * \ingroup wstream - */ -OTF_FileCompression OTF_WStream_getCompression( OTF_WStream* wstream ); - - -/** - * Set the default buffer size for all buffers managed by this writer stream. - * This is only effective for future buffers and will not change already - * allocated buffers. Those can be changed with the buffers directly. - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @param size Intended buffer size. - * - * \ingroup wstream - */ -void OTF_WStream_setBufferSizes( OTF_WStream* wstream, uint32_t size ); - -/** - * Get the default buffer size for all buffers managed by this writer stream. - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @return Default buffer size for all buffers managed by this writer - * stream. - * - * \ingroup wstream - */ -uint32_t OTF_WStream_getBufferSizes( OTF_WStream* wstream ); - -/** - * Set the default zbuffer size for all files managed by this writer stream. - * This is only effective for future files and will not change already - * allocated buffers. Those can be changed with the files directly. - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @param size Intended buffer size. - * - * \ingroup wstream - */ -void OTF_WStream_setZBufferSizes( OTF_WStream* wstream, uint32_t size ); - - -/** - * Get the default zbuffer size for all files managed by this writer stream. - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @return Default buffer size for all buffers managed by this reader - * stream. - * - * \ingroup wstream - */ -uint32_t OTF_WStream_getZBufferSizes( OTF_WStream* wstream ); - -/** - * Set the default ouput format. - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @param format Intended output format (OTF_WSTREAM_FORMAT_{LONG,SHORT}) - * - * \ingroup wstream - */ -void OTF_WStream_setFormat( OTF_WStream* wstream, uint32_t format ); - -/** - * Get the default output format - * - * @param wstream Pointer to an initialized OTF_WStream object. See - * also OTF_WStream_open(). - * - * @return Default output format. - * - * \ingroup wstream - */ -uint32_t OTF_WStream_getFormat( OTF_WStream* wstream ); - - -/* *** definition record write handlers *** ******************************** */ - - -/** Write a DEFINITIONCOMMENT record to stream 'wstream'. - * @see OTF_Writer_writeDefinitionComment() - * \ingroup wstream - */ -int OTF_WStream_writeDefinitionComment( OTF_WStream* wstream, - const char* comment ); - -/** Write a DEFINITIONCOMMENT record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefinitionCommentEV() - * \ingroup wstream - */ -int OTF_WStream_writeDefinitionCommentKV( OTF_WStream* wstream, - const char* comment, OTF_KeyValueList* list ); - - -/** Write a DEFTIMERRESOLUTION record to stream 'wstream'. - * @see OTF_Writer_writeDefTimerResolution() - * \ingroup wstream - */ -int OTF_WStream_writeDefTimerResolution( OTF_WStream* wstream, - uint64_t ticksPerSecond ); - -/** Write a DEFTIMERRESOLUTION record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefTimerResolutionEV() - * \ingroup wstream - */ -int OTF_WStream_writeDefTimerResolutionKV( OTF_WStream* wstream, - uint64_t ticksPerSecond, OTF_KeyValueList* list ); - -/** Write a DEFPROCESS record to stream 'wstream'. - * @see OTF_Writer_writeDefProcess() - * \ingroup wstream - */ -int OTF_WStream_writeDefProcess( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t parent ); - -/** Write a DEFPROCESS record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefProcessKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefProcessKV( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t parent, OTF_KeyValueList* list ); - -/** Write a DEFPROCESSGROUP record to stream 'wstream'. - * @see OTF_Writer_writeDefProcessGroup() - * \ingroup wstream - */ -int OTF_WStream_writeDefProcessGroup( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t n, const uint32_t* array ); - -/** Write a DEFPROCESSGROUP record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefProcessGroupKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefProcessGroupKV( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t n, const uint32_t* array, OTF_KeyValueList* list ); - -/** Write a DEFATTRLIST record to stream 'wstream'. - * @see OTF_Writer_writeDefAttributeList() - * \ingroup wstream - */ -int OTF_WStream_writeDefAttributeList( OTF_WStream* wstream, uint32_t attr_token, - uint32_t num, OTF_ATTR_TYPE* array ); - -/** Write a DEFATTRLIST record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefAttributeListKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefAttributeListKV( OTF_WStream* wstream, uint32_t attr_token, - uint32_t num, OTF_ATTR_TYPE* array, OTF_KeyValueList* list ); - -/** Write a DEFPROCESSORGROUPATTR record to stream 'wstream'. - * @see OTF_Writer_writeDefAttributeList() - * \ingroup wstream - */ -int OTF_WStream_writeDefProcessOrGroupAttributes( OTF_WStream* wstream, - uint32_t proc_token, uint32_t attr_token ); - -/** Write a DEFPROCESSORGROUPATTR record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefAttributeListKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefProcessOrGroupAttributesKV( OTF_WStream* wstream, - uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList* list ); - -/** Write a DEFFUNCTION record to stream 'wstream'. - * @see OTF_Writer_writeDefFunction() - * \ingroup wstream - */ -int OTF_WStream_writeDefFunction( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t group, uint32_t scltoken ); - -/** Write a DEFFUNCTION record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefFunctionKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefFunctionKV( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t group, uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a DEFFUNCTIONGROUP record to stream 'wstream'. - * @see OTF_Writer_writeDefFunctionGroup() - * \ingroup wstream - */ -int OTF_WStream_writeDefFunctionGroup( OTF_WStream* wstream, - uint32_t deftoken, const char* name ); - -/** Write a DEFFUNCTIONGROUP record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefFunctionGroupKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefFunctionGroupKV( OTF_WStream* wstream, - uint32_t deftoken, const char* name, OTF_KeyValueList* list ); - -/** Write a DEFCOLLECTIVEOPERATION record to stream 'wstream'. - * @see OTF_Writer_writeDefCollectiveOperation() - * \ingroup wstream - */ -int OTF_WStream_writeDefCollectiveOperation( OTF_WStream* wstream, - uint32_t collOp, const char* name, uint32_t type ); - -/** Write a DEFCOLLECTIVEOPERATION record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefCollectiveOperationKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefCollectiveOperationKV( OTF_WStream* wstream, - uint32_t collOp, const char* name, uint32_t type, OTF_KeyValueList* list ); - -/** Write a DEFCOUNTER record to stream 'wstream'. - * @see OTF_Writer_writeDefCounter() - * \ingroup wstream - */ -int OTF_WStream_writeDefCounter( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t properties, uint32_t countergroup, - const char* unit ); - -/** Write a DEFCOUNTER record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefCounterKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefCounterKV( OTF_WStream* wstream, uint32_t deftoken, - const char* name, uint32_t properties, uint32_t countergroup, - const char* unit, OTF_KeyValueList* list ); - -/** Write a DEFCOUNTERGROUP record to stream 'wstream'. - * @see OTF_Writer_writeDefCounterGroup() - * \ingroup wstream - */ -int OTF_WStream_writeDefCounterGroup( OTF_WStream* wstream, - uint32_t deftoken, const char* name ); - -/** Write a DEFCOUNTERGROUP record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefCounterGroupKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefCounterGroupKV( OTF_WStream* wstream, - uint32_t deftoken, const char* name, OTF_KeyValueList* list ); - -/** Write a DEFSCL record to stream 'wstream'. - * @see OTF_Writer_writeDefScl() - * \ingroup wstream - */ -int OTF_WStream_writeDefScl( OTF_WStream* wstream, uint32_t deftoken, - uint32_t sclfile, uint32_t sclline ); - -/** Write a DEFSCL record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefSclKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefSclKV( OTF_WStream* wstream, uint32_t deftoken, - uint32_t sclfile, uint32_t sclline, OTF_KeyValueList* list ); - -/** Write a DEFSCLFILE record to stream 'wstream'. - * @see OTF_Writer_writeDefSclFile() - * \ingroup wstream - */ -int OTF_WStream_writeDefSclFile( OTF_WStream* wstream, - uint32_t deftoken, const char* filename ); - -/** Write a DEFSCLFILE record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefSclFileKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefSclFileKV( OTF_WStream* wstream, - uint32_t deftoken, const char* filename, OTF_KeyValueList* list ); - -/** Write a DEFCREATOR record to stream 'wstream'. - * @see OTF_Writer_writeDefCreator() - * \ingroup wstream - */ -int OTF_WStream_writeDefCreator( OTF_WStream* wstream, const char* creator ); - -/** Write a DEFCREATOR record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefCreatorKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefCreatorKV( OTF_WStream* wstream, const char* creator, OTF_KeyValueList* list ); - -/** Write a DEFVERSION record to stream 'wstream'. - * @see OTF_Writer_writeOtfVersion() - * \ingroup wstream - */ -int OTF_WStream_writeOtfVersion( OTF_WStream* wstream ); - -/** Write a DEFFILE record to stream 'wstream'. - * @see OTF_Writer_writeDefFile() - * \ingroup wstream - */ -int OTF_WStream_writeDefFile( OTF_WStream* wstream, uint32_t token, - const char* name, uint32_t group ); - -/** Write a DEFFILE record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefFileKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefFileKV( OTF_WStream* wstream, uint32_t token, - const char* name, uint32_t group, OTF_KeyValueList* list ); - -/** Write a DEFFILEGROUP record to stream 'wstream'. - * @see OTF_Writer_writeDefFileGroup() - * \ingroup wstream - */ -int OTF_WStream_writeDefFileGroup( OTF_WStream* wstream, uint32_t token, - const char* name ); - -/** Write a DEFFILEGROUP record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefFileGroupKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefFileGroupKV( OTF_WStream* wstream, uint32_t token, - const char* name, OTF_KeyValueList* list ); - -/** Write a DEFKEYVALUE record to stream 'wstream'. - * @see OTF_Writer_writeDefKeyValue() - * \ingroup wstream - */ -int OTF_WStream_writeDefKeyValue( OTF_WStream* wstream, uint32_t key, - OTF_Type type, const char* name, const char *description ); - -/** Write a DEFKEYVALUE record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefKeyValueKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefKeyValueKV( OTF_WStream* wstream, uint32_t key, OTF_Type type, - const char* name, const char *description, OTF_KeyValueList* list ); - - -/* *** event record write handlers *** ************************************* */ - - -/** Write a NOOP record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeNoOpKV() - * \ingroup wstream - */ -int OTF_WStream_writeNoOpKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, OTF_KeyValueList* list ); - -/** Write a ENTER record to stream 'wstream'. - * @see OTF_Writer_writeEnter() - * \ingroup wstream - */ -int OTF_WStream_writeEnter( OTF_WStream* wstream, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken ); - -/** Write a ENTER record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeEnterKV() - * \ingroup wstream - */ -int OTF_WStream_writeEnterKV( OTF_WStream* wstream, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a RECEIVE record to stream 'wstream'. - * @see OTF_Writer_writeRecvMsg() - * \ingroup wstream - */ -int OTF_WStream_writeRecvMsg( OTF_WStream* wstream, uint64_t time, - uint32_t receiver, uint32_t sender, uint32_t communicator, - uint32_t msgtype, uint32_t msglength, uint32_t scltoken ); - -/** Write a RECEIVE record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeRecvMsgKV() - * \ingroup wstream - */ -int OTF_WStream_writeRecvMsgKV( OTF_WStream* wstream, uint64_t time, - uint32_t receiver, uint32_t sender, uint32_t communicator, - uint32_t msgtype, uint32_t msglength, uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a SEND record to stream 'wstream'. - * @see OTF_Writer_writeSendMsg() - * \ingroup wstream - */ -int OTF_WStream_writeSendMsg( OTF_WStream* wstream, uint64_t time, - uint32_t sender, uint32_t receiver, uint32_t communicator, - uint32_t msgtype, uint32_t msglength, uint32_t scltoken ); - -/** Write a SEND record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeSendMsgKV() - * \ingroup wstream - */ -int OTF_WStream_writeSendMsgKV( OTF_WStream* wstream, uint64_t time, - uint32_t sender, uint32_t receiver, uint32_t communicator, - uint32_t msgtype, uint32_t msglength, uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a LEAVE record to stream 'wstream'. - * @see OTF_Writer_writeLeave() - * \ingroup wstream - */ -int OTF_WStream_writeLeave( OTF_WStream* wstream, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken ); - -/** Write a LEAVE record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeLeaveKV() - * \ingroup wstream - */ -int OTF_WStream_writeLeaveKV( OTF_WStream* wstream, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a COUNTER record to stream 'wstream'. - * @see OTF_Writer_writeCounter() - * \ingroup wstream - */ -int OTF_WStream_writeCounter( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t counter_token, uint64_t value ); - -/** Write a COUNTER record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeCounterKV() - * \ingroup wstream - */ -int OTF_WStream_writeCounterKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t counter_token, uint64_t value, OTF_KeyValueList* list ); - -/** Write a COLLOP record to stream 'wstream'. - * @deprecated This event record has been deprecated due to usage constraints. - * Please use OTF_WStream_writeBeginCollectiveOperation() and - * OTF_WStream_writeEndCollectiveOperation(), repectively. - * \ingroup wstream */ -int OTF_WStream_writeCollectiveOperation( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t functionToken, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken ); - -/** Write a COLLOP record including an OTF_KeyValueList to stream 'wstream'. - * @deprecated This event record has been deprecated due to usage constraints. - * Please use OTF_WStream_writeBeginCollectiveOperationKV() and - * OTF_WStream_writeEndCollectiveOperationKV(), repectively. - * \ingroup wstream */ -int OTF_WStream_writeCollectiveOperationKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t functionToken, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a COLLOPBEGIN record to stream 'wstream'. - * @see OTF_Writer_writeBeginCollectiveOperation() - * \ingroup wstream - */ -int OTF_WStream_writeBeginCollectiveOperation( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken ); - -/** Write a COLLOPBEGIN record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeBeginCollectiveOperationKV() - * \ingroup wstream - */ -int OTF_WStream_writeBeginCollectiveOperationKV( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a COLLOPEND record to stream 'wstream'. - * @see OTF_Writer_writeEndCollectiveOperation() - * \ingroup wstream - */ -int OTF_WStream_writeEndCollectiveOperation( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint64_t matchingId ); - -/** Write a COLLOPEND record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeEndCollectiveOperationKV() - * \ingroup wstream - */ -int OTF_WStream_writeEndCollectiveOperationKV( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint64_t matchingId, OTF_KeyValueList* list ); - -/** Write a #EVTCOMMENT record to stream 'wstream'. - * @see OTF_Writer_writeEventComment() - * \ingroup wstream - */ -int OTF_WStream_writeEventComment( OTF_WStream* wstream, uint64_t time, - uint32_t process, const char* comment ); - -/** Write a #EVTCOMMENT record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeEventCommentKV() - * \ingroup wstream - */ -int OTF_WStream_writeEventCommentKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* list ); - -/** Write a PROCESSBEGIN record to stream 'wstream'. - * @see OTF_Writer_writeBeginProcess() - * \ingroup wstream - */ -int OTF_WStream_writeBeginProcess( OTF_WStream* wstream, uint64_t time, - uint32_t process ); - -/** Write a PROCESSBEGIN record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeBeginProcessKV() - * \ingroup wstream - */ -int OTF_WStream_writeBeginProcessKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, OTF_KeyValueList* list ); - -/** Write a PROCESSEND record to stream 'wstream'. - * @see OTF_Writer_writeEndProcess() - * \ingroup wstream - */ -int OTF_WStream_writeEndProcess( OTF_WStream* wstream, uint64_t time, - uint32_t process ); - -/** Write a PROCESSEND record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeEndProcessKV() - * \ingroup wstream - */ -int OTF_WStream_writeEndProcessKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, OTF_KeyValueList* list ); - -/** Write a FILEOP record to stream 'wstream'. - * @deprecated This event record has been deprecated due to usage constraints. - * Please use OTF_WStream_writeBeginFileOperation() and - * OTF_WStream_writeEndFileOperation(), respectively. - * \ingroup wstream */ -int OTF_WStream_writeFileOperation( OTF_WStream* wstream, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t handleid, uint32_t operation, - uint64_t bytes, uint64_t duration, uint32_t source ); - -/** Write a FILEOP record including an OTF_KeyValueList to stream 'wstream'. - * @deprecated This event record has been deprecated due to usage constraints. - * Please use OTF_WStream_writeBeginFileOperationKV() and - * OTF_WStream_writeEndFileOperationKV(), respectively. - * \ingroup wstream */ -int OTF_WStream_writeFileOperationKV( OTF_WStream* wstream, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t handleid, uint32_t operation, - uint64_t bytes, uint64_t duration, uint32_t source, OTF_KeyValueList* list ); - -/** Write a FILEOPBEGIN record to stream 'wstream'. - * @see OTF_Writer_writeBeginFileOperation() - * \ingroup wstream - */ -int OTF_WStream_writeBeginFileOperation( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint64_t matchingId, uint32_t scltoken ); - -/** Write a FILEOPBEGIN record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeBeginFileOperationKV() - * \ingroup wstream - */ -int OTF_WStream_writeBeginFileOperationKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a FILEOPEND record to stream 'wstream'. - * @see OTF_Writer_writeEndFileOperation() - * \ingroup wstream - */ -int OTF_WStream_writeEndFileOperation( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t fileid, uint64_t matchingId, - uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken ); - -/** Write a FILEOPEND record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeEndFileOperationKV() - * \ingroup wstream - */ -int OTF_WStream_writeEndFileOperationKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t fileid, uint64_t matchingId, - uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a RMAPUT record to stream 'wstream'. - * @see OTF_Writer_writeRMAPut() - * \ingroup wstream - */ -int OTF_WStream_writeRMAPut( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken ); - -/** Write a RMAPUT record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeRMAPutKV() - * \ingroup wstream - */ -int OTF_WStream_writeRMAPutKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a RMAPUTRE record to stream 'wstream'. - * @see OTF_Writer_writeRMAPutRemoteEnd() - * \ingroup wstream - */ -int OTF_WStream_writeRMAPutRemoteEnd( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken ); - -/** Write a RMAPUTRE record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeRMAPutRemoteEndKV() - * \ingroup wstream - */ -int OTF_WStream_writeRMAPutRemoteEndKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a RMAGET record to stream 'wstream'. - * @see OTF_Writer_writeRMAGet() - * \ingroup wstream - */ -int OTF_WStream_writeRMAGet( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken ); - -/** Write a RMAGET record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeRMAGetKV() - * \ingroup wstream - */ -int OTF_WStream_writeRMAGetKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a RMAEND record to stream 'wstream'. - * @see OTF_Writer_writeRMAEnd() - * \ingroup wstream - */ -int OTF_WStream_writeRMAEnd( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t remote, uint32_t communicator, uint32_t tag, - uint32_t scltoken ); - -/** Write a RMAEND record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeRMAEndKV() - * \ingroup wstream - */ -int OTF_WStream_writeRMAEndKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, uint32_t remote, uint32_t communicator, uint32_t tag, - uint32_t scltoken, OTF_KeyValueList* list ); - - -/* *** public snapshot record write handlers *** */ - - -/** Write a #TCOMMENT record to stream 'wstream'. - * @see OTF_Writer_writeSnapshotComment() - * \ingroup wstream - */ -int OTF_WStream_writeSnapshotComment( OTF_WStream* wstream, uint64_t time, - uint32_t process, const char* comment ); - -/** Write a #TCOMMENT record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeSnapshotCommentKV() - * \ingroup wstream - */ -int OTF_WStream_writeSnapshotCommentKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* list ); - -/** Write a TENTER record to stream 'wstream'. - * @see OTF_Writer_writeEnterSnapshot() - * \ingroup wstream - */ -int OTF_WStream_writeEnterSnapshot( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t statetoken, uint32_t cpuid, uint32_t scltoken ); - -/** Write a TENTER record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeEnterSnapshotKV() - * \ingroup wstream - */ -int OTF_WStream_writeEnterSnapshotKV( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList* list ); - -/** Write a TSEND record to stream 'wstream'. - * @see OTF_Writer_writeSendSnapshot() - * \ingroup wstream - */ -int OTF_WStream_writeSendSnapshot( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t type, uint32_t length, uint32_t source ); - -/** Write a TSEND record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeSendSnapshotKV() - * \ingroup wstream - */ -int OTF_WStream_writeSendSnapshotKV( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t type, uint32_t length, - uint32_t source, OTF_KeyValueList* list ); - -/** Write a TOPENFILE record to stream 'wstream'. - * @see OTF_Writer_writeOpenFileSnapshot() - * \ingroup wstream - */ -int OTF_WStream_writeOpenFileSnapshot( OTF_WStream* wstream,uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, - uint32_t source ); - -/** Write a TOPENFILE record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeOpenFileSnapshotKV() - * \ingroup wstream - */ -int OTF_WStream_writeOpenFileSnapshotKV( OTF_WStream* wstream,uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, - uint32_t source, OTF_KeyValueList* list ); - - -/** Write a TBEGINCOLLOP record to stream 'wstream'. - * @see OTF_Writer_writeBeginCollopSnapshot() - * \ingroup wstream - */ -int OTF_WStream_writeBeginCollopSnapshot( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t process, uint32_t collOp, uint64_t matchingId, - uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received, - uint32_t scltoken ); - - -/** Write a TBEGINCOLLOP record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeBeginCollopSnapshotKV() - * \ingroup wstream - */ -int OTF_WStream_writeBeginCollopSnapshotKV( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t process, uint32_t collOp, uint64_t matchingId, - uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received, - uint32_t scltoken, OTF_KeyValueList *list ); - - -/** Write a TBEGINFILEOP record to stream 'wstream'. - * @see OTF_Writer_writeBeginFileOpSnapshot() - * \ingroup wstream - */ -int OTF_WStream_writeBeginFileOpSnapshot( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, uint32_t scltoken ); - -/** Write a TBEGINFILEOP record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeBeginFileOpSnapshotKV() - * \ingroup wstream - */ -int OTF_WStream_writeBeginFileOpSnapshotKV( OTF_WStream* wstream, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, - uint32_t scltoken, OTF_KeyValueList *list ); - - - -/* *** public statistics record write handlers *** */ - - -/** Write a SUMCOMMENT record to stream 'wstream'. - * @see OTF_Writer_writeSummaryComment() - * \ingroup wstream - */ -int OTF_WStream_writeSummaryComment( OTF_WStream* wstream, uint64_t time, - uint32_t process, const char* comment ); - -/** Write a SUMCOMMENT record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeSummaryCommentKV() - * \ingroup wstream - */ -int OTF_WStream_writeSummaryCommentKV( OTF_WStream* wstream, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* list ); - -/** Write a SUMFUNCTION record to stream 'wstream'. - * @see OTF_Writer_writeFunctionSummary() - * \ingroup wstream - */ -int OTF_WStream_writeFunctionSummary( OTF_WStream* wstream, - uint64_t time, uint32_t function, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime ); - -/** Write a SUMFUNCTION record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeFunctionSummaryKV() - * \ingroup wstream - */ -int OTF_WStream_writeFunctionSummaryKV( OTF_WStream* wstream, - uint64_t time, uint32_t function, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, OTF_KeyValueList* list ); - -/** Write a SUMFUNCTIONGROUP record to stream 'wstream'. - * @see OTF_Writer_writeFunctionGroupSummary() - * \ingroup wstream - */ -int OTF_WStream_writeFunctionGroupSummary( OTF_WStream* wstream, - uint64_t time, uint32_t functiongroup, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime ); - -/** Write a SUMFUNCTIONGROUP record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeFunctionGroupSummaryKV() - * \ingroup wstream - */ -int OTF_WStream_writeFunctionGroupSummaryKV( OTF_WStream* wstream, - uint64_t time, uint32_t functiongroup, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, OTF_KeyValueList* list ); - -/** Write a SUMMESSAGE record to stream 'wstream'. - * @see OTF_Writer_writeMessageSummary() - * \ingroup wstream - */ -int OTF_WStream_writeMessageSummary( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t peer, - uint32_t comm, uint32_t tag, uint64_t number_sent, uint64_t number_recved, - uint64_t bytes_sent, uint64_t bytes_recved ); - -/** Write a SUMMESSAGE record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeMessageSummaryKV() - * \ingroup wstream - */ -int OTF_WStream_writeMessageSummaryKV( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t peer, - uint32_t comm, uint32_t tag, uint64_t number_sent, uint64_t number_recved, - uint64_t bytes_sent, uint64_t bytes_recved, OTF_KeyValueList* list ); - -/** Write a COLLOPMESSAGE record to stream 'wstream'. - * @see OTF_Writer_writeCollopSummary() - * \ingroup wstream - */ -int OTF_WStream_writeCollopSummary( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, - uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, uint64_t bytes_recved ); - -/** Write a COLLOPMESSAGE record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeCollopSummaryKV() - * \ingroup wstream - */ -int OTF_WStream_writeCollopSummaryKV( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, - uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, uint64_t bytes_recved, OTF_KeyValueList* list ); - -/** Write a SUMFILEOPERATION record to stream 'wstream'. - * @see OTF_Writer_writeFileOperationSummary() - * \ingroup wstream - */ -int OTF_WStream_writeFileOperationSummary( OTF_WStream* wstream, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite ); - -/** Write a SUMFILEOPERATION record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeFileOperationSummaryKV() - * \ingroup wstream - */ -int OTF_WStream_writeFileOperationSummaryKV( OTF_WStream* wstream, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList* list ); - -/** Write a SUMFILEGROUPOPERATION record to stream 'wstream'. - * @see OTF_Writer_writeFileGroupOperationSummary() - * \ingroup wstream - */ -int OTF_WStream_writeFileGroupOperationSummary( OTF_WStream* wstream, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite ); - -/** Write a SUMFILEGROUPOPERATION record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeFileGroupOperationSummaryKV() - * \ingroup wstream - */ -int OTF_WStream_writeFileGroupOperationSummaryKV( OTF_WStream* wstream, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList* list ); - -/* -int OTF_WStream_writeCounterSummary( OTF_WStream* wstream, - uint64_t time, uint32_t process, - uint32_t counter, uint64_t value ); - -int OTF_WStream_writeCollOpSummary( OTF_WStream* wstream, - uint64_t time, uint32_t process, uint32_t root, - uint64_t bytes_sent, uint64_t bytes_recved ); -*/ - - - -/* *** marker record types *** */ - -/** Write a def marker record to stream 'wstream'. - * @see OTF_Writer_writeDefMarker() - * \ingroup wstream - */ -int OTF_WStream_writeDefMarker( OTF_WStream* wstream, - uint32_t token, - const char* name, - uint32_t type ); - -/** Write a def marker record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeDefMarkerKV() - * \ingroup wstream - */ -int OTF_WStream_writeDefMarkerKV( OTF_WStream* wstream, - uint32_t token, - const char* name, - uint32_t type, - OTF_KeyValueList* list ); - -/** Write a marker record to stream 'wstream'. - * @see OTF_Writer_writeMarker() - * \ingroup wstream - */ -int OTF_WStream_writeMarker( OTF_WStream* wstream, - uint64_t time, - uint32_t process, - uint32_t token, - const char* text ); - -/** Write a marker record including an OTF_KeyValueList to stream 'wstream'. - * @see OTF_Writer_writeMarkerKV() - * \ingroup wstream - */ -int OTF_WStream_writeMarkerKV( OTF_WStream* wstream, - uint64_t time, - uint32_t process, - uint32_t token, - const char* text, - OTF_KeyValueList* list ); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_WSTREAM_H */ - diff --git a/externals/otf/otflib/OTF_Writer.c b/externals/otf/otflib/OTF_Writer.c deleted file mode 100644 index 57019446d46169c81d2e1edcdf533b5cf9427eb1..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Writer.c +++ /dev/null @@ -1,1993 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "OTF_Platform.h" -#include "OTF_Definitions.h" - -#include "OTF_Writer.h" -#include "OTF_Platform.h" -#include "OTF_Errno.h" - -#include <assert.h> - - -/** Holds the data objects needed for global trace creation. */ -struct struct_OTF_Writer { - - /** All files will start with this prefix. */ - char* namestub; - - /** Holds the current number of streams. */ - uint32_t n; - - /** Current size of array 'streams'. */ - uint32_t s; - - /** Sorted array of streams. */ - OTF_WStream** streams; - - /** Maximum number of streams allowed including the special stream - 0. This applies if the Writer assigns processes to streams by - its own devices. The number of streams might be higher if - there are explicit mappings enforced with - OTF_Writer_assignProcess() for some processes after automatic - mappings took effect. */ - uint32_t m; - - /** Master control structure. Handles the mapping of processes to - streams. */ - OTF_MasterControl* mc; - - /** Default size of buffers managed by this Writer. */ - uint32_t buffersizes; - - /** Default output format */ - uint32_t format; - - /** File handle manager. Handles the re-usage of file handles - in a thread safe way. */ - OTF_FileManager* manager; - -#ifdef HAVE_ZLIB - /** Default compression type of buffers managed by this writer */ - OTF_FileCompression compression; - - /** Default size of zbuffers managed by this reader. */ - uint32_t zbuffersizes; -#endif /* HAVE_ZLIB */ - - /** Has the OtfVersion record been written? 1= yes 0= no */ - uint32_t versionWritten; -}; - - -/** constructor - internal use only */ -int OTF_Writer_init( OTF_Writer* writer ); - -/** destructor - internal use only */ -int OTF_Writer_finish( OTF_Writer* writer ); - - -/* ************************************************************************* */ - -int OTF_Writer_init( OTF_Writer* writer ) { - - - writer->namestub= NULL; - - writer->n= 0; - writer->s= 0; - writer->streams= NULL; - - writer->m= 0; - - writer->mc= NULL; - - writer->buffersizes= 1024*1024; - - writer->format= OTF_WSTREAM_FORMAT_SHORT; - -#ifdef HAVE_ZLIB - writer->compression= 0; - writer->zbuffersizes= 1024 *10; -#endif /* HAVE_ZLIB */ - - writer->versionWritten= 0; - - return 1; -} - - -int OTF_Writer_finish( OTF_Writer* writer ) { - - - int tmpret; - int ret= 1; - tmpret= OTF_MasterControl_write( writer->mc, writer->namestub ); - if( 0 == tmpret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_write() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - ret&= tmpret; - - tmpret= OTF_Writer_closeAllStreams( writer ); - if( 0 == tmpret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Writer_closeAllStreams() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - } - ret&= tmpret; - - free( writer->namestub ); - writer->namestub= NULL; - - free( writer->streams ); - writer->streams= NULL; - writer->s= 0; - - OTF_MasterControl_close( writer->mc ); - -#ifdef HAVE_ZLIB - writer->compression= 0; - writer->zbuffersizes= 0; -#endif /* HAVE_ZLIB */ - - return ret; -} - - -OTF_Writer* OTF_Writer_open( const char* namestub, uint32_t m, OTF_FileManager* manager ) { - - - OTF_Writer* ret= NULL; - - if( NULL == manager ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "manager has not been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - ret= (OTF_Writer*) malloc( sizeof(OTF_Writer) ); - if( NULL == ret ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - - OTF_Writer_init( ret ); - - ret->m= ( 0 < m ) ? m : ((uint32_t) -1); - - ret->namestub= OTF_stripFilename( namestub ); - - ret->manager= manager; - - ret->mc= OTF_MasterControl_new( ret->manager ); - if( NULL == ret->mc ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_new() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( ret->namestub ); - ret->namestub= NULL; - free( ret ); - ret= NULL; - - return NULL; - } - - return ret; -} - - -int OTF_Writer_close( OTF_Writer* writer ) { - - - if( NULL == writer ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "writer has not been specified.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - if( 0 == OTF_Writer_finish( writer ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_Writer_finish() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - free( writer ); - writer = NULL; - return 0; - } - - free( writer ); - writer = NULL; - - return 1; -} - - -int OTF_Writer_setCompression( OTF_Writer* writer, OTF_FileCompression - compression ) { - - -#ifdef HAVE_ZLIB - if ( compression <= 9 ) { - - writer->compression = compression; - - return 1; - - } else { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "compression is no expected value (%u). ignored.\n", - __FUNCTION__, __FILE__, __LINE__, compression ); - - return 0; - } - -#else /* HAVE_ZLIB */ - - if( 0 == compression ) { - - return 1; - - } else { - - return 0; - } - -#endif /* HAVE_ZLIB */ -} - -OTF_FileCompression OTF_Writer_getCompression( OTF_Writer* writer ) { - - -#ifdef HAVE_ZLIB - return writer->compression; -#else /* HAVE_ZLIB */ - return 0; -#endif /* HAVE_ZLIB */ -} - - -void OTF_Writer_setBufferSizes( OTF_Writer* writer, uint32_t size ) { - - - if ( 50 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "intended buffer size %u is too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - return; - - } else if ( 500 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u is very small, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } else if ( 10 * 1024 *1024 < size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u is rather big, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - } - - writer->buffersizes= size; -} - - -uint32_t OTF_Writer_getBufferSizes( OTF_Writer* writer ) { - - - return writer->buffersizes; -} - - -void OTF_Writer_setZBufferSizes( OTF_Writer* writer, uint32_t size ) { - - -#ifdef HAVE_ZLIB - - if ( 32 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "intended zbuffer size %u is too small, rejected.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - return; - - } else if ( 512 > size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u is very small, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } else if ( 10 * 1024 *1024 < size ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "buffer size %u is rather big, accepted though.\n", - __FUNCTION__, __FILE__, __LINE__, size ); - - } - - writer->zbuffersizes= size; - -#endif /* HAVE_ZLIB */ -} - - -uint32_t OTF_Writer_getZBufferSizes( OTF_Writer* writer ) { - - -#ifdef HAVE_ZLIB - return writer->zbuffersizes; -#else /* HAVE_ZLIB */ - return 0; -#endif /* HAVE_ZLIB */ -} - - -void OTF_Writer_setFormat( OTF_Writer* writer, uint32_t format ) { - - - if ( format > 1 ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "unknown ouput format chosen.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - } - - writer->format= format; -} - - -uint32_t OTF_Writer_getFormat( OTF_Writer* writer ) { - - - return writer->format; -} - - -OTF_WStream* OTF_Writer_getStream( OTF_Writer* writer, uint32_t streamId ) { - - - uint32_t a; - uint32_t b; - uint32_t c; - - uint32_t i; - - - /* search if already present */ - - a= 0; - b= writer->n; - - if ( 0 < writer->n ) { - - - if ( streamId == writer->streams[0]->id ) { - - return writer->streams[0]; - } - - if ( streamId == writer->streams[b-1]->id ) { - - return writer->streams[b-1]; - } - - - while ( a < b ) { - - c= ( a + b ) / 2; - - if ( streamId == writer->streams[c]->id ) { - - /* found */ - return writer->streams[c]; - } - - if ( streamId < writer->streams[c]->id ) { - - /* [a,c) */ - b= c; - - } else { - - /* [c+1,b) */ - a= c+1; - } - } - } - - - /* not found, create & append at position 'a' */ - - /* - OTF_fprintf(stderr," at %u\n", a ); - */ - - if ( writer->s <= writer->n ) { - - writer->s += 10; - writer->streams= (OTF_WStream**) realloc( writer->streams, - writer->s * sizeof(OTF_WStream*) ); - if( NULL == writer->streams ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no memory left.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return NULL; - } - } - - for ( i= writer->n; i > a; --i ) { - - writer->streams[i]= writer->streams[i-1]; - } - - writer->streams[a]= OTF_WStream_open( writer->namestub, streamId, writer->manager ); - -#ifdef HAVE_ZLIB - OTF_WStream_setCompression( writer->streams[a], writer->compression ); - OTF_WStream_setZBufferSizes( writer->streams[a], writer->zbuffersizes ); -#endif /* HAVE_ZLIB */ - - OTF_WStream_setBufferSizes( writer->streams[a], writer->buffersizes ); - OTF_WStream_setFormat( writer->streams[a], writer->format ); - - ++(writer->n); - - - return writer->streams[a]; -} - - -uint32_t OTF_Writer_assignProcess( OTF_Writer* writer, - uint32_t process, uint32_t stream ) { - - - if ( 0 == stream ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "stream id must not be '0'.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - if( 0 == OTF_MasterControl_append( writer->mc, stream, process ) ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "OTF_MasterControl_append() failed.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 0; - } - - return 1; -} - - -uint32_t OTF_Writer_mapProcess( OTF_Writer* writer, uint32_t process ) { - - - uint32_t ret= OTF_MasterControl_mapReverse( writer->mc, process ); - uint32_t processes= (uint32_t) -1; - uint32_t n; - uint32_t i; - OTF_MapEntry* entry; - - - /* here there are some ways to handle the situation: - first, define a static stream id which all processes which are not - explicitly mapped go to ("ret= 0xff;"). - Second, add a new stream for the new process (if-branch below). - Third, append the process to any existing stream, for example to - the one with the fewest processes so far (else-branch below). */ - if ( 0 == ret ) { - - /* - OTF_fprintf( stderr, "OTF_Writer_mapProcess() %u unknown\n", process ); - */ - - ret= (uint32_t) -1; - - n= OTF_MasterControl_getCount( writer->mc ); - - if ( n < writer->m ) { - - /* add a new stream, add process */ - - ret= OTF_MasterControl_getNewStreamId( writer->mc ); - - } else { - - /* if no streams are present the former branch - must take care!*/ - if( 0 >= n ) { - - OTF_fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "no processes/stream have been defined.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - assert (0); - } - - /* find stream with fewest processes and - add there */ - - for ( i = 0; i < n; ++i ) { - - entry = OTF_MasterControl_getEntryByIndex( writer->mc, i ); - - if ( entry->n < processes ) { - - processes = entry->n; - ret = entry->argument; - } - } - - } - - assert( (uint32_t) -1 != ret ); - - OTF_Writer_assignProcess( writer, process, ret ); - } - - - return ret; -} - - -OTF_MasterControl* OTF_Writer_getMasterControl( OTF_Writer* writer ) { - - - return writer->mc; -} - - -void OTF_Writer_setMasterControl( OTF_Writer* writer, OTF_MasterControl* mc ) { - - - OTF_MasterControl_close( writer->mc ); - - writer->mc= mc; -} - - -/* *** definition record write handlers *** ******************************** */ - - -int OTF_Writer_writeDefinitionComment( OTF_Writer* writer, uint32_t streamid, - const char* comment ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefinitionComment( stream, comment ); -} - -int OTF_Writer_writeDefinitionCommentKV( OTF_Writer* writer, uint32_t streamid, - const char* comment, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefinitionCommentKV( stream, comment, list ); -} - - -int OTF_Writer_writeDefTimerResolution( OTF_Writer* writer, uint32_t streamid, - uint64_t ticksPerSecond ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefTimerResolution( stream, ticksPerSecond ); -} - -int OTF_Writer_writeDefTimerResolutionKV( OTF_Writer* writer, uint32_t streamid, - uint64_t ticksPerSecond, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefTimerResolutionKV( stream, ticksPerSecond, list ); -} - - -int OTF_Writer_writeDefProcess( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t parent ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefProcess( stream, deftoken, name, parent ); -} - -int OTF_Writer_writeDefProcessKV( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t parent, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefProcessKV( stream, deftoken, name, parent, list ); -} - - -int OTF_Writer_writeDefProcessGroup( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t n, - const uint32_t* array ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefProcessGroup( stream, deftoken, - name, n, (uint32_t*) array ); -} - -int OTF_Writer_writeDefProcessGroupKV( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t n, - const uint32_t* array, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefProcessGroupKV( stream, deftoken, - name, n, (uint32_t*) array, list ); -} - - -int OTF_Writer_writeDefAttributeList ( OTF_Writer* writer, uint32_t streamid, - uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE* array ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefAttributeList( stream, attr_token, num, array ); -} - -int OTF_Writer_writeDefAttributeListKV ( OTF_Writer* writer, uint32_t streamid, - uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE* array, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefAttributeListKV( stream, attr_token, num, array, list ); -} - - -int OTF_Writer_writeDefProcessOrGroupAttributes( OTF_Writer* writer, uint32_t streamid, - uint32_t proc_token, uint32_t attr_token ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefProcessOrGroupAttributes( stream, proc_token, attr_token ); -} - -int OTF_Writer_writeDefProcessOrGroupAttributesKV( OTF_Writer* writer, uint32_t streamid, - uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefProcessOrGroupAttributesKV( stream, proc_token, attr_token, list ); -} - - -int OTF_Writer_writeDefFunction( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t group, uint32_t scltoken ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefFunction( stream, deftoken, name, group, - scltoken ); -} - -int OTF_Writer_writeDefFunctionKV( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t group, uint32_t scltoken, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefFunctionKV( stream, deftoken, name, group, - scltoken, list ); -} - - -int OTF_Writer_writeDefFunctionGroup( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* name ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefFunctionGroup( stream, deftoken, name ); -} - -int OTF_Writer_writeDefFunctionGroupKV( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* name, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefFunctionGroupKV( stream, deftoken, name, list ); -} - - -int OTF_Writer_writeDefCollectiveOperation( OTF_Writer* writer, uint32_t streamid, - uint32_t collective, const char* name, uint32_t type ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefCollectiveOperation( stream, collective, name, type ); -} - -int OTF_Writer_writeDefCollectiveOperationKV( OTF_Writer* writer, uint32_t streamid, - uint32_t collective, const char* name, uint32_t type, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefCollectiveOperationKV( stream, collective, name, type, list ); -} - - -int OTF_Writer_writeDefCounter( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t properties, - uint32_t countergroup, const char* unit ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefCounter( stream, deftoken, name, properties, - countergroup, unit ); -} - -int OTF_Writer_writeDefCounterKV( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t properties, - uint32_t countergroup, const char* unit, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefCounterKV( stream, deftoken, name, properties, - countergroup, unit, list ); -} - - -int OTF_Writer_writeDefCounterGroup( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* name ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefCounterGroup( stream, deftoken, name ); -} - -int OTF_Writer_writeDefCounterGroupKV( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* name, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefCounterGroupKV( stream, deftoken, name, list ); -} - - -int OTF_Writer_writeDefScl( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, uint32_t sclfile, uint32_t sclline ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefScl( stream, deftoken, sclfile, sclline ); -} - -int OTF_Writer_writeDefSclKV( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, uint32_t sclfile, uint32_t sclline, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefSclKV( stream, deftoken, sclfile, sclline, list ); -} - - -int OTF_Writer_writeDefSclFile( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* filename ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefSclFile( stream, deftoken, filename ); -} - -int OTF_Writer_writeDefSclFileKV( OTF_Writer* writer, uint32_t streamid, - uint32_t deftoken, const char* filename, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefSclFileKV( stream, deftoken, filename, list ); -} - - -/* depricated */ -int OTF_Writer_writeOtfVersion( OTF_Writer* writer, uint32_t streamid ) { - - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "calling depricated function. ignored.\n", - __FUNCTION__, __FILE__, __LINE__ ); - - return 1; -} - - -int OTF_Writer_writeDefCreator( OTF_Writer* writer, uint32_t streamid, - const char* creator ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefCreator( stream, creator ); -} - -int OTF_Writer_writeDefCreatorKV( OTF_Writer* writer, uint32_t streamid, - const char* creator, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefCreatorKV( stream, creator, list ); -} - - -int OTF_Writer_writeDefFile( OTF_Writer* writer, uint32_t streamid, - uint32_t token, const char* name, uint32_t group ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - return OTF_WStream_writeDefFile( stream, token, name, group ); -} - -int OTF_Writer_writeDefFileKV( OTF_Writer* writer, uint32_t streamid, - uint32_t token, const char* name, uint32_t group, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - return OTF_WStream_writeDefFileKV( stream, token, name, group, list ); -} - - -int OTF_Writer_writeDefFileGroup( OTF_Writer* writer, uint32_t streamid, - uint32_t token, const char* name ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - return OTF_WStream_writeDefFileGroup( stream, token, name ); -} - -int OTF_Writer_writeDefFileGroupKV( OTF_Writer* writer, uint32_t streamid, - uint32_t token, const char* name, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - return OTF_WStream_writeDefFileGroupKV( stream, token, name, list ); -} - - -int OTF_Writer_writeDefKeyValue( OTF_Writer* writer, uint32_t streamid, - uint32_t key, OTF_Type type, const char* name, const char *description ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefKeyValue( stream, key, type, name, description ); -} - -int OTF_Writer_writeDefKeyValueKV( OTF_Writer* writer, uint32_t streamid, uint32_t key, - OTF_Type type, const char* name, const char *description, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, (uint32_t) streamid ); - - if ( 0 == writer->versionWritten ) { - - OTF_WStream_writeOtfVersion( OTF_Writer_getStream( writer, 0 ) ); - writer->versionWritten= 1; - } - - return OTF_WStream_writeDefKeyValueKV( stream, key, type, name, description, list ); -} - - -/* *** Event Records *** ****************************************** */ - -int OTF_Writer_writeNoOpKV( OTF_Writer* writer, uint64_t time, - uint32_t process, OTF_KeyValueList* list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeNoOpKV( stream, time, - process, list ); -} - -int OTF_Writer_writeEnter( OTF_Writer* writer, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, cpuid ) ); - - - return OTF_WStream_writeEnter( stream, time, - statetoken, cpuid, scltoken ); -} - -int OTF_Writer_writeEnterKV( OTF_Writer* writer, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, - OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, cpuid ) ); - - - return OTF_WStream_writeEnterKV( stream, time, - statetoken, cpuid, scltoken, list ); -} - - -int OTF_Writer_writeRecvMsg( OTF_Writer* writer, uint64_t time, - uint32_t receiver, uint32_t sender, uint32_t communicator, - uint32_t msgtag, uint32_t msglength, uint32_t scltoken ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, receiver ) ); - - - return OTF_WStream_writeRecvMsg( stream, time, receiver, sender, - communicator, msgtag, msglength, scltoken ); -} - -int OTF_Writer_writeRecvMsgKV( OTF_Writer* writer, uint64_t time, - uint32_t receiver, uint32_t sender, uint32_t communicator, - uint32_t msgtag, uint32_t msglength, uint32_t scltoken, - OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, receiver ) ); - - - return OTF_WStream_writeRecvMsgKV( stream, time, receiver, sender, - communicator, msgtag, msglength, scltoken, list ); -} - - -int OTF_Writer_writeSendMsg( OTF_Writer* writer, uint64_t time, - uint32_t sender, uint32_t receiver, uint32_t communicator, - uint32_t msgtag, uint32_t msglength, uint32_t scltoken ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, sender ) ); - - - return OTF_WStream_writeSendMsg( stream, time, sender, receiver, - communicator, msgtag, msglength, scltoken ); -} - -int OTF_Writer_writeSendMsgKV( OTF_Writer* writer, uint64_t time, - uint32_t sender, uint32_t receiver, uint32_t communicator, - uint32_t msgtag, uint32_t msglength, uint32_t scltoken, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, sender ) ); - - - return OTF_WStream_writeSendMsgKV( stream, time, sender, receiver, - communicator, msgtag, msglength, scltoken, list ); -} - - -int OTF_Writer_writeLeave( OTF_Writer* writer, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, cpuid ) ); - - return OTF_WStream_writeLeave( stream, time, - statetoken, cpuid, scltoken ); -} - -int OTF_Writer_writeLeaveKV( OTF_Writer* writer, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, cpuid ) ); - - return OTF_WStream_writeLeaveKV( stream, time, - statetoken, cpuid, scltoken, list ); -} - - -int OTF_Writer_writeCounter( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t counter_token, uint64_t value ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeCounter( stream, time, - process, counter_token, value ); -} - -int OTF_Writer_writeCounterKV( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t counter_token, uint64_t value, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeCounterKV( stream, time, - process, counter_token, value, list ); -} - - -int OTF_Writer_writeCollectiveOperation( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t collOp, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeCollectiveOperation( stream, time, process, - collOp, communicator, rootprocess, sent, received, - duration, scltoken ); -} - -int OTF_Writer_writeCollectiveOperationKV( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t collOp, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeCollectiveOperationKV( stream, time, process, - collOp, communicator, rootprocess, sent, received, - duration, scltoken, list ); -} - - -int OTF_Writer_writeBeginCollectiveOperation( OTF_Writer* writer, - uint64_t time, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken ) -{ - OTF_WStream* stream = OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeBeginCollectiveOperation( stream, time, - process, collOp, matchingId, procGroup, rootProc, sent, - received, scltoken ); -} - -int OTF_Writer_writeBeginCollectiveOperationKV( OTF_Writer* writer, - uint64_t time, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken, OTF_KeyValueList *list ) -{ - OTF_WStream* stream = OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeBeginCollectiveOperationKV( stream, time, - process, collOp, matchingId, procGroup, rootProc, sent, - received, scltoken, list ); -} - - -int OTF_Writer_writeEndCollectiveOperation( OTF_Writer* writer, uint64_t time, - uint32_t process, uint64_t matchingId ) -{ - OTF_WStream* stream = OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeEndCollectiveOperation( stream, time, process, - matchingId ); -} - -int OTF_Writer_writeEndCollectiveOperationKV( OTF_Writer* writer, uint64_t time, - uint32_t process, uint64_t matchingId, OTF_KeyValueList *list ) -{ - OTF_WStream* stream = OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeEndCollectiveOperationKV( stream, time, process, - matchingId, list ); -} - - -int OTF_Writer_writeEventComment( OTF_Writer* writer, uint64_t time, - uint32_t process, const char* comment ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeEventComment( stream, time, process, - comment ); -} - -int OTF_Writer_writeEventCommentKV( OTF_Writer* writer, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeEventCommentKV( stream, time, process, - comment, list ); -} - - -int OTF_Writer_writeBeginProcess( OTF_Writer* writer, uint64_t time, - uint32_t process ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeBeginProcess( stream, time, process ); -} - -int OTF_Writer_writeBeginProcessKV( OTF_Writer* writer, uint64_t time, - uint32_t process, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeBeginProcessKV( stream, time, process, list ); -} - - -int OTF_Writer_writeEndProcess( OTF_Writer* writer, uint64_t time, - uint32_t process ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeEndProcess( stream, time, process ); -} - -int OTF_Writer_writeEndProcessKV( OTF_Writer* writer, uint64_t time, - uint32_t process, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeEndProcessKV( stream, time, process, list ); -} - - -int OTF_Writer_writeFileOperation( OTF_Writer* writer, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t handleid, uint32_t operation, uint64_t bytes, - uint64_t duration, uint32_t source ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeFileOperation( stream, time, fileid, process, - handleid, operation, bytes, duration, source ); -} - -int OTF_Writer_writeFileOperationKV( OTF_Writer* writer, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t handleid, uint32_t operation, uint64_t bytes, - uint64_t duration, uint32_t source, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeFileOperationKV( stream, time, fileid, process, - handleid, operation, bytes, duration, source, list ); -} - - -int OTF_Writer_writeBeginFileOperation( OTF_Writer* writer, uint64_t time, - uint32_t process, uint64_t matchingId, uint32_t scltoken ) -{ - OTF_WStream* stream = OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeBeginFileOperation( stream, time, process, - matchingId, scltoken ); -} - -int OTF_Writer_writeBeginFileOperationKV( OTF_Writer* writer, uint64_t time, - uint32_t process, uint64_t matchingId, uint32_t scltoken, - OTF_KeyValueList *list ) -{ - OTF_WStream* stream = OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeBeginFileOperationKV( stream, time, process, - matchingId, scltoken, list ); -} - - -int OTF_Writer_writeEndFileOperation( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t fileid, uint64_t matchingId, - uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken ) -{ - OTF_WStream* stream = OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeEndFileOperation( stream, time, process, fileid, - matchingId, handleId, operation, bytes, scltoken ); -} - -int OTF_Writer_writeEndFileOperationKV( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t fileid, uint64_t matchingId, - uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList *list ) -{ - OTF_WStream* stream = OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeEndFileOperationKV( stream, time, process, fileid, - matchingId, handleId, operation, bytes, scltoken, list ); -} - - -int OTF_Writer_writeRMAPut( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeRMAPut( stream, time, process, origin, target, - communicator, tag, bytes, scltoken ); -} - -int OTF_Writer_writeRMAPutKV( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeRMAPutKV( stream, time, process, origin, target, - communicator, tag, bytes, scltoken, list ); -} - - -int OTF_Writer_writeRMAPutRemoteEnd( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeRMAPutRemoteEnd( stream, time, process, - origin, target, communicator, tag, bytes, scltoken ); -} - -int OTF_Writer_writeRMAPutRemoteEndKV( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeRMAPutRemoteEndKV( stream, time, process, - origin, target, communicator, tag, bytes, scltoken, list ); -} - - -int OTF_Writer_writeRMAGet( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeRMAGet( stream, time, process, origin, target, - communicator, tag, bytes, scltoken ); -} - -int OTF_Writer_writeRMAGetKV( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeRMAGetKV( stream, time, process, origin, target, - communicator, tag, bytes, scltoken, list ); -} - - - -int OTF_Writer_writeRMAEnd( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t remote, uint32_t communicator, uint32_t tag, - uint32_t scltoken ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeRMAEnd( stream, time, process, remote, communicator, - tag, scltoken ); -} - -int OTF_Writer_writeRMAEndKV( OTF_Writer* writer, uint64_t time, - uint32_t process, uint32_t remote, uint32_t communicator, uint32_t tag, - uint32_t scltoken, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeRMAEndKV( stream, time, process, remote, communicator, - tag, scltoken, list ); -} - - -/* *** public snapshot record write handlers *** */ - - -int OTF_Writer_writeSnapshotComment( OTF_Writer* writer, uint64_t time, - uint32_t process, const char* comment ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeSnapshotComment( stream, time, process, - comment ); -} - -int OTF_Writer_writeSnapshotCommentKV( OTF_Writer* writer, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeSnapshotCommentKV( stream, time, process, - comment, list ); -} - - -int OTF_Writer_writeEnterSnapshot( OTF_Writer* writer, uint64_t time, - uint64_t originaltime, uint32_t function, - uint32_t process, uint32_t source ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeEnterSnapshot( stream, time, originaltime, - function, process, source ); -} - -int OTF_Writer_writeEnterSnapshotKV( OTF_Writer* writer, uint64_t time, - uint64_t originaltime, uint32_t function, - uint32_t process, uint32_t source, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeEnterSnapshotKV( stream, time, originaltime, - function, process, source, list ); -} - - -int OTF_Writer_writeSendSnapshot( OTF_Writer* writer, uint64_t time, - uint64_t originaltime, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t type, uint32_t length, uint32_t source ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, sender ) ); - - return OTF_WStream_writeSendSnapshot( stream, time, originaltime, - sender, receiver, procGroup, type, length, source ); -} - -int OTF_Writer_writeSendSnapshotKV( OTF_Writer* writer, uint64_t time, - uint64_t originaltime, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t type, uint32_t length, - uint32_t source, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, sender ) ); - - return OTF_WStream_writeSendSnapshotKV( stream, time, originaltime, - sender, receiver, procGroup, type, length, source, list ); -} - - -int OTF_Writer_writeOpenFileSnapshot( OTF_Writer* writer, uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, - uint32_t source ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeOpenFileSnapshot( stream, time, originaltime, - fileid, process, handleid, source ); -} - -int OTF_Writer_writeOpenFileSnapshotKV( OTF_Writer* writer, uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, - uint32_t source, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeOpenFileSnapshotKV( stream, time, originaltime, - fileid, process, handleid, source, list ); -} - -int OTF_Writer_writeBeginCollopSnapshot( OTF_Writer* writer, uint64_t time, - uint64_t originaltime, uint32_t process, uint32_t collOp, uint64_t matchingId, - uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received, - uint32_t scltoken ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeBeginCollopSnapshot( stream, time, originaltime, - process, collOp, matchingId, procGroup, rootProc, sent, received, - scltoken ); -} - -int OTF_Writer_writeBeginCollopSnapshotKV( OTF_Writer* writer, uint64_t time, - uint64_t originaltime, uint32_t process, uint32_t collOp, uint64_t matchingId, - uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received, - uint32_t scltoken, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeBeginCollopSnapshotKV( stream, time, originaltime, - process, collOp, matchingId, procGroup, rootProc, sent, received, - scltoken, list ); -} - -int OTF_Writer_writeBeginFileOpSnapshot( OTF_Writer* writer, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, uint32_t scltoken ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeBeginFileOpSnapshot( stream, time, originaltime, - process, matchingId, scltoken ); - -} - -int OTF_Writer_writeBeginFileOpSnapshotKV( OTF_Writer* writer, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, - uint32_t scltoken, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeBeginFileOpSnapshotKV( stream, time, originaltime, - process, matchingId, scltoken, list ); - -} - - - -/* *** public statistics record write handlers *** */ - - -int OTF_Writer_writeSummaryComment( OTF_Writer* writer, uint64_t time, - uint32_t process, const char* comment ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeSummaryComment( stream, time, process, - comment ); -} - -int OTF_Writer_writeSummaryCommentKV( OTF_Writer* writer, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeSummaryCommentKV( stream, time, process, - comment, list ); -} - - -int OTF_Writer_writeFunctionSummary( OTF_Writer* writer, - uint64_t time, uint32_t function, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeFunctionSummary( stream, - time, function, process, count, excltime, incltime ); -} - -int OTF_Writer_writeFunctionSummaryKV( OTF_Writer* writer, - uint64_t time, uint32_t function, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeFunctionSummaryKV( stream, - time, function, process, count, excltime, incltime, list ); -} - - -int OTF_Writer_writeFunctionGroupSummary( OTF_Writer* writer, - uint64_t time, uint32_t functiongroup, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeFunctionGroupSummary( stream, - time, functiongroup, process, count, excltime, incltime ); -} - -int OTF_Writer_writeFunctionGroupSummaryKV( OTF_Writer* writer, - uint64_t time, uint32_t functiongroup, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeFunctionGroupSummaryKV( stream, - time, functiongroup, process, count, excltime, incltime, list ); -} - - -int OTF_Writer_writeMessageSummary( OTF_Writer* writer, - uint64_t time, uint32_t process, uint32_t peer, - uint32_t comm, uint32_t tag, uint64_t number_sent, - uint64_t number_recved, uint64_t bytes_sent, - uint64_t bytes_recved ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeMessageSummary( stream, time, process, peer, comm, - tag, number_sent, number_recved, bytes_sent, bytes_recved ); -} - -int OTF_Writer_writeMessageSummaryKV( OTF_Writer* writer, - uint64_t time, uint32_t process, uint32_t peer, - uint32_t comm, uint32_t tag, uint64_t number_sent, - uint64_t number_recved, uint64_t bytes_sent, - uint64_t bytes_recved, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeMessageSummaryKV( stream, time, process, peer, comm, - tag, number_sent, number_recved, bytes_sent, bytes_recved, list ); -} - - -int OTF_Writer_writeCollopSummary( OTF_Writer* writer, - uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, - uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, - uint64_t bytes_recved ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeCollopSummary( stream, time, process, comm, - collective, number_sent, number_recved, bytes_sent, bytes_recved ); -} - -int OTF_Writer_writeCollopSummaryKV( OTF_Writer* writer, - uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, - uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, - uint64_t bytes_recved, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - return OTF_WStream_writeCollopSummaryKV( stream, time, process, comm, - collective, number_sent, number_recved, bytes_sent, bytes_recved, list ); -} - - -int OTF_Writer_writeFileOperationSummary( OTF_Writer* writer, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeFileOperationSummary( stream, time, fileid, process, - nopen, nclose, nread, nwrite, nseek, bytesread, byteswrite ); -} - -int OTF_Writer_writeFileOperationSummaryKV( OTF_Writer* writer, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeFileOperationSummaryKV( stream, time, fileid, process, - nopen, nclose, nread, nwrite, nseek, bytesread, byteswrite, list ); -} - - -int OTF_Writer_writeFileGroupOperationSummary( OTF_Writer* writer, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeFileGroupOperationSummary( stream, time, groupid, process, - nopen, nclose, nread, nwrite, nseek, bytesread, byteswrite ); -} - -int OTF_Writer_writeFileGroupOperationSummaryKV( OTF_Writer* writer, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList *list ) { - - - OTF_WStream* stream= OTF_Writer_getStream( writer, - OTF_Writer_mapProcess( writer, process ) ); - - - return OTF_WStream_writeFileGroupOperationSummaryKV( stream, time, groupid, process, - nopen, nclose, nread, nwrite, nseek, bytesread, byteswrite, list ); -} - - -int OTF_Writer_writeDefMarker( OTF_Writer* writer, uint32_t streamID, - uint32_t token, const char* name, uint32_t type ) { - - OTF_WStream* stream= OTF_Writer_getStream( writer, 0 ); - -#ifdef OTF_DEBUG - if ( 0 != streamID ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "streamID value of '%u' is ignored, '0' is used instead\n", - __FUNCTION__, __FILE__, __LINE__, streamID ); - } -#endif /* OTF_DEBUG */ - - return OTF_WStream_writeDefMarker( stream, token, name, type ); -} - -int OTF_Writer_writeDefMarkerKV( OTF_Writer* writer, uint32_t streamID, - uint32_t token, const char* name, uint32_t type, OTF_KeyValueList *list ) { - - OTF_WStream* stream= OTF_Writer_getStream( writer, 0 ); - -#ifdef OTF_DEBUG - if ( 0 != streamID ) { - - OTF_fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "streamID value of '%u' is ignored, '0' is used instead\n", - __FUNCTION__, __FILE__, __LINE__, streamID ); - } -#endif /* OTF_DEBUG */ - - return OTF_WStream_writeDefMarkerKV( stream, token, name, type, list ); -} - - -int OTF_Writer_writeMarker( OTF_Writer* writer, - uint64_t time, uint32_t process, uint32_t token, const char* text ) { - - OTF_WStream* stream= OTF_Writer_getStream( writer, 0 ); - - return OTF_WStream_writeMarker( stream, time, process, token, text ); -} - -int OTF_Writer_writeMarkerKV( OTF_Writer* writer, - uint64_t time, uint32_t process, uint32_t token, const char* text, OTF_KeyValueList *list ) { - - OTF_WStream* stream= OTF_Writer_getStream( writer, 0 ); - - return OTF_WStream_writeMarkerKV( stream, time, process, token, text, list ); -} - - -int OTF_Writer_closeAllStreams( OTF_Writer* writer ) { - - - int ret= 1; - uint32_t i; - - for ( i= 0; i < writer->n; ++i ) { - - ret&= OTF_WStream_close( writer->streams[i] ); - } - - writer->n= 0; - - return ret; -} - diff --git a/externals/otf/otflib/OTF_Writer.h b/externals/otf/otflib/OTF_Writer.h deleted file mode 100644 index 1d2d73147f667f818e6943996e99f3eb990b4b31..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_Writer.h +++ /dev/null @@ -1,2460 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_Writer.h - * - * @brief Transparently writes OTF traces which consist of multiple streams. - * - * \ingroup writer - */ - -/** \defgroup writer Writer Interface - * - * This interface should be used whenever a trace file is to be written as a - * whole. Therefore, an initial call to the OTF_Writer_open() function - * allows to specify a number of streams which are going to be used to - * automatically partition the recorded event data. OTF than takes over the - * duty of distributing the data on multiple files. - * - * \section writer_example A simple Example - * - * \code - * #include <assert.h> - * #include "otf.h" - * - * int main( int argc, char** argv ) { - * \endcode - * - * Declare a file manager and a writer. - * \code - * OTF_FileManager* manager; - * OTF_Writer* writer; - * \endcode - * - * Initialize the file manager. Open at most 100 OS files. - * \code - * manager= OTF_FileManager_open( 100 ); - * assert( manager ); - * \endcode - * - * Initialize the writer. Open file "test", writing one stream. - * \code - * writer = OTF_Writer_open( "test", 1, manager ); - * assert( writer ); - * \endcode - * - * Write some important Definition Records. - * Have a look at the specific functions to see what the parameters mean. - * \code - * OTF_Writer_writeDefTimerResolution( writer, 0, 1000 ); - * OTF_Writer_writeDefProcess( writer, 0, 1, "proc one", 0 ); - * OTF_Writer_writeDefFunctionGroup( writer, 0, 1000, "all functions" ); - * OTF_Writer_writeDefFunction( writer, 0, 1, "main", 1000, 0 ); - * \endcode - * - * - * Write an enter and a leave record. - * time = 10000, 20000 - * process = 1 - * function = 1 - * Sourcecode location doesn't matter, so it's zero. - * \code - * OTF_Writer_writeEnter( writer, 10000, 1, 1, 0 ); - * OTF_Writer_writeLeave( writer, 20000, 1, 1, 0 ); - * \endcode - * - * Clean up before exiting the program. - * \code - * OTF_Writer_close( writer ); - * OTF_FileManager_close( manager ); - * - * return 0; - * } - * \endcode - * - * Compile this using $ gcc -o test test.c `otfconfig --libs`. - * - */ - -#ifndef OTF_WRITER_H -#define OTF_WRITER_H - - -#include "OTF_MasterControl.h" -#include "OTF_FileManager.h" -#include "OTF_WBuffer.h" -#include "OTF_WStream.h" - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** writer object \ingroup writer */ -typedef struct struct_OTF_Writer OTF_Writer; - -/* *** public member functions *** */ - - -/** - * Create a new OTF_Writer instance with a given number of automatic streams. - * - * Setting the number of streams to 0 causes the OTF_Writer object to create a - * separate stream for each process. Important! Explicit calls to - * OTF_Writer_assignProcess() can lead to an overall number of streams which - * exceeds the initial number of streams in this call. - * OTF can reduce its file handle usage to a given number. Therefore, an - * initialized file manager instance is needed as parameter. - * See OTF_FileManager for further details. - * - * @param fileNamePrefix File name prefix which is going to be used by - * all sub-files which belong to the trace. - * @param numberOfStreams Initial number of independent data streams to - * be generated. - * @param fileManager File handle manager. - * - * - * @return Initialized OTF_Writer instance or 0 if a failure - * occurred. - * - * \ingroup writer - */ -OTF_Writer* OTF_Writer_open( const char* fileNamePrefix, - uint32_t numberOfStreams, - OTF_FileManager* fileManager ); - - -/** - * Close an OTF_Writer instance and all its related files. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * - * @return 1 if instance was closed successfully and 0 otherwise. - * - * \ingroup writer - */ -int OTF_Writer_close( OTF_Writer* writer ); - - -/** - * Close all streams that are open in this writer instance. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_closeAllStreams( OTF_Writer* writer ); - - -/** - * Set the standard compression method for all buffers managed by this writer - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * - * @param compression compression level to apply to all following streams - * 0-9, where 0 means no compression is applied, and 9 is - * the highest level of compression. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_setCompression( OTF_Writer* writer, OTF_FileCompression - compression ); - - -/** - * Return the standard compression method for all buffers managed by this writer - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * - * @return Standard compression level for all buffers managed by - * this writer. - * - * \ingroup writer - */ -OTF_FileCompression OTF_Writer_getCompression( OTF_Writer* writer ); - - -/** - * Set the default buffer size for all buffers managed by this Writer. - * This is only effective for future buffers and will not change already - * allocated buffers. Those can be changed with the buffers directly. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * - * @param size Intended buffer size. - * - * \ingroup writer - */ -void OTF_Writer_setBufferSizes( OTF_Writer* writer, uint32_t size ); - - -/** - * Get the default buffer size for all buffers managed by this Writer. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * - * @return Default buffer size for all buffers managed by this Writer. - * - * \ingroup writer - */ -uint32_t OTF_Writer_getBufferSizes( OTF_Writer* writer ); - - -/** - * Set the default zbuffer size for all buffers managed by this Reader. - * This is only effective for future files and will not change already - * allocated zbuffers. Those can be changed with the files directly. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * - * @param size Intended zbuffer size. - * - * \ingroup writer - */ -void OTF_Writer_setZBufferSizes( OTF_Writer* writer, uint32_t size ); - -/** - * Get the default zbuffer size. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * - * @return zbuffer size. - * - * \ingroup writer - */ -uint32_t OTF_Writer_getZBufferSizes( OTF_Writer* writer ); - -/** - * Set the default ouput format. The format is applied to all streams opened by - * the writer. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * - * @param format Intended output format (OTF_WSTREAM_FORMAT_{LONG,SHORT}). - * - * \ingroup writer - */ -void OTF_Writer_setFormat( OTF_Writer* writer, uint32_t format ); - - -/** - * Get the default output format of all streams managed by this writer. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * - * @return Default output format. - * - * \ingroup writer - */ -uint32_t OTF_Writer_getFormat( OTF_Writer* writer ); - - -/** - * Explicitly assign a given process to a specific stream. - * - * Mind that 0 is not a valid stream or process identifier but a reserved - * value. By default, processes are automatically assigned to streams. - * Therefore, this call is optional. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * @param process Process identifier. See also OTF_Writer_writeDefProcess(). - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -uint32_t OTF_Writer_assignProcess( OTF_Writer* writer, - uint32_t process, - uint32_t stream ); - - -/** - * Get a pointer to the master control object of the given writer instance. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * - * @return Pointer to a master control object. See OTF_MasterControl. - * - * \ingroup writer - */ -OTF_MasterControl* OTF_Writer_getMasterControl( OTF_Writer* writer ); - - -/** - * Set an alternative master control object. Use this only right after - * initialization but never after having written some records already! - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * @param mc new master control object - * - * - * \ingroup writer - */ -void OTF_Writer_setMasterControl( OTF_Writer* writer, OTF_MasterControl* mc ); - - -/** For a process with id 'processId' return a stream id of the stream the - data is to be written to. If no mapping has been set so far it is defined - in a way such that it is added to the stream with the least processes. - \ingroup writer */ -uint32_t OTF_Writer_mapProcess( OTF_Writer* writer, uint32_t processId ); - - -/** Return the stream with the given stream id. If there is no such stream yet - create one and append it to 'streams'. \ingroup writer */ -OTF_WStream* OTF_Writer_getStream( OTF_Writer* writer, uint32_t stream ); - - -/* Methods for writing public definition records ************************** */ - - -/** - * Write a comment record. - * - * @param writer Initialized OTF_Writer instance. - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param comment Arbitrary comment string. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefinitionComment( OTF_Writer* writer, - uint32_t stream, - const char* comment ); - - -/** - * Write a comment record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefinitionComment() - * \ingroup writer - */ -int OTF_Writer_writeDefinitionCommentKV( OTF_Writer* writer, - uint32_t stream, - const char* comment, - OTF_KeyValueList* list ); - - -/** - * Write the timer resolution definition record. All timed event records - * will be interpreted according to this definition. By default, a timer - * resultion of 1 us i.e. 1,000,000 clock ticks is assumed. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param ticksPerSecond Clock ticks per second of the timer. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefTimerResolution( OTF_Writer* writer, - uint32_t stream, - uint64_t ticksPerSecond ); - - -/** - * Write the timer resolution definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeTimerResolution() - * \ingroup writer - */ -int OTF_Writer_writeDefTimerResolutionKV( OTF_Writer* writer, - uint32_t stream, - uint64_t ticksPerSecond, - OTF_KeyValueList* list ); - - -/** - * Write a process definition record. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param process Arbitrary but unique process identifier > 0. - * @param name Name of the process e.g. "Process X". - * @param parent Previously declared parent process identifier or 0 if - * process has no parent. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefProcess( OTF_Writer* writer, - uint32_t stream, - uint32_t process, - const char* name, - uint32_t parent ); - - -/** - * Write a process definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefProcess() - * \ingroup writer - */ -int OTF_Writer_writeDefProcessKV( OTF_Writer* writer, - uint32_t stream, - uint32_t process, - const char* name, - uint32_t parent, - OTF_KeyValueList* list ); - - -/** - * Write a process group definition record. - * - * OTF supports groups of processes. Their main objective is to classify - * processes depending on arbitrary characteristics. Processes can reside - * in multiple groups. This record type is optional. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param procGroup Arbitrary but unique process group identifier > 0. - * @param name Name of the process group e.g. "Well Balanced". - * @param numberOfProcs The number of processes in the process group. - * @param procs Vector of process identifiers or previously defined - * process group identifiers as defined with - * OTF_Writer_writeDefProcess() resp. - * OTF_Writer_writeDefProcessGroup. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefProcessGroup( OTF_Writer* writer, - uint32_t stream, - uint32_t procGroup, - const char* name, - uint32_t numberOfProcs, - const uint32_t* procs ); - - -/** - * Write a process group definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefProcessGroup() - * \ingroup writer - */ -int OTF_Writer_writeDefProcessGroupKV( OTF_Writer* writer, - uint32_t stream, - uint32_t procGroup, - const char* name, - uint32_t numberOfProcs, - const uint32_t* procs, - OTF_KeyValueList* list ); - - -/** - * Write an attribute list definition record. - * - * Defines a list of attributes that is assigned to a unique token. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param attr_token Arbitrary but unique attribute list identifier > 0. - * @param num Number of elements in the attribute list array. - * @param array An array of different attributes with type of OTF_ATTR_TYPE(). - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefAttributeList( OTF_Writer* writer, - uint32_t stream, - uint32_t attr_token, - uint32_t num, - OTF_ATTR_TYPE* array ); - - -/** - * Write an attribute list definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefAttributeList() - * \ingroup writer - */ -int OTF_Writer_writeDefAttributeListKV( OTF_Writer* writer, - uint32_t stream, - uint32_t attr_token, - uint32_t num, - OTF_ATTR_TYPE* array, - OTF_KeyValueList* list ); - - -/** - * Write a process or group attributes definition record. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param proc_token Arbitrary but unique process or process group identifier > 0. - * @param attr_token A unique token that was defined with OTF_Writer_writeDefAttributeList(). - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefProcessOrGroupAttributes( OTF_Writer* writer, - uint32_t stream, - uint32_t proc_token, - uint32_t attr_token ); - - -/** - * Write a process or group attributes definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefProcessOrGroupAttributes() - * \ingroup writer - */ -int OTF_Writer_writeDefProcessOrGroupAttributesKV( OTF_Writer* writer, - uint32_t stream, - uint32_t proc_token, - uint32_t attr_token, - OTF_KeyValueList* list ); - - -/** - * Write a function definition record. - * - * Defines a function of the given name. Functions can optionally belong to a - * certain function group to be defined with the - * OTF_Writer_writeDefFunctionGroup() call. A source code reference can - * be added to the definition aswell. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param func Arbitrary but unique function identifier > 0. - * @param name Name of the function e.g. "DoSomething". - * @param funcGroup A function group identifier preliminary defined with - * OTF_Writer_writeDefFunctionGroup() or 0 for no - * function group assignment. - * @param source Reference to the function's source code location - * preliminary defined with OTF_Writer_writeDefScl() or - * 0 for no source code location assignment. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefFunction( OTF_Writer* writer, - uint32_t stream, - uint32_t func, - const char* name, - uint32_t funcGroup, - uint32_t source ); - - -/** - * Write a function definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefFunction() - * \ingroup writer - */ -int OTF_Writer_writeDefFunctionKV( OTF_Writer* writer, - uint32_t stream, - uint32_t func, - const char* name, - uint32_t funcGroup, - uint32_t source, - OTF_KeyValueList* list ); - - -/** - * Write a function group definition record. - * - * @param writer Pointer to an initialized OTF_Writer object. See - * also OTF_Writer_open(). - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param funcGroup An arbitrary but unique function group identifier > 0. - * @param name Name of the function group e.g. "Computation". - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefFunctionGroup( OTF_Writer* writer, - uint32_t stream, - uint32_t funcGroup, - const char* name ); - - -/** - * Write a function group definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefFunctionGroup() - * \ingroup writer - */ -int OTF_Writer_writeDefFunctionGroupKV( OTF_Writer* writer, - uint32_t stream, - uint32_t funcGroup, - const char* name, - OTF_KeyValueList* list ); - - -/** - * Write a collective operation definition record. - * - * @param writer Initialized OTF_Writer instance. - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param collOp An arbitrary but unique collective op. identifier > 0. - * @param name Name of the collective operation e.g. "MPI_Bcast". - * @param type One of the five supported collective classes: - * OTF_COLLECTIVE_TYPE_UNKNOWN (default), - * OTF_COLLECTIVE_TYPE_BARRIER, - * OTF_COLLECTIVE_TYPE_ONE2ALL, - * OTF_COLLECTIVE_TYPE_ALL2ONE, - * OTF_COLLECTIVE_TYPE_ALL2ALL. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefCollectiveOperation( OTF_Writer* writer, - uint32_t stream, - uint32_t collOp, - const char* name, - uint32_t type ); - - -/** - * Write a collective operation definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefCollectiveOperation() - * \ingroup writer - */ -int OTF_Writer_writeDefCollectiveOperationKV( OTF_Writer* writer, - uint32_t stream, - uint32_t collOp, - const char* name, - uint32_t type, - OTF_KeyValueList* list ); - - -/** - * Write a counter definition record. - * - * @param writer Initialized OTF_Writer instance. - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param counter An arbitrary but unique counter identifier. - * @param name Name of the counter e.g. "Cache Misses". - * @param properties A combination of a type and scope counter property. - * OTF_COUNTER_TYPE_ACC (default) represents a counter - * with monotonously increasing values e.g. a FLOP - * counter. OTF_COUNTER_TYPE_ABS on the other hand - * defines a counter with alternating absolute values e.g. - * the memory usage of a process. The following counter - * measurement scopes are supported: - * OTF_COUNTER_SCOPE_START (default) always refers to the - * start of the process, OTF_COUNTER_SCOPE_POINT refers - * to exactly this moment in time, OTF_COUNTER_SCOPE_LAST - * relates to the previous measurement, and - * OTF_COUNTER_SCOPE_NEXT to the next measurement. - * Examples: OTF_COUNTER_TYPE_ACC + - * OTF_COUNTER_SCOPE_START should be used for most - * standard hardware (PAPI) counters. - * OTF_COUNTER_TYPE_ABS + OTF_COUNTER_SCOPE_POINT could - * be used to record information 'spikes'. - * OTF_COUNTER_TYPE_ABS + OTF_COUNTER_SCOPE_NEXT works - * for memory allocation recording. - * @param counterGroup A previously defined counter group identifier or 0 - * for no group. - * @param unit Unit of the counter e.g. "#" for "number of..." or 0 - * for no unit. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefCounter( OTF_Writer* writer, - uint32_t stream, - uint32_t counter, - const char* name, - uint32_t properties, - uint32_t counterGroup, - const char* unit ); - - -/** - * Write a counter definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefCounter() - * \ingroup writer - */ -int OTF_Writer_writeDefCounterKV( OTF_Writer* writer, - uint32_t stream, - uint32_t counter, - const char* name, - uint32_t properties, - uint32_t counterGroup, - const char* unit, - OTF_KeyValueList* list ); - - -/** - * Write a counter group definition record. - * - * @param writer Initialized OTF_Writer instance. - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param counterGroup An arbitrary but unique counter group identifier. - * @param name Counter group name. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefCounterGroup( OTF_Writer* writer, - uint32_t stream, - uint32_t counterGroup, - const char* name ); - - -/** - * Write a counter group definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefCounterGroup() - * \ingroup writer - */ -int OTF_Writer_writeDefCounterGroupKV( OTF_Writer* writer, - uint32_t stream, - uint32_t counterGroup, - const char* name, - OTF_KeyValueList* list ); - - -/** - * Write a source code location (SCL) record. - * - * @param writer Initialized OTF_Writer instance. - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param source Arbitrary but unique source code location - * identifier > 0. - * @param sourceFile Previously defined source file identifier. See - * OTF_Writer_writeDefSclFile(). - * @param line Line number. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefScl( OTF_Writer* writer, - uint32_t stream, - uint32_t source, - uint32_t sourceFile, - uint32_t line ); - - -/** - * Write a source code location (SCL) record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefScl() - * \ingroup writer - */ -int OTF_Writer_writeDefSclKV( OTF_Writer* writer, - uint32_t stream, - uint32_t source, - uint32_t sourceFile, - uint32_t line, - OTF_KeyValueList* list ); - - -/** - * Write a source code location (SCL) file record. - * - * @param writer Initialized OTF_Writer instance. - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param sourceFile Arbitrary but unique source code location - * identifier != 0. - * @param name File name. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefSclFile( OTF_Writer* writer, - uint32_t stream, - uint32_t sourceFile, - const char* name ); - - -/** - * Write a source code location (SCL) file record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefSclFile() - * \ingroup writer - */ -int OTF_Writer_writeDefSclFileKV( OTF_Writer* writer, - uint32_t stream, - uint32_t sourceFile, - const char* name, - OTF_KeyValueList* list ); - - -/** - * depricated. The Otf-Version-record is generated automatically at beginning of - * tracing in the global definiton stream. - * - * \ingroup writer - */ -int OTF_Writer_writeOtfVersion( OTF_Writer* writer, uint32_t stream ); - - -/** - * Write a creator record. - * - * @param writer Initialized OTF_Writer instance. - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param creator String which identifies the creator of the - * file e.g. "TAU Version x.y.z". - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefCreator( OTF_Writer* writer, uint32_t stream, - const char* creator ); - - -/** - * Write a creator record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefCreator() - * \ingroup writer - */ -int OTF_Writer_writeDefCreatorKV( OTF_Writer* writer, uint32_t stream, - const char* creator, - OTF_KeyValueList* list ); - - - - -/** - * Write a file definition record - * - * @param writer Initialized OTF_Writer instance. - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param token Arbitrary, unique identifier for the file. - * Has to be > 0. - * @param name Name of the file. - * @param group File group identifier or 0 for no group. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefFile( OTF_Writer* writer, - uint32_t stream, - uint32_t token, - const char* name, - uint32_t group ); - - -/** - * Write a file definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefFile() - * \ingroup writer - */ -int OTF_Writer_writeDefFileKV( OTF_Writer* writer, - uint32_t stream, - uint32_t token, - const char* name, - uint32_t group, - OTF_KeyValueList* list ); - - -/** - * Write a file group definition record - * - * @param writer Initialized OTF_Writer instance. - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param token Arbitrary, unique identifier for the file group. - * Has to be > 0. - * @param name Name of the file group. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefFileGroup( OTF_Writer* writer, - uint32_t stream, - uint32_t token, - const char* name ); - - -/** - * Write a file group definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefFileGroup() - * \ingroup writer - */ -int OTF_Writer_writeDefFileGroupKV( OTF_Writer* writer, - uint32_t stream, - uint32_t token, - const char* name, - OTF_KeyValueList* list ); - - -/** - * Write a key value definition record - * - * @param writer Initialized OTF_Writer instance. - * @param stream Target stream identifier with - * 0 < stream <= number of streams as defined in - * OTF_Writer_open(). - * @param key Arbitrary, unique identifier for the key value pair. - * @param type Type of the key. - * @param name Name of the key value pair. - * @param description Description of the key value pair. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefKeyValue( OTF_Writer* writer, - uint32_t stream, - uint32_t key, - OTF_Type type, - const char* name, - const char* description ); - - -/** - * Write a key value definition record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefKeyValue() - * \ingroup writer - */ -int OTF_Writer_writeDefKeyValueKV( OTF_Writer* writer, - uint32_t stream, - uint32_t key, - OTF_Type type, - const char* name, - const char* description, - OTF_KeyValueList* list ); - - -/** - * Write a no-operation record. This can be used to write an OTF_KeyValueList - * that is not attached to a special event record. - * - * @param writer Initialized OTF_Writer instance. - * @param time The time when the NoOp event took place. - * @param process Process where action took place. - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeNoOpKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - OTF_KeyValueList* list ); - - -/** - * Write a function entry record. - * - * @param writer Initialized OTF_Writer instance. - * @param time The time when the function entry took place. - * @param function Function to be entered as defined with - * OTF_Writer_defFunction. - * @param process Process where action took place. - * @param source Optional reference to source code. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeEnter( OTF_Writer* writer, - uint64_t time, - uint32_t function, - uint32_t process, - uint32_t source ); - - -/** - * Write a function entry record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeEnter() - * \ingroup writer - */ -int OTF_Writer_writeEnterKV( OTF_Writer* writer, - uint64_t time, - uint32_t function, - uint32_t process, - uint32_t source, - OTF_KeyValueList* list ); - - -/** - * Write a function leave record. - * - * @param writer Initialized OTF_Writer instance. - * @param time The time when the function leave took place. - * @param function Function which was left or 0 if stack integrety checking - * is not needed. - * @param process Process where action took place. - * @param source Explicit source code location or 0. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeLeave( OTF_Writer* writer, - uint64_t time, - uint32_t function, - uint32_t process, - uint32_t source ); - - -/** - * Write a function leave record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeLeave() - * \ingroup writer - */ -int OTF_Writer_writeLeaveKV( OTF_Writer* writer, - uint64_t time, - uint32_t function, - uint32_t process, - uint32_t source, - OTF_KeyValueList* list ); - - -/** - * Write a message retrieval record. - * - * @param writer Initialized OTF_Writer instance. - * @param time The time when the message was received. - * @param receiver Identifier of receiving process. - * @param sender Identifier of sending process. - * @param procGroup Optional process-group sender and receiver belong to, - * '0' for no group. - * @param tag Optional message type information. - * @param length Optional message length information. - * @param source Optional reference to source code. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeRecvMsg( OTF_Writer* writer, - uint64_t time, - uint32_t receiver, - uint32_t sender, - uint32_t procGroup, - uint32_t tag, - uint32_t length, - uint32_t source ); - - -/** - * Write a message retrieval record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeRecvMsg() - * \ingroup writer - */ -int OTF_Writer_writeRecvMsgKV( OTF_Writer* writer, - uint64_t time, - uint32_t receiver, - uint32_t sender, - uint32_t procGroup, - uint32_t tag, - uint32_t length, - uint32_t source, - OTF_KeyValueList* list ); - - -/** - * Write a message send record. - * - * @param writer Initialized OTF_Writer instance. - * @param time The time when the message was send. - * @param sender Sender of the message. - * @param receiver Receiver of the message. - * @param procGroup Optional process-group sender and receiver belong to, - * '0' for no group. - * @param tag Optional message type information. - * @param length Optional message length information. - * @param source Optional reference to source code. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeSendMsg( OTF_Writer* writer, - uint64_t time, - uint32_t sender, - uint32_t receiver, - uint32_t procGroup, - uint32_t tag, - uint32_t length, - uint32_t source ); - - -/** - * Write a message send record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeSendMsg() - * \ingroup writer - */ -int OTF_Writer_writeSendMsgKV( OTF_Writer* writer, - uint64_t time, - uint32_t sender, - uint32_t receiver, - uint32_t procGroup, - uint32_t tag, - uint32_t length, - uint32_t source, - OTF_KeyValueList* list ); - - -/** - * Write a counter measurement record. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when counter was measured. - * @param process Process where counter measurment took place. - * @param counter Counter which was measured. - * @param value Counter value. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeCounter( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t counter, - uint64_t value ); - - -/** - * Write a counter measurement record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeCounter() - * \ingroup writer - */ -int OTF_Writer_writeCounterKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t counter, - uint64_t value, - OTF_KeyValueList* list ); - - -/** - * Write a collective operation member record. - * @deprecated This event record has been deprecated due to usage constraints. - * Please use OTF_Writer_writeBeginCollectiveOperation() and - * OTF_Writer_writeEndCollectiveOperation(), repectively. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when collective operation was entered by member. - * @param process Process identifier i.e. collective member. - * @param collective Collective identifier to be defined with - * OTF_Writer_writeDefCollectiveOperation(). - * @param procGroup Group of processes participating in this collective. - * @param rootProc Root process if != 0. - * @param sent Data volume sent by member or 0. - * @param received Data volumd received by member or 0. - * @param duration Time spent in collective operation. - * @param source Explicit source code location or 0. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeCollectiveOperation( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t collective, - uint32_t procGroup, - uint32_t rootProc, - uint32_t sent, - uint32_t received, - uint64_t duration, - uint32_t source ); - - -/** - * Write a collective operation member record including an OTF_KeyValueList. - * @deprecated This event record has been deprecated due to usage constraints. - * Please use OTF_Writer_writeBeginCollectiveOperationEV() and - * OTF_Writer_writeEndCollectiveOperationEV(), repectively. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeCollectiveOperation() - * \ingroup writer - */ -int OTF_Writer_writeCollectiveOperationKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t collective, - uint32_t procGroup, - uint32_t rootProc, - uint32_t sent, - uint32_t received, - uint64_t duration, - uint32_t source, - OTF_KeyValueList* list ); - - -/** - * Write a begin collective operation member record. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when collective operation was entered by member. - * @param process Process identifier i.e. collective member. - * @param collOp Collective identifier to be defined with - * OTF_Writer_writeDefCollectiveOperation(). - * @param matchingId Identifier for finding the associated end collective event - * record. It must be unique within this procGroup. - * @param procGroup Group of processes participating in this collective. - * @param rootProc Root process if != 0. - * @param sent Data volume sent by member or 0. - * @param received Data volume received by member or 0. - * @param scltoken Explicit source code location or 0. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeBeginCollectiveOperation( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t collOp, - uint64_t matchingId, - uint32_t procGroup, - uint32_t rootProc, - uint64_t sent, - uint64_t received, - uint32_t scltoken ); - - -/** - * Write a begin collective operation member record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeBeginCollectiveOperation() - * \ingroup writer - */ -int OTF_Writer_writeBeginCollectiveOperationKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t collOp, - uint64_t matchingId, - uint32_t procGroup, - uint32_t rootProc, - uint64_t sent, - uint64_t received, - uint32_t scltoken, - OTF_KeyValueList* list ); - - -/** - * Write an end collective operation member record. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when collective operation was entered by member. - * @param process Process identifier i.e. collective member. - * @param matchingId Matching identifier, must match a previous start - * collective operation. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeEndCollectiveOperation( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint64_t matchingId ); - - -/** - * Write an end collective operation member record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeEndCollectiveOperation() - * \ingroup writer - */ -int OTF_Writer_writeEndCollectiveOperationKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint64_t matchingId, - OTF_KeyValueList* list ); - - -/** - * Write a comment record. - * - * @param writer Initialized OTF_Writer instance. - * @param time Comments need a timestamp for a proper positioning in the - * trace. - * @param process Comments also need a process identifier for a proper - * positioning in the trace. - * @param comment Arbitrary comment string. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ - -int OTF_Writer_writeEventComment( OTF_Writer* writer, - uint64_t time, - uint32_t process, - const char* comment ); - - -/** - * Write a comment record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeEventComment() - * \ingroup writer - */ -int OTF_Writer_writeEventCommentKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - const char* comment, - OTF_KeyValueList* list ); - - -/** - * Write a begin process record - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when process was referenced for the first time. - * @param process Process identifier > 0. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ - -int OTF_Writer_writeBeginProcess( OTF_Writer* writer, - uint64_t time, - uint32_t process ); - - -/** - * Write a begin process record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeBeginProcess() - * \ingroup writer - */ -int OTF_Writer_writeBeginProcessKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - OTF_KeyValueList* list ); - - -/** - * Write a end process record - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when process was referenced for the last time. - * @param process Process identifier > 0. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ - -int OTF_Writer_writeEndProcess( OTF_Writer* writer, - uint64_t time, - uint32_t process ); - - -/** - * Write a end process record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeEndProcess() - * \ingroup writer - */ -int OTF_Writer_writeEndProcessKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - OTF_KeyValueList* list ); - - -/** - * Write a file operation record - * @deprecated This event record has been deprecated due to usage constraints. - * Please use OTF_Writer_writeBeginFileOperation() and - * OTF_Writer_writeEndFileOperation(), respectively. - * - * @param writer Initialized OTF_Writer instance. - * @param time Start time of the file operation. - * @param fileid File identifier > 0. - * @param handleid File open identifier. - * @param process Process identifier > 0. - * @param operation Type of file operation @see OTF_Handler_FileOperation() - * @param bytes Depends on operation @see OTF_Handler_FileOperation() - * @param duration time spent in the file operation - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeFileOperation( OTF_Writer* writer, - uint64_t time, - uint32_t fileid, - uint32_t process, - uint64_t handleid, - uint32_t operation, - uint64_t bytes, - uint64_t duration, - uint32_t source ); - - -/** - * Write a file operation record including an OTF_KeyValueList. - * @deprecated This event record has been deprecated due to usage constraints. - * Please use OTF_Writer_writeBeginFileOperationKV() and - * OTF_Writer_writeEndFileOperationKV(), respectively. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeFileOperation() - * \ingroup writer - */ -int OTF_Writer_writeFileOperationKV( OTF_Writer* writer, - uint64_t time, - uint32_t fileid, - uint32_t process, - uint64_t handleid, - uint32_t operation, - uint64_t bytes, - uint64_t duration, - uint32_t source, - OTF_KeyValueList* list ); - - -/** - * Write a begin file operation record - * - * @param writer Initialized OTF_Writer instance. - * @param time Start time of file operation. - * @param process Process identifier > 0. - * @param matchingId Operation identifier, used for finding the associated end - * file operation event record. - * @param scltoken Optional reference to source code. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeBeginFileOperation( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint64_t matchingId, - uint32_t scltoken ); - - -/** - * Write a begin file operation record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeBeginFileOperation() - * \ingroup writer - */ -int OTF_Writer_writeBeginFileOperationKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint64_t matchingId, - uint32_t scltoken, - OTF_KeyValueList* list ); - - -/** - * Write an end file operation record - * - * @param writer Initialized OTF_Writer instance. - * @param time End time of file operation. - * @param process Process identifier > 0. - * @param fileid File identifier > 0. - * @param matchingId Operation identifier, must match a previous start file - * operation event record. - * @param handleId Unique file open identifier. - * @param operation Type of file operation @see OTF_Handler_FileOperation() - * @param bytes Depends on operation @see OTF_Handler_FileOperation() - * @param scltoken Optional reference to source code. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeEndFileOperation( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t fileid, - uint64_t matchingId, - uint64_t handleId, - uint32_t operation, - uint64_t bytes, - uint32_t scltoken ); - - -/** - * Write an end file operation record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeEndFileOperation() - * \ingroup writer - */ -int OTF_Writer_writeEndFileOperationKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t fileid, - uint64_t matchingId, - uint64_t handleId, - uint32_t operation, - uint64_t bytes, - uint32_t scltoken, - OTF_KeyValueList* list ); - - -/** - * Write a RMA put record - local end record. - * The end of this transfer is marked by the NEXT end record on this <process> - * with the same communicator/tag pair. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when process was referenced for the last time. - * @param process Process initiating the transfer. - * @param origin If >0, Process whose memory will be transferred, instead - of this <process>. - * @param target Process whose memory will be written. - * @param communicator Together with tag, it is used to identify the - * corresponding RMA end record. - * @param tag Together with communicator, it is used to identify the - * corresponding RMA end record. - * @param bytes How many bytes have been transfered by this call. - * @param source Explicit source code location or 0. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeRMAPut( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t origin, - uint32_t target, - uint32_t communicator, - uint32_t tag, - uint64_t bytes, - uint32_t scltoken ); - - -/** - * Write a RMA put record - local end record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeRMAPut() - * \ingroup writer - */ -int OTF_Writer_writeRMAPutKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t origin, - uint32_t target, - uint32_t communicator, - uint32_t tag, - uint64_t bytes, - uint32_t scltoken, - OTF_KeyValueList* list ); - - -/** - * Write a RMA put record - remote end record. - * The end of this transfer is marked by the NEXT end record on process <target> - * with the same communicator/tag pair. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when process was referenced for the last time. - * @param process Process initiating the transfer. - * @param origin If >0, Process whose memory will be transferred, instead - of this <process>. - * @param target Process whose memory will be written and where the end - * record is located. - * @param communicator Together with tag, it is used to identify the - * corresponding RMA end record. - * @param tag Together with communicator, it is used to identify the - * corresponding RMA end record. - * @param bytes How many bytes have been transfered by this call. - * @param source Explicit source code location or 0. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeRMAPutRemoteEnd( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t origin, - uint32_t target, - uint32_t communicator, - uint32_t tag, - uint64_t bytes, - uint32_t scltoken ); - - -/** - * Write a RMA put record - remote end record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeRMAPutRemoteEnd() - * \ingroup writer - */ -int OTF_Writer_writeRMAPutRemoteEndKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t origin, - uint32_t target, - uint32_t communicator, - uint32_t tag, - uint64_t bytes, - uint32_t scltoken, - OTF_KeyValueList* list ); - - -/** - * Write a RMA get record. - * The end of this transfer is marked by the NEXT end record on this <process> - * with the same communicator/tag pair. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when process was referenced for the last time. - * @param process Process initiating the transfer. - * @param origin If >0, Process where data will be transferred to (instead - of this <process>). - * @param target Process whose memory will be read. - * @param communicator Together with tag, it is used to identify the - * corresponding RMA end record. - * @param tag Together with communicator, it is used to identify the - * corresponding RMA end record. - * @param bytes How many bytes have been transfered by this call. - * @param source Explicit source code location or 0. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeRMAGet( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t origin, - uint32_t target, - uint32_t communicator, - uint32_t tag, - uint64_t bytes, - uint32_t scltoken ); - - -/** - * Write a RMA get record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeRMAGet() - * \ingroup writer - */ -int OTF_Writer_writeRMAGetKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t origin, - uint32_t target, - uint32_t communicator, - uint32_t tag, - uint64_t bytes, - uint32_t scltoken, - OTF_KeyValueList* list ); - - -/** - * Write a RMA end record. - * The end record marks the finalization of all put and get operations with the - * same communicator/tag pair that occured so far for this <process>. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when process was referenced for the last time. - * @param process Process identifier > 0. - * @param remote If >0, ends RMA transfers on Process <remote>, instead of - this <process>. - [remote!=0 is really weird crap and would never be used by - sane programmers ;-) -- nevertheless, the IBM Cell could - be programmed like this.] - * @param communicator Together with tag, it is used to identify the - * related RMA put/get records. - * @param tag Together with communicator, it is used to identify the - * related RMA put/get records. - * @param source Explicit source code location or 0. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeRMAEnd( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t remote, - uint32_t communicator, - uint32_t tag, - uint32_t scltoken ); - - -/** - * Write a RMA end record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeRMAEnd() - * \ingroup writer - */ -int OTF_Writer_writeRMAEndKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t remote, - uint32_t communicator, - uint32_t tag, - uint32_t scltoken, - OTF_KeyValueList* list ); - - -/* *** public snapshot record write handlers *** */ - -/** - * Write a snapshot comment record. - * - * @param writer Initialized OTF_Writer instance. - * @param time Comments need a timestamp for a proper positioning in the - * trace. - * @param process Comments also need a process identifier for a proper - * positioning in the trace. - * @param comment Arbitrary comment string. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ - -int OTF_Writer_writeSnapshotComment( OTF_Writer* writer, - uint64_t time, - uint32_t process, - const char* comment ); - - -/** - * Write a snapshot comment record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeSnapshotComment() - * \ingroup writer - */ -int OTF_Writer_writeSnapshotCommentKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - const char* comment, - OTF_KeyValueList* list ); - - -/** - * Write an enter snapshot which provides information about a past - * function call - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when the snapshot was written(current time). - * @param originaltime Time when the according enter record was entered. - * This call is still on the stack.(It has not been left - * yet) - * @param function Function that the has been entered - * OTF_Writer_defFunction. - * @param process Process where action took place. - * @param source Optional reference to source code. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeEnterSnapshot( OTF_Writer* writer, - uint64_t time, - uint64_t originaltime, - uint32_t function, - uint32_t process, - uint32_t source ); - - -/** - * Write an enter snapshot including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeEnterSnapshot() - * \ingroup writer - */ -int OTF_Writer_writeEnterSnapshotKV( OTF_Writer* writer, - uint64_t time, - uint64_t originaltime, - uint32_t function, - uint32_t process, - uint32_t source, - OTF_KeyValueList* list ); - - -/** - * Write a send snapshot which provides information about a past - * message send operation that is still pending, i.e. not yet received - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when the snapshot was written(current time). - * @param originaltime Time when the message was sent - * @param sender Sender of the message. - * @param receiver Receiver of the message. - * @param procGroup Optional process-group sender and receiver belong to, - * '0' for no group. - * @param tag Optional message type information. - * @param length Optional message length information. - * @param source Optional reference to source code. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeSendSnapshot( OTF_Writer* writer, - uint64_t time, - uint64_t originaltime, - uint32_t sender, - uint32_t receiver, - uint32_t procGroup, - uint32_t tag, - uint32_t length, - uint32_t source ); - - -/** - * Write a send snapshot including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeSendSnapshot() - * \ingroup writer - */ -int OTF_Writer_writeSendSnapshotKV( OTF_Writer* writer, - uint64_t time, - uint64_t originaltime, - uint32_t sender, - uint32_t receiver, - uint32_t procGroup, - uint32_t tag, - uint32_t length, - uint32_t source, - OTF_KeyValueList* list ); - - -/** - * Write a snapshot record for an open (and not yet closed) file - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when the snapshot was written(current time). - * @param originaltime Time when the message was sent. - * @param fileid File identifier. - * @param process Process where the file was opened. - * @param handleid Unique file open identifier. @see OTF_Handler_FileOperation() - * @param source Optional reference to source code. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeOpenFileSnapshot( OTF_Writer* writer, - uint64_t time, - uint64_t originaltime, - uint32_t fileid, - uint32_t process, - uint64_t handleid, - uint32_t source ); - - -/** - * Write a snapshot record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeOpenFileSnapshot() - * \ingroup writer - */ -int OTF_Writer_writeOpenFileSnapshotKV( OTF_Writer* writer, - uint64_t time, - uint64_t originaltime, - uint32_t fileid, - uint32_t process, - uint64_t handleid, - uint32_t source, - OTF_KeyValueList* list ); - - -/** - * Write a snapshot record for an unfinished collective operation. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when the snapshot was written(current time). - * @param originaltime Time when the collective operation began. - * @param process Process identifier i.e. collective member. - * @param collOp Collective identifier to be defined with - * OTF_Writer_writeDefCollectiveOperation(). - * @param matchingId Identifier for finding the associated end collective event - * record. It must be unique within this procGroup. - * @param procGroup Group of processes participating in this collective. - * @param rootProc Root process if != 0. - * @param sent Data volume sent by member or 0. - * @param received Data volume received by member or 0. - * @param scltoken Explicit source code location or 0. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeBeginCollopSnapshot( OTF_Writer* writer, - uint64_t time, - uint64_t originaltime, - uint32_t process, - uint32_t collOp, - uint64_t matchingId, - uint32_t procGroup, - uint32_t rootProc, - uint64_t sent, - uint64_t received, - uint32_t scltoken ); - - -/** - * Write a snapshot record for an unfinished collective operation including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeBeginCollopSnapshot() - * \ingroup writer - */ -int OTF_Writer_writeBeginCollopSnapshotKV( OTF_Writer* writer, - uint64_t time, - uint64_t originaltime, - uint32_t process, - uint32_t collOp, - uint64_t matchingId, - uint32_t procGroup, - uint32_t rootProc, - uint64_t sent, - uint64_t received, - uint32_t scltoken, - OTF_KeyValueList* list ); - - -/** - * Write a snapshot for an unfinished file operation. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when the snapshot was written(current time). - * @param originaltime Time when the operation began. - * @param process Process identifier > 0. - * @param matchingId Operation identifier, used for finding the associated end - * file operation event record. - * @param scltoken Optional reference to source code. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeBeginFileOpSnapshot( OTF_Writer* writer, - uint64_t time, - uint64_t originaltime, - uint32_t process, - uint64_t matchingId, - uint32_t scltoken ); - - -/** - * Write a snapshot for an unfinished file operation including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeBeginFileOperation() - * \ingroup writer - */ -int OTF_Writer_writeBeginFileOpSnapshotKV( OTF_Writer* writer, - uint64_t time, - uint64_t originaltime, - uint32_t process, - uint64_t matchingId, - uint32_t scltoken, - OTF_KeyValueList* list ); - -/* *** public statistics record write handlers *** */ - - -/** - * Write a summary comment record. - * - * @param writer Initialized OTF_Writer instance. - * @param time Comments need a timestamp for a proper positioning in the - * trace. - * @param process Comments also need a process identifier for a proper - * positioning in the trace. - * @param comment Arbitrary comment string. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ - -int OTF_Writer_writeSummaryComment( OTF_Writer* writer, - uint64_t time, - uint32_t process, - const char* comment ); - - -/** - * Write a summary comment record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeSummaryComment() - * \ingroup writer - */ -int OTF_Writer_writeSummaryCommentKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - const char* comment, - OTF_KeyValueList* list ); - - -/** - * Write a function summary record. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when summary was computed. - * @param function Function as defined with - * OTF_Handler_DefFunction. - * @param process Process of the given function. - * @param count Number of invocations. - * @param excltime Time spent exclusively in the given function. - * @param incltime Time spent in the given function including all - * sub-routine calls. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ - -int OTF_Writer_writeFunctionSummary( OTF_Writer* writer, - uint64_t time, uint32_t function, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime ); - - -/** - * Write a function summary record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeFunctionSummary() - * \ingroup writer - */ -int OTF_Writer_writeFunctionSummaryKV( OTF_Writer* writer, - uint64_t time, uint32_t function, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, - OTF_KeyValueList* list ); - - -/** - * Write a functiongroup summary record. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when summary was computed. - * @param functiongroup Function group as defined with - * OTF_Handler_DefFunctionGroup. - * @param process Process of the given function group. - * @param count Number of invocations. - * @param excltime Time spent exclusively in the given function group. - * @param incltime Time spent in the given function group including all - * sub-routine calls. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ - -int OTF_Writer_writeFunctionGroupSummary( OTF_Writer* writer, - uint64_t time, uint32_t functiongroup, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime ); - - -/** - * Write a functiongroup summary record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeFunctionGroupSummary() - * \ingroup writer - */ -int OTF_Writer_writeFunctionGroupSummaryKV( OTF_Writer* writer, - uint64_t time, uint32_t functiongroup, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, - OTF_KeyValueList* list ); - - -/** - * Write a message summary record. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when summary was computed. - * @param process Process where messages originated. - * @param peer Process where the message is sent to - * @param comm Communicator of message summary - * @param tag Message type/tag. - * @param number_sent The number of messages sent. - * @param number_recved The number of messages received. - * @param bytes_sent The number of bytes sent via messages of the given - * type. - * @param bytes_recved The number of bytes received through messages of the - * given type. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ - -int OTF_Writer_writeMessageSummary( OTF_Writer* writer, - uint64_t time, uint32_t process, uint32_t peer, - uint32_t comm, uint32_t tag, uint64_t number_sent, - uint64_t number_recved, uint64_t bytes_sent, uint64_t bytes_recved ); - - -/** - * Write a message summary record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeMessageSummary() - * \ingroup writer - */ -int OTF_Writer_writeMessageSummaryKV( OTF_Writer* writer, - uint64_t time, uint32_t process, uint32_t peer, - uint32_t comm, uint32_t tag, uint64_t number_sent, - uint64_t number_recved, uint64_t bytes_sent, uint64_t bytes_recved, - OTF_KeyValueList* list ); - - -/** - * Write a summary record of collective operations. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when summary was computed. - * @param process Process identifier i.e. collective member. - * @param comm Communicator of collective operation summary. - * @param collective Collective identifier to be defined with - * OTF_Writer_writeDefCollectiveOperation(). - * @param number_sent The number of messages sent by member or 0. - * @param number_recved The number of messages received by member or 0. - * @param bytes_sent The number of bytes sent by member or 0. - * @param bytes_recved The number of bytes received by member or 0. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ - -int OTF_Writer_writeCollopSummary( OTF_Writer* writer, - uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, - uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, uint64_t bytes_recved ); - - -/** - * Write a summary record of collective operations including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeCollopSummary() - * \ingroup writer - */ -int OTF_Writer_writeCollopSummaryKV( OTF_Writer* writer, - uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, - uint64_t number_sent, uint64_t number_recved, uint64_t bytes_sent, uint64_t bytes_recved, - OTF_KeyValueList* list ); - -/** - * Writes a file operation summary record. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when summary was computed. - * @param fileid File identifier or 0 for all files. - * @param process Process where file operations occured. - * @param nopen Number of files opened. - * @param nclose Number of files closed. - * @param nread Number of read events. - * @param nwrite Number of write events. - * @param nseek Number of seek events. - * @param bytesread Number of bytes read. - * @param byteswrite Number of bytes written. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeFileOperationSummary( OTF_Writer* writer, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite ); - - -/** - * Writes a file operation summary record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeFileOperationSummary() - * \ingroup writer - */ -int OTF_Writer_writeFileOperationSummaryKV( OTF_Writer* writer, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList* list ); - - -/** - * Writes a file group operation summary record. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time when summary was computed. - * @param groupid File group identifier or 0 for all files/groups. - * @param process Process where file operations occured. - * @param nopen Number of files opened. - * @param nclose Number of files closed. - * @param nread Number of read events. - * @param nwrite Number of write events. - * @param nseek Number of seek events. - * @param bytesread Number of bytes read. - * @param byteswrite Number of bytes written. - * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeFileGroupOperationSummary( OTF_Writer* writer, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite ); - - -/** - * Writes a file group operation summary record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeFileGroupOperationSummary() - * \ingroup writer - */ -int OTF_Writer_writeFileGroupOperationSummaryKV( OTF_Writer* writer, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList* list ); -/* *** private member functions *** */ - - -/* *** marker record types *** */ - - -/** - * Writes a def marker record. - * - * @param writer Initialized OTF_Writer instance. - * qparam streamID stream identifier that must be 0, any other value is ignored - * @param token The newly defined marker token. - * @param name Its name - * @param type Marker type, one of OTF_MARKER_TYPE_xxx - * * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeDefMarker( OTF_Writer* writer, - uint32_t streamID, - uint32_t token, - const char* name, - uint32_t type ); - - -/** - * Writes a def marker record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeDefMarker() - * \ingroup writer - */ -int OTF_Writer_writeDefMarkerKV( OTF_Writer* writer, - uint32_t streamID, - uint32_t token, - const char* name, - uint32_t type, - OTF_KeyValueList* list ); - -/** - * Writes a marker record. - * - * @param writer Initialized OTF_Writer instance. - * @param time Time stamp of the marker record. Note that marker records are - * not sorted according to time stamps! - * @param process The process or process group of the marker. - * @param token A marker token defined by 'DefMarker' before. - * @param text Descriptive text. * - * @return 1 on success, 0 if an error occurs. - * - * \ingroup writer - */ -int OTF_Writer_writeMarker( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t token, - const char* text ); - - -/** - * Writes a marker record including an OTF_KeyValueList. - * - * @param list Initialized OTF_KeyValueList() instance or NULL. - * - * @see OTF_Writer_writeMarker() - * \ingroup writer - */ -int OTF_Writer_writeMarkerKV( OTF_Writer* writer, - uint64_t time, - uint32_t process, - uint32_t token, - const char* text, - OTF_KeyValueList* list ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_WRITER_H */ - diff --git a/externals/otf/otflib/OTF_inttypes.c b/externals/otf/otflib/OTF_inttypes.c deleted file mode 100644 index a845262b8226a596a0dd9d4ea57d00481f0c7ece..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_inttypes.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#include "OTF_Platform.h" -#include "OTF_inttypes.h" - - -#define OTF_COMPILE_TIME_ASSERT(pred) switch(0){case 0:case pred:;} - -/* !!! if your compiler hits an error here, your integer types -have not the correct length, thus are not defined correct !!! */ -void otf_compile_time_assert(void); -void otf_compile_time_assert() { - OTF_COMPILE_TIME_ASSERT(sizeof(uint8_t) == 1); - OTF_COMPILE_TIME_ASSERT(sizeof(int8_t) == 1); - OTF_COMPILE_TIME_ASSERT(sizeof(uint16_t) == 2); - OTF_COMPILE_TIME_ASSERT(sizeof(int16_t) == 2); - OTF_COMPILE_TIME_ASSERT(sizeof(uint32_t) == 4); - OTF_COMPILE_TIME_ASSERT(sizeof(int32_t) == 4); - OTF_COMPILE_TIME_ASSERT(sizeof(uint64_t) == 8); - OTF_COMPILE_TIME_ASSERT(sizeof(int64_t) == 8); -} - - -/* this function is for all unsigned integers of, 8, 16, 32 or 64 bit length */ -uint64_t OTF_Unsigned2Counter( uint64_t value ) { - - - return value; -} - - -uint64_t OTF_Counter2Unsigned( uint64_t value ) { - - - return value; -} - - -/* this function is for all signed integers of, 8, 16, 32 or 64 bit length */ -uint64_t OTF_Signed2Counter( int64_t value ) { - - - return *( (uint64_t*) &value); -} - - -int64_t OTF_Counter2Signed( uint64_t value ) { - - - return *( (int64_t*) &value); -} - - -/* this function is for single precision floating point variables 32 bit length */ -uint64_t OTF_Float2Counter( float value ) { - - union types_union { - float f; - uint32_t u; - } t; - - t.f= value; - - return (uint64_t) t.u; -} - - -float OTF_Counter2Float( uint64_t value ) { - - uint32_t tmp= (uint32_t) value; - - union types_union { - float f; - uint32_t u; - } t; - - t.u= tmp; - - return t.f; -} - - -/* this function is for double precision floating point variables 64 bit length */ -uint64_t OTF_Double2Counter( double value ) { - - union types_union { - double d; - uint64_t u; - } t; - - t.d= value; - - return t.u; -} - -double OTF_Counter2Double( uint64_t value ) { - - union types_union { - double d; - uint64_t u; - } t; - - t.u= value; - - return t.d; -} - diff --git a/externals/otf/otflib/OTF_inttypes.h b/externals/otf/otflib/OTF_inttypes.h deleted file mode 100644 index f7f7a6c07a597775c42b24f5d0690dc5ba0a0869..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_inttypes.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_inttypes.h - * - * @brief Deals with all data type related issues. - * - * \ingroup misc - */ - - -#ifndef OTF_INTTYPES_H -#define OTF_INTTYPES_H - -#if defined(_WIN32) /* windows */ -# include "OTF_inttypes_win.h" -#else /* unix */ -# include "OTF_inttypes_unix.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** Converts unsigned integers of 8, 16, 32 or 64 bit length into OTF counter values. */ -uint64_t OTF_Unsigned2Counter( uint64_t value ); -/** Converts OTF counter values to unsigned integers of 8, 16, 32 or 64 bit length. */ -uint64_t OTF_Counter2Unsigned( uint64_t value ); - - -/** Converts signed integers of 8, 16, 32 or 64 bit length to OTF counter values. */ -uint64_t OTF_Signed2Counter( int64_t value ); -/** Converts OTF counter values to signed integers of 8, 16, 32 or 64 bit length. */ -int64_t OTF_Counter2Signed( uint64_t value ); - - -/** Converts single precision floating point variables to OTF counter values. */ -uint64_t OTF_Float2Counter( float value ); -/** Converts OTF counter values to single precision floating point values. */ -float OTF_Counter2Float( uint64_t value ); - - -/** Converts double precision floating point values to OTF counter values. */ -uint64_t OTF_Double2Counter( double value ); -/** Converts OTF counter values to double precision floating point values. */ -double OTF_Counter2Double( uint64_t value ); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* OTF_INTTYPES_H */ diff --git a/externals/otf/otflib/OTF_inttypes_unix.h.in b/externals/otf/otflib/OTF_inttypes_unix.h.in deleted file mode 100644 index ef34f907ac9cadb666fa569c5e97547471f1f12c..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_inttypes_unix.h.in +++ /dev/null @@ -1,53 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_inttypes_unix.h - * - * @brief Deals with all data type related issues. - * - * \ingroup misc - */ - - -#ifndef OTF_INTTYPES_UNIX_H -#define OTF_INTTYPES_UNIX_H - -#define OTF_HAVE_STDINT_H @have_stdint_h@ -#define OTF_HAVE_INTTYPES_H @have_inttypes_h@ -#define OTF_SIZEOF_LONG @sizeof_long@ - -#ifdef __sgi -# undef OTF_HAVE_STDINT_H -# define OTF_HAVE_STDINT_H 0 -#endif - -#if OTF_HAVE_STDINT_H -# include <stdint.h> -#elif OTF_HAVE_INTTYPES_H -# include <inttypes.h> -#else /* OTF_HAVE_STDINT_H || OTF_HAVE_INTTYPES_H */ - - typedef signed char int8_t; - typedef signed short int int16_t; - typedef signed int int32_t; -# if OTF_SIZEOF_LONG == 8 - typedef signed long int int64_t; -# else /* OTF_SIZEOF_LONG */ - typedef signed long long int int64_t; -# endif /* OTF_SIZEOF_LONG */ - - typedef unsigned char uint8_t; - typedef unsigned short int uint16_t; - typedef unsigned int uint32_t; -# if OTF_SIZEOF_LONG == 8 - typedef unsigned long int uint64_t; -# else /* OTF_SIZEOF_LONG */ - typedef unsigned long long int uint64_t; -# endif /* OTF_SIZEOF_LONG */ - -#endif /* OTF_HAVE_INTTYPES_H || OTF_HAVE_STDINT_H */ - -#endif /* OTF_INTTYPES_UNIX_H */ diff --git a/externals/otf/otflib/OTF_inttypes_win.h b/externals/otf/otflib/OTF_inttypes_win.h deleted file mode 100644 index a91e117bdcf369199b065378fe8088eda2e5f192..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/OTF_inttypes_win.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * @file OTF_inttypes_win.h - * - * @brief Deals with all data type related issues. - * - * \ingroup misc - */ - - -#ifndef OTF_INTTYPES_WIN_H -#define OTF_INTTYPES_WIN_H - - /* needed by otf */ - typedef unsigned char uint8_t; - typedef signed int int32_t; - typedef unsigned int uint32_t; - typedef signed __int64 int64_t; - typedef unsigned __int64 uint64_t; - - /* not needed by otf */ - typedef signed char int8_t; - typedef signed short int16_t; - typedef unsigned short uint16_t; - -#endif /* OTF_INTTYPES_WIN_H */ \ No newline at end of file diff --git a/externals/otf/otflib/libotf_vs08.vcproj b/externals/otf/otflib/libotf_vs08.vcproj deleted file mode 100644 index dd31a58d4bb740aafe3da274f3f5a7486aa8fb58..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/libotf_vs08.vcproj +++ /dev/null @@ -1,463 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="libotf" - ProjectGUID="{6B9B49C9-75CD-400D-B736-5EACA04D0A82}" - RootNamespace="libotf" - Keyword="Win32Proj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="../debug" - IntermediateDirectory="tmp" - ConfigurationType="4" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;OTF_DEBUG;OTF_VERBOSE;HAVE_SYS_STAT_H" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - CompileAs="1" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - AdditionalDependencies="zlib.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="4" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;OTF_DEBUG;OTF_VERBOSE;HAVE_SYS_STAT_H" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - CompileAs="1" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - AdditionalDependencies="zlib.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release Static|Win32" - OutputDirectory="../release_static_32bit" - IntermediateDirectory="tmp_32bit" - ConfigurationType="4" - UseOfMFC="0" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_SYS_STAT_H" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="false" - DebugInformationFormat="0" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - AdditionalDependencies="zlib.lib" - AdditionalLibraryDirectories="" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release Static|x64" - OutputDirectory="../release_static_64bit" - IntermediateDirectory="tmp_64bit" - ConfigurationType="4" - UseOfMFC="0" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_SYS_STAT_H" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="false" - DebugInformationFormat="0" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - AdditionalDependencies="zlib.lib" - AdditionalLibraryDirectories="" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath=".\otf.h" - > - </File> - <File - RelativePath=".\OTF_CopyHandler.h" - > - </File> - <File - RelativePath=".\OTF_Definitions.h" - > - </File> - <File - RelativePath=".\OTF_Errno.h" - > - </File> - <File - RelativePath=".\OTF_File.h" - > - </File> - <File - RelativePath=".\OTF_FileManager.h" - > - </File> - <File - RelativePath=".\OTF_Filenames.h" - > - </File> - <File - RelativePath=".\OTF_Handler.h" - > - </File> - <File - RelativePath=".\OTF_HandlerArray.h" - > - </File> - <File - RelativePath=".\OTF_inttypes.h" - > - </File> - <File - RelativePath=".\OTF_inttypes_win.h" - > - </File> - <File - RelativePath=".\OTF_KeyValue.h" - > - </File> - <File - RelativePath=".\OTF_Keywords.h" - > - </File> - <File - RelativePath=".\OTF_MasterControl.h" - > - </File> - <File - RelativePath=".\OTF_Parse.h" - > - </File> - <File - RelativePath=".\OTF_Platform.h" - > - </File> - <File - RelativePath=".\OTF_Platform_win.h" - > - </File> - <File - RelativePath=".\OTF_RBuffer.h" - > - </File> - <File - RelativePath=".\OTF_Reader.h" - > - </File> - <File - RelativePath=".\OTF_RStream.h" - > - </File> - <File - RelativePath=".\OTF_Version.h" - > - </File> - <File - RelativePath=".\OTF_WBuffer.h" - > - </File> - <File - RelativePath=".\OTF_Writer.h" - > - </File> - <File - RelativePath=".\OTF_WStream.h" - > - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - <Filter - Name="Source Files" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\OTF_CopyHandler.c" - > - </File> - <File - RelativePath=".\OTF_Errno.c" - > - </File> - <File - RelativePath=".\OTF_File.c" - > - </File> - <File - RelativePath=".\OTF_FileManager.c" - > - </File> - <File - RelativePath=".\OTF_Filenames.c" - > - </File> - <File - RelativePath=".\OTF_HandlerArray.c" - > - </File> - <File - RelativePath=".\OTF_inttypes.c" - > - </File> - <File - RelativePath=".\OTF_KeyValue.c" - > - </File> - <File - RelativePath=".\OTF_MasterControl.c" - > - </File> - <File - RelativePath=".\OTF_Parse.c" - > - </File> - <File - RelativePath=".\OTF_Platform.c" - > - </File> - <File - RelativePath=".\OTF_RBuffer.c" - > - </File> - <File - RelativePath=".\OTF_Reader.c" - > - </File> - <File - RelativePath=".\OTF_RStream.c" - > - </File> - <File - RelativePath=".\OTF_WBuffer.c" - > - </File> - <File - RelativePath=".\OTF_Writer.c" - > - </File> - <File - RelativePath=".\OTF_WStream.c" - > - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/externals/otf/otflib/otf.h b/externals/otf/otflib/otf.h deleted file mode 100644 index 4d556539150b6f6369fc01ba13d7010c8ce5e35a..0000000000000000000000000000000000000000 --- a/externals/otf/otflib/otf.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/** - * \mainpage Open Trace Format API Documentation - * - * \section introduction Introduction - * - * This library supports efficient parallel and distributed access to trace - * data and offers selective reading access regarding arbitrary time - * intervals, process selection and record types. Optional auxiliary - * information can assist this selective access. - * - * The Open Trace Format makes use of a portable ASCII encoding. - * It distributes single traces to multiple so called streams - * with one or more files each. Merging of records from multiple files is done - * transparently by the OTF library. The number of possible streams is not - * limited by the number of available file handles. - * - * - * For more information read the specification (docu/api/specification.pdf) - * - * OTF is available under the BSD open source license that allows free usage - * for academic and commercial applications. - * - * - * \section quicklinks Quick Links - * - * \subsection interfaces Interfaces - * - \ref reader "Global Reader" - \ref rstream "Stream Reader" - * - \ref writer "Global Writer" - \ref wstream "Stream Writer " - * - \ref handler "Handlers" - \ref ha "Handler Array" - * - * - \ref fm "File Manager" - * - \ref mc "Master Control" - * - * - \ref keyvalue "KeyValueList" - * - * - \ref misc "Miscellaneous" - * - * \subsection examples Examples - * - \ref reader_example1 "Reader" - * - \ref reader_example2 "Reader 2" - * - \ref rstream_example "Stream Reader" - * - \ref writer_example "Writer" - * - \ref wstream_example "Stream Writer" - * - \ref mc_example "Master Control" - * - \ref keyvalue_read_example "KeyValueList - Read" - * - \ref keyvalue_write_example "KeyValueList - Write" - * - * \subsection Contact - * - report bugs to andreas.knuepfer@tu-dresden.de - * - <a href="http://www.tu-dresden.de/zih/otf">OTF-Home</a> - * - */ - -/** - * @file otf.h - * - * @brief Main include file for applications using OTF. - */ - - -/** - * \defgroup misc Miscellaneous - */ - -/** - * \defgroup internal Internal Interfaces - * - * All files in this module contain Interfaces that are not meant to be accessed directly. - */ - -#ifndef OTF_H -#define OTF_H - - -#include "OTF_Definitions.h" -#include "OTF_KeyValue.h" -#include "OTF_FileManager.h" -#include "OTF_Filenames.h" -#include "OTF_HandlerArray.h" -#include "OTF_MasterControl.h" -#include "OTF_RStream.h" -#include "OTF_Reader.h" -#include "OTF_WStream.h" -#include "OTF_Writer.h" - - -#endif /* OTF_H */ - diff --git a/externals/otf/otflib_py/Makefile.am b/externals/otf/otflib_py/Makefile.am deleted file mode 100644 index a4e03fc392e32de4d3a362cf7bd1fe3e7075eca3..0000000000000000000000000000000000000000 --- a/externals/otf/otflib_py/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -EXTRA_DIST = otf.i - -INCLUDES = \ - $(ZLIB_INCLUDE_LINE) \ - -I$(top_builddir)/otflib -I$(top_srcdir)/otflib - - -noinst_HEADERS = \ - pyOTF_AuxiliaryFunctions.h \ - pyOTF_Wrapper.h - - -pkgpython_PYTHON = __init__.py -nodist_pkgpython_PYTHON = otf.py -pkgpyexec_LTLIBRARIES = _otf.la -nodist__otf_la_SOURCES = otf_wrap.c -_otf_la_CPPFLAGS = $(SWIG_PYTHON_CPPFLAGS) -_otf_la_LDFLAGS = -module -_otf_la_LIBADD = $(top_builddir)/otflib/libotf.la -_otf_la_DEPENDENCIES = $(_otf_la_LDADD) - -otf_wrap.c : otf.i - $(SWIG) $(SWIG_PYTHON_OPT) $(INCLUDES) -o $@ $< - -CLEANFILES= \ - otf_wrap.c \ - otf.py diff --git a/externals/otf/otflib_py/Makefile.in b/externals/otf/otflib_py/Makefile.in deleted file mode 100644 index fc10dce736991babdaa9a3f0f31f5b58db15e065..0000000000000000000000000000000000000000 --- a/externals/otf/otflib_py/Makefile.in +++ /dev/null @@ -1,709 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = otflib_py -DIST_COMMON = README $(noinst_HEADERS) $(pkgpython_PYTHON) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(pkgpyexecdir)" \ - "$(DESTDIR)$(pkgpythondir)" "$(DESTDIR)$(pkgpythondir)" -LTLIBRARIES = $(pkgpyexec_LTLIBRARIES) -nodist__otf_la_OBJECTS = _otf_la-otf_wrap.lo -_otf_la_OBJECTS = $(nodist__otf_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -_otf_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(_otf_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(nodist__otf_la_SOURCES) -DIST_SOURCES = -py_compile = $(top_srcdir)/config/py-compile -HEADERS = $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = otf.i -INCLUDES = \ - $(ZLIB_INCLUDE_LINE) \ - -I$(top_builddir)/otflib -I$(top_srcdir)/otflib - -noinst_HEADERS = \ - pyOTF_AuxiliaryFunctions.h \ - pyOTF_Wrapper.h - -pkgpython_PYTHON = __init__.py -nodist_pkgpython_PYTHON = otf.py -pkgpyexec_LTLIBRARIES = _otf.la -nodist__otf_la_SOURCES = otf_wrap.c -_otf_la_CPPFLAGS = $(SWIG_PYTHON_CPPFLAGS) -_otf_la_LDFLAGS = -module -_otf_la_LIBADD = $(top_builddir)/otflib/libotf.la -_otf_la_DEPENDENCIES = $(_otf_la_LDADD) -CLEANFILES = \ - otf_wrap.c \ - otf.py - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign otflib_py/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign otflib_py/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-pkgpyexecLTLIBRARIES: $(pkgpyexec_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(pkgpyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpyexecdir)" - @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgpyexecdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgpyexecdir)"; \ - } - -uninstall-pkgpyexecLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgpyexecdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgpyexecdir)/$$f"; \ - done - -clean-pkgpyexecLTLIBRARIES: - -test -z "$(pkgpyexec_LTLIBRARIES)" || rm -f $(pkgpyexec_LTLIBRARIES) - @list='$(pkgpyexec_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -_otf.la: $(_otf_la_OBJECTS) $(_otf_la_DEPENDENCIES) - $(AM_V_CCLD)$(_otf_la_LINK) -rpath $(pkgpyexecdir) $(_otf_la_OBJECTS) $(_otf_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_otf_la-otf_wrap.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -_otf_la-otf_wrap.lo: otf_wrap.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_otf_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _otf_la-otf_wrap.lo -MD -MP -MF $(DEPDIR)/_otf_la-otf_wrap.Tpo -c -o _otf_la-otf_wrap.lo `test -f 'otf_wrap.c' || echo '$(srcdir)/'`otf_wrap.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/_otf_la-otf_wrap.Tpo $(DEPDIR)/_otf_la-otf_wrap.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='otf_wrap.c' object='_otf_la-otf_wrap.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_otf_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _otf_la-otf_wrap.lo `test -f 'otf_wrap.c' || echo '$(srcdir)/'`otf_wrap.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-nodist_pkgpythonPYTHON: $(nodist_pkgpython_PYTHON) - @$(NORMAL_INSTALL) - test -z "$(pkgpythondir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpythondir)" - @list='$(nodist_pkgpython_PYTHON)'; dlist=; list2=; test -n "$(pkgpythondir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ - $(am__strip_dir) \ - dlist="$$dlist $$f"; \ - list2="$$list2 $$b$$p"; \ - else :; fi; \ - done; \ - for file in $$list2; do echo $$file; done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgpythondir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgpythondir)" || exit $$?; \ - done || exit $$?; \ - if test -n "$$dlist"; then \ - if test -z "$(DESTDIR)"; then \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(pkgpythondir)" $$dlist; \ - else \ - PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pkgpythondir)" $$dlist; \ - fi; \ - else :; fi - -uninstall-nodist_pkgpythonPYTHON: - @$(NORMAL_UNINSTALL) - @list='$(nodist_pkgpython_PYTHON)'; test -n "$(pkgpythondir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - filesc=`echo "$$files" | sed 's|$$|c|'`; \ - fileso=`echo "$$files" | sed 's|$$|o|'`; \ - echo " ( cd '$(DESTDIR)$(pkgpythondir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgpythondir)" && rm -f $$files || exit $$?; \ - echo " ( cd '$(DESTDIR)$(pkgpythondir)' && rm -f" $$filesc ")"; \ - cd "$(DESTDIR)$(pkgpythondir)" && rm -f $$filesc || exit $$?; \ - echo " ( cd '$(DESTDIR)$(pkgpythondir)' && rm -f" $$fileso ")"; \ - cd "$(DESTDIR)$(pkgpythondir)" && rm -f $$fileso -install-pkgpythonPYTHON: $(pkgpython_PYTHON) - @$(NORMAL_INSTALL) - test -z "$(pkgpythondir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpythondir)" - @list='$(pkgpython_PYTHON)'; dlist=; list2=; test -n "$(pkgpythondir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ - $(am__strip_dir) \ - dlist="$$dlist $$f"; \ - list2="$$list2 $$b$$p"; \ - else :; fi; \ - done; \ - for file in $$list2; do echo $$file; done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgpythondir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgpythondir)" || exit $$?; \ - done || exit $$?; \ - if test -n "$$dlist"; then \ - if test -z "$(DESTDIR)"; then \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(pkgpythondir)" $$dlist; \ - else \ - PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pkgpythondir)" $$dlist; \ - fi; \ - else :; fi - -uninstall-pkgpythonPYTHON: - @$(NORMAL_UNINSTALL) - @list='$(pkgpython_PYTHON)'; test -n "$(pkgpythondir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - filesc=`echo "$$files" | sed 's|$$|c|'`; \ - fileso=`echo "$$files" | sed 's|$$|o|'`; \ - echo " ( cd '$(DESTDIR)$(pkgpythondir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgpythondir)" && rm -f $$files || exit $$?; \ - echo " ( cd '$(DESTDIR)$(pkgpythondir)' && rm -f" $$filesc ")"; \ - cd "$(DESTDIR)$(pkgpythondir)" && rm -f $$filesc || exit $$?; \ - echo " ( cd '$(DESTDIR)$(pkgpythondir)' && rm -f" $$fileso ")"; \ - cd "$(DESTDIR)$(pkgpythondir)" && rm -f $$fileso - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pkgpythondir)" "$(DESTDIR)$(pkgpythondir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -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-generic clean-libtool clean-pkgpyexecLTLIBRARIES \ - 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-nodist_pkgpythonPYTHON \ - install-pkgpythonPYTHON - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-pkgpyexecLTLIBRARIES - -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: uninstall-nodist_pkgpythonPYTHON \ - uninstall-pkgpyexecLTLIBRARIES uninstall-pkgpythonPYTHON - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkgpyexecLTLIBRARIES 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-nodist_pkgpythonPYTHON install-pdf install-pdf-am \ - install-pkgpyexecLTLIBRARIES install-pkgpythonPYTHON \ - 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 uninstall-nodist_pkgpythonPYTHON \ - uninstall-pkgpyexecLTLIBRARIES uninstall-pkgpythonPYTHON - - -otf_wrap.c : otf.i - $(SWIG) $(SWIG_PYTHON_OPT) $(INCLUDES) -o $@ $< - -# 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/externals/otf/otflib_py/README b/externals/otf/otflib_py/README deleted file mode 100644 index 38326c830dd521da771d1fb0236c06686a7acadf..0000000000000000000000000000000000000000 --- a/externals/otf/otflib_py/README +++ /dev/null @@ -1,17 +0,0 @@ -otf python bindings --- - -The interface is exact the same as in C -except: - - all 'OTF_*_*Progress' functions return a list of 4 values, namely - [old-return-value, minimum, current, maximum] and take only one argument, - which is a pointer to a OTF_{Reader,RStream} object - - - the function 'OTF_KeyValueList_getByteArray' returns a list of 3 objects, - where the third object is a list, that contains the byte array. The first - object is the return-value and the second holds the length of the array. - This functions expects two arguments (OTF_KeyValueList*, uint32_t) - - - all other 'OTF_KeyValueList_get*' functions return a list of 2 values, namely - [return-value, value] and take only 2 arguments (OTF_KeyValueList*, uint32_t) - diff --git a/externals/otf/otflib_py/__init__.py b/externals/otf/otflib_py/__init__.py deleted file mode 100644 index 25a7982ee7bfb5510acbfa03ba91a1aa48c0eb1a..0000000000000000000000000000000000000000 --- a/externals/otf/otflib_py/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from otf import * diff --git a/externals/otf/otflib_py/otf.i b/externals/otf/otflib_py/otf.i deleted file mode 100644 index 454c96e65eef49e3aef0eb96d498240975759d62..0000000000000000000000000000000000000000 --- a/externals/otf/otflib_py/otf.i +++ /dev/null @@ -1,1118 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -/* - * no structures will be included, so they are no accessable through python - * - * Time- and BytesProgress now have 4 return values. 1. real return value and - * and min/cur/max - e.g. [ 1, 0, 100, 100000 ] - * - */ - - -%module otf -%{ - -#include "otf.h" - -#include "pyOTF_AuxiliaryFunctions.h" - -#include "pyOTF_Wrapper.h" - -%} - - -/* *** conversion from C datatypes to python data types *** */ -%apply unsigned char { uint8_t } -%apply signed char { int8_t } -%apply unsigned short { uint16_t } -%apply signed short { int16_t } -%apply unsigned int { uint32_t } -%apply signed int { int32_t } -%apply unsigned long long { uint64_t } -%apply signed long long { int64_t } - -%apply unsigned long long *OUTPUT { uint64_t* minimum, uint64_t* current, uint64_t* maximum }; /* progress return values */ -%apply char *OUTPUT { char* value }; -%apply signed char *OUTPUT { int8_t* value }; -%apply unsigned char *OUTPUT { uint8_t* value, uint8_t* len }; -%apply signed short *OUTPUT { int16_t* value }; -%apply unsigned short *OUTPUT { uint16_t* value }; -%apply signed int *OUTPUT { int32_t* value }; -%apply unsigned int *OUTPUT { uint32_t* value, uint32_t* key }; -%apply signed long long *OUTPUT { int64_t* value }; -%apply unsigned long long *OUTPUT { uint64_t* value }; -%apply float *OUTPUT { float* value }; -%apply double *OUTPUT { double* value }; - - -/* *** other interfaces *** */ - -/* OTF_Definitions.h */ -%include ../otflib/OTF_Definitions.h - - -/* OTF_FileManager.h */ -%ignore OTF_FileManager_guaranteeFile; /* the user shouldn't use this function */ -%ignore OTF_FileManager_registerFile; /* the user shouldn't use this function */ -%ignore OTF_FileManager_touchFile; /* the user shouldn't use this function */ -%ignore OTF_FileManager_suspendFile; /* the user shouldn't use this function */ - -%include ../otflib/OTF_FileManager.h - - -/* OTF_Filenames.h */ -%include ../otflib/OTF_Filenames.h - - -/* OTF_HandlerArray.h */ -%ignore OTF_HandlerArray_getCopyHandler; - -%ignore struct_OTF_HandlerArray; -%ignore OTF_HandlerArray_close; -%ignore OTF_HandlerArray_setHandler; -%ignore OTF_HandlerArray_setFirstHandlerArg; - -%ignore OTF_Handler_DefinitionComment; -%ignore OTF_Handler_DefTimerResolution; -%ignore OTF_Handler_DefProcess; -%ignore OTF_Handler_DefProcessGroup; -%ignore OTF_Handler_DefAttributeList; -%ignore OTF_Handler_DefProcessOrGroupAttributes; -%ignore OTF_Handler_DefFunction; -%ignore OTF_Handler_DefFunctionGroup; -%ignore OTF_Handler_DefCollectiveOperation; -%ignore OTF_Handler_DefCounter; -%ignore OTF_Handler_DefCounterGroup; -%ignore OTF_Handler_DefScl; -%ignore OTF_Handler_DefSclFile; -%ignore OTF_Handler_DefCreator; -%ignore OTF_Handler_DefVersion; -%ignore OTF_Handler_DefFile; -%ignore OTF_Handler_DefFileGroup; -%ignore OTF_Handler_DefKeyValue; -%ignore OTF_Handler_NoOp; -%ignore OTF_Handler_Enter; -%ignore OTF_Handler_Leave; -%ignore OTF_Handler_SendMsg; -%ignore OTF_Handler_RecvMsg; -%ignore OTF_Handler_Counter; -%ignore OTF_Handler_CollectiveOperation; -%ignore OTF_Handler_BeginCollectiveOperation; -%ignore OTF_Handler_EndCollectiveOperation; -%ignore OTF_Handler_EventComment; -%ignore OTF_Handler_BeginProcess; -%ignore OTF_Handler_EndProcess; -%ignore OTF_Handler_FileOperation; -%ignore OTF_Handler_BeginFileOperation; -%ignore OTF_Handler_EndFileOperation; -%ignore OTF_Handler_RMAPut; -%ignore OTF_Handler_RMAPutRemoteEnd; -%ignore OTF_Handler_RMAGet; -%ignore OTF_Handler_RMAEnd; -%ignore OTF_Handler_SnapshotComment; -%ignore OTF_Handler_EnterSnapshot; -%ignore OTF_Handler_SendSnapshot; -%ignore OTF_Handler_OpenFileSnapshot; -%ignore OTF_Handler_BeginCollopSnapshot; -%ignore OTF_Handler_BeginFileOpSnapshot; -%ignore OTF_Handler_SummaryComment; -%ignore OTF_Handler_FunctionSummary; -%ignore OTF_Handler_FunctionGroupSummary; -%ignore OTF_Handler_MessageSummary; -%ignore OTF_Handler_CollopSummary; -%ignore OTF_Handler_FileOperationSummary; -%ignore OTF_Handler_FileGroupOperationSummary; -%ignore OTF_Handler_UnknownRecord; -%ignore OTF_Handler_DefMarker; -%ignore OTF_Handler_Marker; - - -%include ../otflib/OTF_HandlerArray.h - - -/* OTF_inttypes.h */ -%include ../otflib/OTF_inttypes.h - - -/* OTF_MasterControl.h */ -%ignore struct_OTF_MapEntry; -%ignore struct_OTF_Pair; -%ignore struct_OTF_MasterControl; -%ignore OTF_MasterControl_appendList; /* replaced by wrapper */ - -%include ../otflib/OTF_MasterControl.h - -/* OTF_KeyValue.h */ -%ignore OTF_KeyValueList_appendByteArray; -%ignore OTF_KeyValueList_getByteArray; -%include ../otflib/OTF_KeyValue.h - - -/* OTF_Reader.h */ - -%include ../otflib/OTF_Reader.h - - -/* OTF_RStream.h */ -%ignore struct_OTF_RStream; - -%include ../otflib/OTF_RStream.h - - -/* OTF_Writer.h */ -%ignore OTF_Writer_writeOtfVersion; -%ignore OTF_Writer_writeDefProcessGroupKV; -%ignore OTF_Writer_writeDefProcessGroup; -%ignore OTF_Writer_writeDefAttributeListKV; -%ignore OTF_Writer_writeDefAttributeList; - - -%include ../otflib/OTF_Writer.h - - -/* OTF_WStream.h */ -%ignore struct_OTF_WStream; - -%include ../otflib/OTF_WStream.h - - -/* *** functions that had to be wrapped up *** */ -%rename(OTF_COUNTER_VARTYPE_ISINTEGER) pyOTF_COUNTER_VARTYPE_ISINTEGER; -%rename(OTF_COUNTER_VARTYPE_ISSIGNED) pyOTF_COUNTER_VARTYPE_ISSIGNED; -%rename(OTF_COUNTER_VARTYPE_ISUNSIGNED) pyOTF_COUNTER_VARTYPE_ISUNSIGNED; - -%rename(OTF_MasterControl_appendList) pyOTF_MasterControl_appendList; -%rename(OTF_HandlerArray_close) pyOTF_HandlerArray_close; -%rename(OTF_HandlerArray_setHandler) pyOTF_HandlerArray_setHandler; -%rename(OTF_HandlerArray_setFirstHandlerArg) pyOTF_HandlerArray_setFirstHandlerArg; - -%rename(OTF_KeyValueList_appendByteArray) pyOTF_KeyValueList_appendByteArray; -%rename(OTF_KeyValueList_getByteArray) pyOTF_KeyValueList_getByteArray; - -%rename(OTF_Writer_writeDefProcessGroupKV) pyOTF_Writer_writeDefProcessGroupKV; -%rename(OTF_Writer_writeDefProcessGroup) pyOTF_Writer_writeDefProcessGroup; -%rename(OTF_Writer_writeDefAttributeListKV) pyOTF_Writer_writeDefAttributeListKV; -%rename(OTF_Writer_writeDefAttributeList) pyOTF_Writer_writeDefAttributeList; - - -%ignore pyOTF_FirstHandlerArgument; -/*%ignore pyOTF_KeyValueList;*/ - -%ignore pyOTF_Handler_DefinitionComment; -%ignore pyOTF_Handler_DefTimerResolution; -%ignore pyOTF_Handler_DefProcess; -%ignore pyOTF_Handler_DefProcessGroup; -%ignore pyOTF_Handler_DefAttributeList; -%ignore pyOTF_Handler_DefProcessOrGroupAttributes; -%ignore pyOTF_Handler_DefFunction; -%ignore pyOTF_Handler_DefFunctionGroup; -%ignore pyOTF_Handler_DefCollectiveOperation; -%ignore pyOTF_Handler_DefCounter; -%ignore pyOTF_Handler_DefCounterGroup; -%ignore pyOTF_Handler_DefScl; -%ignore pyOTF_Handler_DefSclFile; -%ignore pyOTF_Handler_DefCreator; -%ignore pyOTF_Handler_DefVersion; -%ignore pyOTF_Handler_DefFile; -%ignore pyOTF_Handler_DefFileGroup; -%ignore pyOTF_Handler_DefKeyValue; -%ignore pyOTF_Handler_NoOp; -%ignore pyOTF_Handler_Enter; -%ignore pyOTF_Handler_Leave; -%ignore pyOTF_Handler_SendMsg; -%ignore pyOTF_Handler_RecvMsg; -%ignore pyOTF_Handler_Counter; -%ignore pyOTF_Handler_CollectiveOperation; -%ignore pyOTF_Handler_BeginCollectiveOperation; -%ignore pyOTF_Handler_EndCollectiveOperation; -%ignore pyOTF_Handler_EventComment; -%ignore pyOTF_Handler_BeginProcess; -%ignore pyOTF_Handler_EndProcess; -%ignore pyOTF_Handler_FileOperation; -%ignore pyOTF_Handler_BeginFileOperation; -%ignore pyOTF_Handler_EndFileOperation; -%ignore pyOTF_Handler_RMAPut; -%ignore pyOTF_Handler_RMAPutRemoteEnd; -%ignore pyOTF_Handler_RMAGet; -%ignore pyOTF_Handler_RMAEnd; -%ignore pyOTF_Handler_SnapshotComment; -%ignore pyOTF_Handler_EnterSnapshot; -%ignore pyOTF_Handler_SendSnapshot; -%ignore pyOTF_Handler_OpenFileSnapshot; -%ignore pyOTF_Handler_BeginCollopSnapshot; -%ignore pyOTF_Handler_BeginFileOpSnapshot; -%ignore pyOTF_Handler_SummaryComment; -%ignore pyOTF_Handler_FunctionSummary; -%ignore pyOTF_Handler_FunctionGroupSummary; -%ignore pyOTF_Handler_MessageSummary; -%ignore pyOTF_Handler_CollopSummary; -%ignore pyOTF_Handler_FileOperationSummary; -%ignore pyOTF_Handler_FileGroupOperationSummary; -%ignore pyOTF_Handler_UnknownRecord; -%ignore pyOTF_Handler_DefMarker; -%ignore pyOTF_Handler_Marker; - - -%include pyOTF_Wrapper.h - - -/* OTF_Copyhandler.h */ -%pythoncode %{ - -def OTF_CopyHandler_DefinitionComment( writer , stream, - comment, pylist): - - if OTF_Writer_writeDefinitionCommentKV( writer , stream, - comment, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefTimerResolution( writer , stream, - ticksPerSecond, pylist): - - if OTF_Writer_writeDefTimerResolutionKV( writer , stream, - ticksPerSecond, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefProcess( writer , stream, - process, name, parent, - pylist): - - if OTF_Writer_writeDefProcessKV( writer , stream, - process, name, parent, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefProcessGroup( writer , stream, - procGroup, name, numberOfProcs, - pyprocs, pylist): - - if OTF_Writer_writeDefProcessGroupKV( writer , stream, - procGroup, name, numberOfProcs, - pyprocs, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefAttributeList( writer , stream, - attr_token, num, pyarray, - pylist): - - if OTF_Writer_writeDefAttributeListKV( writer , stream, - attr_token, num, pyarray, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefProcessOrGroupAttributes( writer , stream, - proc_token, attr_token, pylist): - - if OTF_Writer_writeDefProcessOrGroupAttributesKV( writer , stream, - proc_token, attr_token, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefFunction( writer , stream, - func, name, funcGroup, - source, pylist): - - if OTF_Writer_writeDefFunctionKV( writer , stream, - func, name, funcGroup, - source, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefFunctionGroup( writer , stream, - funcGroup, name, pylist): - - if OTF_Writer_writeDefFunctionGroupKV( writer , stream, - funcGroup, name, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefCollectiveOperation( writer , stream, - collOp, name, type, - pylist): - - if OTF_Writer_writeDefCollectiveOperationKV( writer , stream, - collOp, name, type, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefCounter( writer , stream, - counter, name, properties, - counterGroup, unit, pylist): - - if OTF_Writer_writeDefCounterKV( writer , stream, - counter, name, properties, - counterGroup, unit, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefCounterGroup( writer , stream, - counterGroup, name, pylist): - - if OTF_Writer_writeDefCounterGroupKV( writer , stream, - counterGroup, name, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefScl( writer , stream, - source, sourceFile, line, - pylist): - - if OTF_Writer_writeDefSclKV( writer , stream, - source, sourceFile, line, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefSclFile( writer , stream, - sourceFile, name, pylist): - - if OTF_Writer_writeDefSclFileKV( writer , stream, - sourceFile, name, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefCreator( writer , stream, - creator, pylist): - - if OTF_Writer_writeDefCreatorKV( writer , stream, - creator, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefVersion( writer , stream, - major, minor, sub, - string, pylist): - - #version is writen implicitly - - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefFile( writer , stream, - token, name, group, - pylist): - - if OTF_Writer_writeDefFileKV( writer , stream, - token, name, group, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefFileGroup( writer , stream, - token, name, pylist): - - if OTF_Writer_writeDefFileGroupKV( writer , stream, - token, name, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefKeyValue( writer , stream, - key, type, name, - description, pylist): - - if OTF_Writer_writeDefKeyValueKV( writer , stream, - key, type, name, - description, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_NoOp( writer , time, - process, pylist): - - if OTF_Writer_writeNoOpKV( writer , time, - process, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_Enter( writer , time, - function, process, source, - pylist): - - if OTF_Writer_writeEnterKV( writer , time, - function, process, source, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_Leave( writer , time, - function, process, source, - pylist): - - if OTF_Writer_writeLeaveKV( writer , time, - function, process, source, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_SendMsg( writer , time, - sender, receiver, group, - type, length, source, - pylist): - - if OTF_Writer_writeSendMsgKV( writer , time, - sender, receiver, group, - type, length, source, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_RecvMsg( writer , time, - recvProc, sendProc, group, - type, length, source, - pylist): - - if OTF_Writer_writeRecvMsgKV( writer , time, - recvProc, sendProc, group, - type, length, source, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_Counter( writer , time, - process, counter, value, - pylist): - - if OTF_Writer_writeCounterKV( writer , time, - process, counter, value, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_CollectiveOperation( writer , time, - process, collective, procGroup, - rootProc, sent, received, - duration, source, pylist): - - if OTF_Writer_writeCollectiveOperationKV( writer , time, - process, collective, procGroup, - rootProc, sent, received, - duration, source, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_BeginCollectiveOperation( writer , time, - process, collOp, matchingId, - procGroup, rootProc, sent, - received, scltoken, pylist): - - if OTF_Writer_writeBeginCollectiveOperationKV( writer , time, - process, collOp, matchingId, - procGroup, rootProc, sent, - received, scltoken, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_EndCollectiveOperation( writer , time, - process, matchingId, pylist): - - if OTF_Writer_writeEndCollectiveOperationKV( writer , time, - process, matchingId, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_EventComment( writer , time, - process, comment, pylist): - - if OTF_Writer_writeEventCommentKV( writer , time, - process, comment, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_BeginProcess( writer , time, - process, pylist): - - if OTF_Writer_writeBeginProcessKV( writer , time, - process, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_EndProcess( writer , time, - process, pylist): - - if OTF_Writer_writeEndProcessKV( writer , time, - process, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_FileOperation( writer , time, - fileid, process, handleid, - operation, bytes, duration, - source, pylist): - - if OTF_Writer_writeFileOperationKV( writer , time, - fileid, process, handleid, - operation, bytes, duration, - source, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_BeginFileOperation( writer , time, - process, matchingId, scltoken, - pylist): - - if OTF_Writer_writeBeginFileOperationKV( writer , time, - process, matchingId, scltoken, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_EndFileOperation( writer , time, - process, fileid, matchingId, - handleId, operation, bytes, - scltoken, pylist): - - if OTF_Writer_writeEndFileOperationKV( writer , time, - process, fileid, matchingId, - handleId, operation, bytes, - scltoken, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_RMAPut( writer , time, - process, origin, target, - communicator, tag, bytes, - source, pylist): - - if OTF_Writer_writeRMAPutKV( writer , time, - process, origin, target, - communicator, tag, bytes, - source, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_RMAPutRemoteEnd( writer , time, - process, origin, target, - communicator, tag, bytes, - source, pylist): - - if OTF_Writer_writeRMAPutRemoteEndKV( writer , time, - process, origin, target, - communicator, tag, bytes, - source, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_RMAGet( writer , time, - process, origin, target, - communicator, tag, bytes, - source, pylist): - - if OTF_Writer_writeRMAGetKV( writer , time, - process, origin, target, - communicator, tag, bytes, - source, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_RMAEnd( writer , time, - process, remote, communicator, - tag, source, pylist): - - if OTF_Writer_writeRMAEndKV( writer , time, - process, remote, communicator, - tag, source, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_SnapshotComment( writer , time, - process, comment, pylist): - - if OTF_Writer_writeSnapshotCommentKV( writer , time, - process, comment, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_EnterSnapshot( writer , time, - originaltime, function, process, - source, pylist): - - if OTF_Writer_writeEnterSnapshotKV( writer , time, - originaltime, function, process, - source, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_SendSnapshot( writer , time, - originaltime, sender, receiver, - procGroup, tag, length, - source, pylist): - - if OTF_Writer_writeSendSnapshotKV( writer , time, - originaltime, sender, receiver, - procGroup, tag, length, - source, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_OpenFileSnapshot( writer , time, - originaltime, fileid, process, - handleid, source, pylist): - - if OTF_Writer_writeOpenFileSnapshotKV( writer , time, - originaltime, fileid, process, - handleid, source, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_BeginCollopSnapshot( writer , time, - originaltime, process, collOp, - matchingId, procGroup, rootProc, - sent, received, scltoken, - pylist): - - if OTF_Writer_writeBeginCollopSnapshotKV( writer , time, - originaltime, process, collOp, - matchingId, procGroup, rootProc, - sent, received, scltoken, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_BeginFileOpSnapshot( writer , time, - originaltime, process, matchingId, - scltoken, pylist): - - if OTF_Writer_writeBeginFileOpSnapshotKV( writer , time, - originaltime, process, matchingId, - scltoken, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_SummaryComment( writer , time, - process, comment, pylist): - - if OTF_Writer_writeSummaryCommentKV( writer , time, - process, comment, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_FunctionSummary( writer , time, - function, process, invocations, - exclTime, inclTime, pylist): - - if OTF_Writer_writeFunctionSummaryKV( writer , time, - function, process, invocations, - exclTime, inclTime, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_FunctionGroupSummary( writer , time, - funcGroup, process, invocations, - exclTime, inclTime, pylist): - - if OTF_Writer_writeFunctionGroupSummaryKV( writer , time, - funcGroup, process, invocations, - exclTime, inclTime, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_MessageSummary( writer , time, - process, peer, comm, - type, sentNumber, receivedNumber, - sentBytes, receivedBytes, pylist): - - if OTF_Writer_writeMessageSummaryKV( writer , time, - process, peer, comm, - type, sentNumber, receivedNumber, - sentBytes, receivedBytes, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_CollopSummary( writer , time, - process, comm, collective, - sentNumber, receivedNumber, sentBytes, - receivedBytes, pylist): - - if OTF_Writer_writeCollopSummaryKV( writer , time, - process, comm, collective, - sentNumber, receivedNumber, sentBytes, - receivedBytes, pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_FileOperationSummary( writer , time, - fileid, process, nopen, - nclose, nread, nwrite, - nseek, bytesread, byteswrite, - pylist): - - if OTF_Writer_writeFileOperationSummaryKV( writer , time, - fileid, process, nopen, - nclose, nread, nwrite, - nseek, bytesread, byteswrite, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_FileGroupOperationSummary( writer , time, - groupid, process, nopen, - nclose, nread, nwrite, - nseek, bytesread, byteswrite, - pylist): - - if OTF_Writer_writeFileGroupOperationSummaryKV( writer , time, - groupid, process, nopen, - nclose, nread, nwrite, - nseek, bytesread, byteswrite, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_UnknownRecord( writer , time, - process, record): - - if OTF_Writer_writeUnknownRecord( writer , time, - process, record ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_DefMarker( writer , stream, - token, name, type, - pylist): - - if OTF_Writer_writeDefMarkerKV( writer , stream, - token, name, type, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_CopyHandler_Marker( writer , time, - process, token, text, - pylist): - - if OTF_Writer_writeMarkerKV( writer , time, - process, token, text, - pylist ) == 0 : - - return OTF_RETURN_ABORT - else : - return OTF_RETURN_OK - - -def OTF_HandlerArray_getCopyHandler( handlers, writer ): - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefinitionComment, OTF_DEFINITIONCOMMENT_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFINITIONCOMMENT_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefTimerResolution, OTF_DEFTIMERRESOLUTION_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFTIMERRESOLUTION_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefProcess, OTF_DEFPROCESS_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFPROCESS_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefProcessGroup, OTF_DEFPROCESSGROUP_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFPROCESSGROUP_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefAttributeList, OTF_DEFATTRLIST_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFATTRLIST_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefProcessOrGroupAttributes, OTF_DEFPROCESSORGROUPATTR_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFPROCESSORGROUPATTR_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefFunction, OTF_DEFFUNCTION_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFFUNCTION_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefFunctionGroup, OTF_DEFFUNCTIONGROUP_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFFUNCTIONGROUP_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefCollectiveOperation, OTF_DEFCOLLOP_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFCOLLOP_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefCounter, OTF_DEFCOUNTER_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFCOUNTER_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefCounterGroup, OTF_DEFCOUNTERGROUP_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFCOUNTERGROUP_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefScl, OTF_DEFSCL_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFSCL_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefSclFile, OTF_DEFSCLFILE_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFSCLFILE_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefCreator, OTF_DEFCREATOR_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFCREATOR_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefVersion, OTF_DEFVERSION_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFVERSION_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefFile, OTF_DEFFILE_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFFILE_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefFileGroup, OTF_DEFFILEGROUP_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFFILEGROUP_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefKeyValue, OTF_DEFKEYVALUE_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFKEYVALUE_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_NoOp, OTF_NOOP_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_NOOP_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_Enter, OTF_ENTER_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_ENTER_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_Leave, OTF_LEAVE_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_LEAVE_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_SendMsg, OTF_SEND_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_SEND_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_RecvMsg, OTF_RECEIVE_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_RECEIVE_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_Counter, OTF_COUNTER_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_COUNTER_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_CollectiveOperation, OTF_COLLOP_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_COLLOP_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_BeginCollectiveOperation, OTF_BEGINCOLLOP_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_BEGINCOLLOP_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_EndCollectiveOperation, OTF_ENDCOLLOP_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_ENDCOLLOP_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_EventComment, OTF_EVENTCOMMENT_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_EVENTCOMMENT_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_BeginProcess, OTF_BEGINPROCESS_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_BEGINPROCESS_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_EndProcess, OTF_ENDPROCESS_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_ENDPROCESS_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_FileOperation, OTF_FILEOPERATION_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_FILEOPERATION_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_BeginFileOperation, OTF_BEGINFILEOP_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_BEGINFILEOP_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_EndFileOperation, OTF_ENDFILEOP_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_ENDFILEOP_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_RMAPut, OTF_RMAPUT_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_RMAPUT_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_RMAPutRemoteEnd, OTF_RMAPUTRE_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_RMAPUTRE_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_RMAGet, OTF_RMAGET_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_RMAGET_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_RMAEnd, OTF_RMAEND_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_RMAEND_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_SnapshotComment, OTF_SNAPSHOTCOMMENT_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_SNAPSHOTCOMMENT_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_EnterSnapshot, OTF_ENTERSNAPSHOT_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_ENTERSNAPSHOT_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_SendSnapshot, OTF_SENDSNAPSHOT_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_SENDSNAPSHOT_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_OpenFileSnapshot, OTF_OPENFILESNAPSHOT_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_OPENFILESNAPSHOT_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_BeginCollopSnapshot, OTF_BEGINCOLLOPSNAPSHOT_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_BEGINCOLLOPSNAPSHOT_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_BeginFileOpSnapshot, OTF_BEGINFILEOPSNAPSHOT_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_BEGINFILEOPSNAPSHOT_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_SummaryComment, OTF_SUMMARYCOMMENT_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_SUMMARYCOMMENT_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_FunctionSummary, OTF_FUNCTIONSUMMARY_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_FUNCTIONSUMMARY_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_FunctionGroupSummary, OTF_FUNCTIONGROUPSUMMARY_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_FUNCTIONGROUPSUMMARY_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_MessageSummary, OTF_MESSAGESUMMARY_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_MESSAGESUMMARY_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_CollopSummary, OTF_COLLOPSUMMARY_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_COLLOPSUMMARY_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_FileOperationSummary, OTF_FILEOPERATIONSUMMARY_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_FILEOPERATIONSUMMARY_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_FileGroupOperationSummary, OTF_FILEGROUPOPERATIONSUMMARY_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_FILEGROUPOPERATIONSUMMARY_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_UnknownRecord, OTF_UNKNOWN_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_UNKNOWN_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_DefMarker, OTF_DEFMARKER_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_DEFMARKER_RECORD ) - - OTF_HandlerArray_setHandler( handlers, OTF_CopyHandler_Marker, OTF_MARKER_RECORD ) - OTF_HandlerArray_setFirstHandlerArg( handlers, writer, OTF_MARKER_RECORD ) - - return 1 - - -%} diff --git a/externals/otf/otflib_py/pyOTF_AuxiliaryFunctions.h b/externals/otf/otflib_py/pyOTF_AuxiliaryFunctions.h deleted file mode 100644 index f6a8e55320fefbdacaee022433086ae9dd3c3926..0000000000000000000000000000000000000000 --- a/externals/otf/otflib_py/pyOTF_AuxiliaryFunctions.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef PYOTF_AUXILIARYFUNCTIONS_H -#define PYOTF_AUXILIARYFUNCTIONS_H - -uint32_t* createInt32ArrayFromSequence( PyObject* list ); -uint8_t* createInt8ArrayFromSequence( PyObject* list ); -PyObject* createSequenceFromInt8Array( uint8_t* array, uint8_t len ); - -/* conversion from python sequence to uint32_t array -CREATES AN ARRAY - you have to free it yourself */ -uint32_t* createInt32ArrayFromSequence( PyObject* list ) { - - int i; - int dim; - uint32_t* ret; - - if (!PySequence_Check( list )) { -#ifdef OTF_VERBOSE - PyErr_SetString(PyExc_TypeError,"Expecting a sequence"); -#endif /* OTF_VERBOSE */ - return NULL; - } - - dim= PyObject_Length( list ); - - ret= (uint32_t*) malloc( sizeof(uint32_t) * dim ); - - for ( i =0; i < dim; ++i ) { - - PyObject *o = PySequence_GetItem( list ,i ); - - if (!PyInt_Check(o)) { - Py_XDECREF(o); -#ifdef OTF_VERBOSE - PyErr_SetString(PyExc_ValueError,"Expecting a sequence of integers"); -#endif /* OTF_VERBOSE */ - free( ret ); - return NULL; - } - - ret[i] = PyInt_AsLong(o); - Py_DECREF(o); - } - - return ret; -} - -/* conversion from python sequence to uint8_t array -CREATES AN ARRAY - you have to free it yourself */ -uint8_t* createInt8ArrayFromSequence( PyObject* list ) { - - int i; - int dim; - uint8_t* ret; - - if (!PySequence_Check( list )) { -#ifdef OTF_VERBOSE - PyErr_SetString(PyExc_TypeError,"Expecting a sequence"); -#endif /* OTF_VERBOSE */ - return NULL; - } - - dim= PyObject_Length( list ); - - ret= (uint8_t*) malloc( sizeof(uint8_t) * dim ); - - for ( i =0; i < dim; ++i ) { - - PyObject *o = PySequence_GetItem( list ,i ); - - if (!PyInt_Check(o)) { - Py_XDECREF(o); -#ifdef OTF_VERBOSE - PyErr_SetString(PyExc_ValueError,"Expecting a sequence of integers"); -#endif /* OTF_VERBOSE */ - free( ret ); - return NULL; - } - - ret[i] = PyInt_AsLong(o); - Py_DECREF(o); - } - - return ret; -} - -/* conversion from uint8_t array to python list, - creates a python list and returns it */ -PyObject* createSequenceFromInt8Array( uint8_t* array, uint8_t len ) { - - uint8_t i; - PyObject *pylist = PyList_New(len); - - if( ! PyList_Check(pylist) ) { - printf("Creating PyList not possible\n"); - } - - for(i = 0; i < len; i++) { - PyList_SetItem( pylist, i, PyInt_FromLong(array[i]) ); - } - - - return pylist; - -} - - -#endif /* PYOTF_AUXILIARYFUNCTIONS_H */ diff --git a/externals/otf/otflib_py/pyOTF_Wrapper.h b/externals/otf/otflib_py/pyOTF_Wrapper.h deleted file mode 100644 index 91f442a7e78f68ae3ab89b63c6e36d281589f857..0000000000000000000000000000000000000000 --- a/externals/otf/otflib_py/pyOTF_Wrapper.h +++ /dev/null @@ -1,2950 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef PYOTF_WRAPPER_H -#define PYOTF_WRAPPER_H - -/* first handler arg replacement. Containing the Python-function pointer and -the fha specified by the user */ -typedef struct { - - PyObject* func; - PyObject* realfha; - -} pyOTF_FirstHandlerArgument; - - -/* *** PROTOTYPES *********************************************************** */ -/* ************************************************************************** */ -int pyOTF_COUNTER_VARTYPE_ISINTEGER( uint64_t x ); - -int pyOTF_COUNTER_VARTYPE_ISSIGNED( uint64_t x ); - -int pyOTF_COUNTER_VARTYPE_ISUNSIGNED( uint64_t x ); - - -int pyOTF_MasterControl_appendList( OTF_MasterControl* mc, uint32_t argument, - uint32_t l, PyObject* values ); - - -void pyOTF_HandlerArray_close( OTF_HandlerArray* handlers ); - -int pyOTF_HandlerArray_setHandler( OTF_HandlerArray* handlers, PyObject* function, uint32_t recordtype ); - -int pyOTF_HandlerArray_setFirstHandlerArg( OTF_HandlerArray* handlers, PyObject* fha, uint32_t recordtype ); - - -/* functions concerning OTF_KeyValueList */ -uint8_t pyOTF_KeyValueList_appendByteArray( OTF_KeyValueList* kvlist, uint32_t key, PyObject* values, uint8_t len); - -PyObject* pyOTF_KeyValueList_getByteArray( OTF_KeyValueList* kvlist, uint32_t key); - - -/* *** writer declarations ***************************************************** */ - -int pyOTF_Writer_writeDefProcessGroupKV( OTF_Writer* writer, uint32_t stream, - uint32_t procGroup, const char* name, uint32_t numberOfProcs, - PyObject* procs, OTF_KeyValueList* list); - -int pyOTF_Writer_writeDefProcessGroup( OTF_Writer* writer, uint32_t stream, - uint32_t procGroup, const char* name, uint32_t numberOfProcs, - PyObject* procs); - -int pyOTF_Writer_writeDefAttributeListKV( OTF_Writer* writer, uint32_t stream, - uint32_t attr_token, uint32_t num, PyObject* array, - OTF_KeyValueList* list); - -int pyOTF_Writer_writeDefAttributeList( OTF_Writer* writer, uint32_t stream, - uint32_t attr_token, uint32_t num, PyObject* array); - - - -/* *** handler declarations **************************************************** */ - -int pyOTF_Handler_DefinitionComment( void* userData, uint32_t stream, - const char* comment, OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefTimerResolution( void* userData, uint32_t stream, - uint64_t ticksPerSecond, OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefProcess( void* userData, uint32_t stream, - uint32_t process, const char* name, uint32_t parent, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefProcessGroup( void* userData, uint32_t stream, - uint32_t procGroup, const char* name, uint32_t numberOfProcs, - const uint32_t* procs, OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefAttributeList( void* userData, uint32_t stream, - uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE* array, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefProcessOrGroupAttributes( void* userData, uint32_t stream, - uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefFunction( void* userData, uint32_t stream, - uint32_t func, const char* name, uint32_t funcGroup, - uint32_t source, OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefFunctionGroup( void* userData, uint32_t stream, - uint32_t funcGroup, const char* name, OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefCollectiveOperation( void* userData, uint32_t stream, - uint32_t collOp, const char* name, uint32_t type, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefCounter( void* userData, uint32_t stream, - uint32_t counter, const char* name, uint32_t properties, - uint32_t counterGroup, const char* unit, OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefCounterGroup( void* userData, uint32_t stream, - uint32_t counterGroup, const char* name, OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefScl( void* userData, uint32_t stream, - uint32_t source, uint32_t sourceFile, uint32_t line, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefSclFile( void* userData, uint32_t stream, - uint32_t sourceFile, const char* name, OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefCreator( void* userData, uint32_t stream, - const char* creator, OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefVersion( void* userData, uint32_t stream, - uint8_t major, uint8_t minor, uint8_t sub, - const char* string, OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefFile( void* userData, uint32_t stream, - uint32_t token, const char *name, uint32_t group, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefFileGroup( void* userData, uint32_t stream, - uint32_t token, const char *name, OTF_KeyValueList *list ); - - -int pyOTF_Handler_DefKeyValue( void* userData, uint32_t stream, - uint32_t key, OTF_Type type, const char *name, - const char *description, OTF_KeyValueList *list ); - - -int pyOTF_Handler_NoOp( void* userData, uint64_t time, - uint32_t process, OTF_KeyValueList *list ); - - -int pyOTF_Handler_Enter( void* userData, uint64_t time, - uint32_t function, uint32_t process, uint32_t source, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_Leave( void* userData, uint64_t time, - uint32_t function, uint32_t process, uint32_t source, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_SendMsg( void* userData, uint64_t time, - uint32_t sender, uint32_t receiver, uint32_t group, - uint32_t type, uint32_t length, uint32_t source, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_RecvMsg( void* userData, uint64_t time, - uint32_t recvProc, uint32_t sendProc, uint32_t group, - uint32_t type, uint32_t length, uint32_t source, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_Counter( void* userData, uint64_t time, - uint32_t process, uint32_t counter, uint64_t value, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_CollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint32_t collective, uint32_t procGroup, - uint32_t rootProc, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t source, OTF_KeyValueList *list ); - - -int pyOTF_Handler_BeginCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint32_t collOp, uint64_t matchingId, - uint32_t procGroup, uint32_t rootProc, uint64_t sent, - uint64_t received, uint32_t scltoken, OTF_KeyValueList *list ); - - -int pyOTF_Handler_EndCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint64_t matchingId, OTF_KeyValueList *list ); - - -int pyOTF_Handler_EventComment( void* userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ); - - -int pyOTF_Handler_BeginProcess( void* userData, uint64_t time, - uint32_t process, OTF_KeyValueList *list ); - - -int pyOTF_Handler_EndProcess( void* userData, uint64_t time, - uint32_t process, OTF_KeyValueList *list ); - - -int pyOTF_Handler_FileOperation( void* userData, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t handleid, - uint32_t operation, uint64_t bytes, uint64_t duration, - uint32_t source, OTF_KeyValueList *list ); - - -int pyOTF_Handler_BeginFileOperation( void* userData, uint64_t time, - uint32_t process, uint64_t matchingId, uint32_t scltoken, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_EndFileOperation( void* userData, uint64_t time, - uint32_t process, uint32_t fileid, uint64_t matchingId, - uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList *list ); - - -int pyOTF_Handler_RMAPut( void* userData, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source, OTF_KeyValueList *list ); - - -int pyOTF_Handler_RMAPutRemoteEnd( void* userData, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source, OTF_KeyValueList *list ); - - -int pyOTF_Handler_RMAGet( void* userData, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source, OTF_KeyValueList *list ); - - -int pyOTF_Handler_RMAEnd( void* userData, uint64_t time, - uint32_t process, uint32_t remote, uint32_t communicator, - uint32_t tag, uint32_t source, OTF_KeyValueList *list ); - - -int pyOTF_Handler_SnapshotComment( void* userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ); - - -int pyOTF_Handler_EnterSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t function, uint32_t process, - uint32_t source, OTF_KeyValueList *list ); - - -int pyOTF_Handler_SendSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t tag, uint32_t length, - uint32_t source, OTF_KeyValueList *list ); - - -int pyOTF_Handler_OpenFileSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, - uint64_t handleid, uint32_t source, OTF_KeyValueList *list ); - - -int pyOTF_Handler_BeginCollopSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_BeginFileOpSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, - uint32_t scltoken, OTF_KeyValueList *list ); - - -int pyOTF_Handler_SummaryComment( void* userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ); - - -int pyOTF_Handler_FunctionSummary( void* userData, uint64_t time, - uint32_t function, uint32_t process, uint64_t invocations, - uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList *list ); - - -int pyOTF_Handler_FunctionGroupSummary( void* userData, uint64_t time, - uint32_t funcGroup, uint32_t process, uint64_t invocations, - uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList *list ); - - -int pyOTF_Handler_MessageSummary( void* userData, uint64_t time, - uint32_t process, uint32_t peer, uint32_t comm, - uint32_t type, uint64_t sentNumber, uint64_t receivedNumber, - uint64_t sentBytes, uint64_t receivedBytes, OTF_KeyValueList *list ); - - -int pyOTF_Handler_CollopSummary( void *userData, uint64_t time, - uint32_t process, uint32_t comm, uint32_t collective, - uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes, - uint64_t receivedBytes, OTF_KeyValueList *list ); - - -int pyOTF_Handler_FileOperationSummary( void* userData, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t nopen, - uint64_t nclose, uint64_t nread, uint64_t nwrite, - uint64_t nseek, uint64_t bytesread, uint64_t byteswrite, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_FileGroupOperationSummary( void* userData, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, - uint64_t nclose, uint64_t nread, uint64_t nwrite, - uint64_t nseek, uint64_t bytesread, uint64_t byteswrite, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_UnknownRecord( void *userData, uint64_t time, - uint32_t process, const char *record ); - - -int pyOTF_Handler_DefMarker( void *userData, uint32_t stream, - uint32_t token, const char* name, uint32_t type, - OTF_KeyValueList *list ); - - -int pyOTF_Handler_Marker( void *userData, uint64_t time, - uint32_t process, uint32_t token, const char* text, - OTF_KeyValueList *list ); - - - - -/* *** DEFINITIONS ********************************************************** */ -/* ************************************************************************** */ -int pyOTF_COUNTER_VARTYPE_ISINTEGER( uint64_t x ) { - return OTF_COUNTER_VARTYPE_ISINTEGER(x); -} - -int pyOTF_COUNTER_VARTYPE_ISSIGNED( uint64_t x ) { - return OTF_COUNTER_VARTYPE_ISSIGNED(x); -} - -int pyOTF_COUNTER_VARTYPE_ISUNSIGNED( uint64_t x ) { - return OTF_COUNTER_VARTYPE_ISUNSIGNED(x); -} - -/* *** MASTERCONTROL ******************************************************** */ -/* ************************************************************************** */ - -int pyOTF_MasterControl_appendList( OTF_MasterControl* mc, uint32_t argument, - uint32_t l, PyObject* values ) { - - - int ret; - uint32_t* vals= createInt32ArrayFromSequence( values ); - - - ret= OTF_MasterControl_appendList( mc, argument, l, vals ); - - - free( vals ); - - return ret; - -} - -/* *** OTF_KEYVALUE ********************************************************* */ -/* ************************************************************************** */ - -uint8_t pyOTF_KeyValueList_appendByteArray( OTF_KeyValueList* kvlist, uint32_t key, PyObject* values, uint8_t len) { - - uint8_t *array; - uint8_t ret; - - /* convert a python sequence into a C array */ - array = createInt8ArrayFromSequence( values ); - - ret = OTF_KeyValueList_appendByteArray( kvlist, key, array, len ); - - free(array); - - - return ret; -} - -/* this function returns a python sequence of (int, int, list) */ -PyObject* pyOTF_KeyValueList_getByteArray( OTF_KeyValueList* kvlist, uint32_t key) { - - uint8_t len; - uint8_t ret; - uint8_t array[OTF_KEYVALUE_MAX_ARRAY_LEN]; - PyObject* pyarray; - - ret = OTF_KeyValueList_getByteArray( kvlist, key, array, &len); - - pyarray = PyInt_FromLong(ret); - - if( ret != 0 ) { - len = 0; - } - - /* make a squence by appending an object */ - pyarray = SWIG_Python_AppendOutput(pyarray, PyInt_FromLong(len) ); - - /* expand the sequence by appending an list object, that is created from a C array */ - pyarray = SWIG_Python_AppendOutput(pyarray, createSequenceFromInt8Array( array, len) ); - - return pyarray; -} - -/* *** WRITER *************************************************************** */ -/* ************************************************************************** */ - -int pyOTF_Writer_writeDefProcessGroupKV( OTF_Writer* writer, uint32_t stream, - uint32_t procGroup, const char* name, uint32_t numberOfProcs, - PyObject* procs, OTF_KeyValueList* list) { - - - int ret; - uint32_t* pyprocs= createInt32ArrayFromSequence( procs ); - - - ret= OTF_Writer_writeDefProcessGroupKV( writer, stream, - procGroup, name, numberOfProcs, - pyprocs, list); - - free( pyprocs ); - - return ret; -} - -int pyOTF_Writer_writeDefProcessGroup( OTF_Writer* writer, uint32_t stream, - uint32_t procGroup, const char* name, uint32_t numberOfProcs, - PyObject* procs) { - - - int ret; - uint32_t* pyprocs= createInt32ArrayFromSequence( procs ); - - - ret= OTF_Writer_writeDefProcessGroup( writer, stream, - procGroup, name, numberOfProcs, - pyprocs); - - free( pyprocs ); - - return ret; -} - -int pyOTF_Writer_writeDefAttributeListKV( OTF_Writer* writer, uint32_t stream, - uint32_t attr_token, uint32_t num, PyObject* array, - OTF_KeyValueList* list) { - - - int ret; - OTF_ATTR_TYPE* pyarray= createInt32ArrayFromSequence( array ); - - - ret= OTF_Writer_writeDefAttributeListKV( writer, stream, - attr_token, num, pyarray, - list); - - free( pyarray ); - - return ret; -} - -int pyOTF_Writer_writeDefAttributeList( OTF_Writer* writer, uint32_t stream, - uint32_t attr_token, uint32_t num, PyObject* array) { - - - int ret; - OTF_ATTR_TYPE* pyarray= createInt32ArrayFromSequence( array ); - - - ret= OTF_Writer_writeDefAttributeList( writer, stream, - attr_token, num, pyarray); - - free( pyarray ); - - return ret; -} - - - -/* *** HANDLER ARRAY ******************************************************** */ -/* ************************************************************************** */ - -/* *** handler **************************************************** */ - -/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -H= unsigned int -K= unsigned long long (if long long exists (its #ifdefd in python sources) ) -(python 2.5) - -When using l for long int and i for int programs crashed (SEGFAULT) inside -Py_BuildValue() in pyOTF_Handler_EventComment() - -H and K are not documented, thus its not "save" to use them, because future and -past versions of python may differ - -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - -int pyOTF_Handler_DefinitionComment( void* userData, uint32_t stream, - const char* comment, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHsO", fha->realfha, stream, - comment, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefTimerResolution( void* userData, uint32_t stream, - uint64_t ticksPerSecond, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHKO", fha->realfha, stream, - ticksPerSecond, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefProcess( void* userData, uint32_t stream, - uint32_t process, const char* name, uint32_t parent, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHsHO", fha->realfha, stream, - process, name, parent, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefProcessGroup( void* userData, uint32_t stream, - uint32_t procGroup, const char* name, uint32_t numberOfProcs, - const uint32_t* procs, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - - PyObject* pyprocs; - uint32_t i; - PyObject* pylist; - - - pyprocs= PyList_New( numberOfProcs ); - for( i= 0; i < numberOfProcs; ++i ) { - - PyList_SetItem( pyprocs, i, PyInt_FromLong((long) procs[i]) ); - - } - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHsHOO", fha->realfha, stream, - procGroup, name, numberOfProcs, - pyprocs, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefAttributeList( void* userData, uint32_t stream, - uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE* array, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - - PyObject* pyarray; - uint32_t i; - PyObject* pylist; - - - pyarray= PyList_New( num ); - for( i= 0; i < num; ++i ) { - - PyList_SetItem( pyarray, i, PyInt_FromLong((long) array[i]) ); - - } - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHHOO", fha->realfha, stream, - attr_token, num, pyarray, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefProcessOrGroupAttributes( void* userData, uint32_t stream, - uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHHO", fha->realfha, stream, - proc_token, attr_token, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefFunction( void* userData, uint32_t stream, - uint32_t func, const char* name, uint32_t funcGroup, - uint32_t source, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHsHHO", fha->realfha, stream, - func, name, funcGroup, - source, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefFunctionGroup( void* userData, uint32_t stream, - uint32_t funcGroup, const char* name, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHsO", fha->realfha, stream, - funcGroup, name, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefCollectiveOperation( void* userData, uint32_t stream, - uint32_t collOp, const char* name, uint32_t type, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHsHO", fha->realfha, stream, - collOp, name, type, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefCounter( void* userData, uint32_t stream, - uint32_t counter, const char* name, uint32_t properties, - uint32_t counterGroup, const char* unit, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHsHHsO", fha->realfha, stream, - counter, name, properties, - counterGroup, unit, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefCounterGroup( void* userData, uint32_t stream, - uint32_t counterGroup, const char* name, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHsO", fha->realfha, stream, - counterGroup, name, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefScl( void* userData, uint32_t stream, - uint32_t source, uint32_t sourceFile, uint32_t line, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHHHO", fha->realfha, stream, - source, sourceFile, line, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefSclFile( void* userData, uint32_t stream, - uint32_t sourceFile, const char* name, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHsO", fha->realfha, stream, - sourceFile, name, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefCreator( void* userData, uint32_t stream, - const char* creator, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHsO", fha->realfha, stream, - creator, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefVersion( void* userData, uint32_t stream, - uint8_t major, uint8_t minor, uint8_t sub, - const char* string, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHHHsO", fha->realfha, stream, - major, minor, sub, - string, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefFile( void* userData, uint32_t stream, - uint32_t token, const char *name, uint32_t group, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHsHO", fha->realfha, stream, - token, name, group, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefFileGroup( void* userData, uint32_t stream, - uint32_t token, const char *name, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHsO", fha->realfha, stream, - token, name, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefKeyValue( void* userData, uint32_t stream, - uint32_t key, OTF_Type type, const char *name, - const char *description, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHHssO", fha->realfha, stream, - key, type, name, - description, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_NoOp( void* userData, uint64_t time, - uint32_t process, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHO", fha->realfha, time, - process, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_Enter( void* userData, uint64_t time, - uint32_t function, uint32_t process, uint32_t source, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHHO", fha->realfha, time, - function, process, source, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_Leave( void* userData, uint64_t time, - uint32_t function, uint32_t process, uint32_t source, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHHO", fha->realfha, time, - function, process, source, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_SendMsg( void* userData, uint64_t time, - uint32_t sender, uint32_t receiver, uint32_t group, - uint32_t type, uint32_t length, uint32_t source, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHHHHHO", fha->realfha, time, - sender, receiver, group, - type, length, source, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_RecvMsg( void* userData, uint64_t time, - uint32_t recvProc, uint32_t sendProc, uint32_t group, - uint32_t type, uint32_t length, uint32_t source, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHHHHHO", fha->realfha, time, - recvProc, sendProc, group, - type, length, source, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_Counter( void* userData, uint64_t time, - uint32_t process, uint32_t counter, uint64_t value, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHKO", fha->realfha, time, - process, counter, value, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_CollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint32_t collective, uint32_t procGroup, - uint32_t rootProc, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t source, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHHHHHKHO", fha->realfha, time, - process, collective, procGroup, - rootProc, sent, received, - duration, source, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_BeginCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint32_t collOp, uint64_t matchingId, - uint32_t procGroup, uint32_t rootProc, uint64_t sent, - uint64_t received, uint32_t scltoken, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHKHHKKHO", fha->realfha, time, - process, collOp, matchingId, - procGroup, rootProc, sent, - received, scltoken, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_EndCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint64_t matchingId, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHKO", fha->realfha, time, - process, matchingId, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_EventComment( void* userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHsO", fha->realfha, time, - process, comment, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_BeginProcess( void* userData, uint64_t time, - uint32_t process, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHO", fha->realfha, time, - process, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_EndProcess( void* userData, uint64_t time, - uint32_t process, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHO", fha->realfha, time, - process, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_FileOperation( void* userData, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t handleid, - uint32_t operation, uint64_t bytes, uint64_t duration, - uint32_t source, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHKHKKHO", fha->realfha, time, - fileid, process, handleid, - operation, bytes, duration, - source, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_BeginFileOperation( void* userData, uint64_t time, - uint32_t process, uint64_t matchingId, uint32_t scltoken, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHKHO", fha->realfha, time, - process, matchingId, scltoken, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_EndFileOperation( void* userData, uint64_t time, - uint32_t process, uint32_t fileid, uint64_t matchingId, - uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHKKHKHO", fha->realfha, time, - process, fileid, matchingId, - handleId, operation, bytes, - scltoken, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_RMAPut( void* userData, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHHHHKHO", fha->realfha, time, - process, origin, target, - communicator, tag, bytes, - source, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_RMAPutRemoteEnd( void* userData, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHHHHKHO", fha->realfha, time, - process, origin, target, - communicator, tag, bytes, - source, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_RMAGet( void* userData, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHHHHKHO", fha->realfha, time, - process, origin, target, - communicator, tag, bytes, - source, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_RMAEnd( void* userData, uint64_t time, - uint32_t process, uint32_t remote, uint32_t communicator, - uint32_t tag, uint32_t source, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHHHHO", fha->realfha, time, - process, remote, communicator, - tag, source, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_SnapshotComment( void* userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHsO", fha->realfha, time, - process, comment, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_EnterSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t function, uint32_t process, - uint32_t source, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKKHHHO", fha->realfha, time, - originaltime, function, process, - source, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_SendSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t tag, uint32_t length, - uint32_t source, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKKHHHHHHO", fha->realfha, time, - originaltime, sender, receiver, - procGroup, tag, length, - source, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_OpenFileSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, - uint64_t handleid, uint32_t source, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKKHHKHO", fha->realfha, time, - originaltime, fileid, process, - handleid, source, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_BeginCollopSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKKHHKHHKKHO", fha->realfha, time, - originaltime, process, collOp, - matchingId, procGroup, rootProc, - sent, received, scltoken, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_BeginFileOpSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, - uint32_t scltoken, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKKHKHO", fha->realfha, time, - originaltime, process, matchingId, - scltoken, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_SummaryComment( void* userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHsO", fha->realfha, time, - process, comment, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_FunctionSummary( void* userData, uint64_t time, - uint32_t function, uint32_t process, uint64_t invocations, - uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHKKKO", fha->realfha, time, - function, process, invocations, - exclTime, inclTime, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_FunctionGroupSummary( void* userData, uint64_t time, - uint32_t funcGroup, uint32_t process, uint64_t invocations, - uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHKKKO", fha->realfha, time, - funcGroup, process, invocations, - exclTime, inclTime, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_MessageSummary( void* userData, uint64_t time, - uint32_t process, uint32_t peer, uint32_t comm, - uint32_t type, uint64_t sentNumber, uint64_t receivedNumber, - uint64_t sentBytes, uint64_t receivedBytes, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHHHKKKKO", fha->realfha, time, - process, peer, comm, - type, sentNumber, receivedNumber, - sentBytes, receivedBytes, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_CollopSummary( void *userData, uint64_t time, - uint32_t process, uint32_t comm, uint32_t collective, - uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes, - uint64_t receivedBytes, OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHHKKKKO", fha->realfha, time, - process, comm, collective, - sentNumber, receivedNumber, sentBytes, - receivedBytes, pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_FileOperationSummary( void* userData, uint64_t time, - uint32_t fileid, uint32_t process, uint64_t nopen, - uint64_t nclose, uint64_t nread, uint64_t nwrite, - uint64_t nseek, uint64_t bytesread, uint64_t byteswrite, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHKKKKKKKO", fha->realfha, time, - fileid, process, nopen, - nclose, nread, nwrite, - nseek, bytesread, byteswrite, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_FileGroupOperationSummary( void* userData, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, - uint64_t nclose, uint64_t nread, uint64_t nwrite, - uint64_t nseek, uint64_t bytesread, uint64_t byteswrite, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHKKKKKKKO", fha->realfha, time, - groupid, process, nopen, - nclose, nread, nwrite, - nseek, bytesread, byteswrite, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_UnknownRecord( void *userData, uint64_t time, - uint32_t process, const char *record ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - - - arglist= Py_BuildValue("OKHs", fha->realfha, time, - process, record ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_DefMarker( void *userData, uint32_t stream, - uint32_t token, const char* name, uint32_t type, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OHHsHO", fha->realfha, stream, - token, name, type, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - -int pyOTF_Handler_Marker( void *userData, uint64_t time, - uint32_t process, uint32_t token, const char* text, - OTF_KeyValueList *list ) { - - - pyOTF_FirstHandlerArgument* fha= (pyOTF_FirstHandlerArgument*) userData; - PyObject *result; - PyObject* arglist; - int ret; - PyObject* pylist; - - /** creates a new python object of type "OTF_KeyValueList" from a C pointer */ - pylist = SWIG_NewPointerObj(SWIG_as_voidptr(list), SWIGTYPE_p_OTF_KeyValueList_struct, 0 ); - - arglist= Py_BuildValue("OKHHsO", fha->realfha, time, - process, token, text, - pylist ); - - result= PyEval_CallObject(fha->func, arglist); - - Py_DECREF(arglist); - - ret= (int) PyInt_AsLong( result ); - - if( NULL == PyErr_Occurred() ){ - - return ret; - - } else { - - PyErr_Print(); - return OTF_RETURN_ABORT; - - } -} - - - -/* *** other HandlerArray functions ***************************************** */ - -void pyOTF_HandlerArray_close( OTF_HandlerArray* handlers ) { - - uint32_t i; - - for( i= 0; i < OTF_NRECORDS; ++i ) { - - /* delete old fhb, because we allocated it in "pyOTF_HandlerArray_setHandler()" */ - if( NULL != handlers->firsthandlerarg[i] ) { - - Py_XDECREF( ((pyOTF_FirstHandlerArgument*)handlers->firsthandlerarg[i])->func ); - Py_XDECREF( ((pyOTF_FirstHandlerArgument*)handlers->firsthandlerarg[i])->realfha ); - - free( handlers->firsthandlerarg[i] ); - handlers->firsthandlerarg[i]= NULL; - } - - } - - OTF_HandlerArray_close( handlers ); -} - - -/* returns OTF_RETURN_ABORT or OTF_RETURN_OK */ -int pyOTF_HandlerArray_setHandler( OTF_HandlerArray* handlers, PyObject* function, uint32_t recordtype ) { - - - pyOTF_FirstHandlerArgument* fhb; - - - /* assertion stuff */ - if ( recordtype > OTF_NRECORDS ) { -#ifdef OTF_VERBOSE - PyErr_SetString(PyExc_TypeError,"Unexpected record type"); -#endif /* OTF_VERBOSE */ - return OTF_RETURN_ABORT; - } else if ( NULL == function || 0 == PyCallable_Check(function) ) { -#ifdef OTF_VERBOSE - PyErr_SetString(PyExc_TypeError,"Expecting a function object"); -#endif /* OTF_VERBOSE */ - return OTF_RETURN_ABORT; - } - - /* if no artificial fha has been set */ - if ( NULL == handlers->firsthandlerarg[recordtype] ) { - - /* add a new one for this record type */ - fhb= malloc( sizeof( pyOTF_FirstHandlerArgument ) ); - if( NULL == fhb ) { -#ifdef OTF_VERBOSE - PyErr_SetString(PyExc_TypeError,"No Memory left"); -#endif /* OTF_VERBOSE */ - return OTF_RETURN_ABORT; - } - - Py_INCREF(Py_None); - Py_INCREF(Py_None); - fhb->func= Py_None; - fhb->realfha= Py_None; - - OTF_HandlerArray_setFirstHandlerArg( handlers, fhb, recordtype ); - - } - - - /* decrease reference counter of the older callback */ - Py_XDECREF( ((pyOTF_FirstHandlerArgument*)handlers->firsthandlerarg[recordtype])->func ); - - /* increase the reference count of the function object */ - Py_XINCREF(function); - - /* assign the new callback */ - ((pyOTF_FirstHandlerArgument*)handlers->firsthandlerarg[recordtype])->func= function; - - - - switch( recordtype ) { - - case OTF_DEFINITIONCOMMENT_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefinitionComment, recordtype ); - - break; - - case OTF_DEFTIMERRESOLUTION_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefTimerResolution, recordtype ); - - break; - - case OTF_DEFPROCESS_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefProcess, recordtype ); - - break; - - case OTF_DEFPROCESSGROUP_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefProcessGroup, recordtype ); - - break; - - case OTF_DEFATTRLIST_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefAttributeList, recordtype ); - - break; - - case OTF_DEFPROCESSORGROUPATTR_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefProcessOrGroupAttributes, recordtype ); - - break; - - case OTF_DEFFUNCTION_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefFunction, recordtype ); - - break; - - case OTF_DEFFUNCTIONGROUP_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefFunctionGroup, recordtype ); - - break; - - case OTF_DEFCOLLOP_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefCollectiveOperation, recordtype ); - - break; - - case OTF_DEFCOUNTER_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefCounter, recordtype ); - - break; - - case OTF_DEFCOUNTERGROUP_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefCounterGroup, recordtype ); - - break; - - case OTF_DEFSCL_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefScl, recordtype ); - - break; - - case OTF_DEFSCLFILE_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefSclFile, recordtype ); - - break; - - case OTF_DEFCREATOR_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefCreator, recordtype ); - - break; - - case OTF_DEFVERSION_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefVersion, recordtype ); - - break; - - case OTF_DEFFILE_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefFile, recordtype ); - - break; - - case OTF_DEFFILEGROUP_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefFileGroup, recordtype ); - - break; - - case OTF_DEFKEYVALUE_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefKeyValue, recordtype ); - - break; - - case OTF_NOOP_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_NoOp, recordtype ); - - break; - - case OTF_ENTER_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_Enter, recordtype ); - - break; - - case OTF_LEAVE_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_Leave, recordtype ); - - break; - - case OTF_SEND_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_SendMsg, recordtype ); - - break; - - case OTF_RECEIVE_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_RecvMsg, recordtype ); - - break; - - case OTF_COUNTER_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_Counter, recordtype ); - - break; - - case OTF_COLLOP_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_CollectiveOperation, recordtype ); - - break; - - case OTF_BEGINCOLLOP_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_BeginCollectiveOperation, recordtype ); - - break; - - case OTF_ENDCOLLOP_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_EndCollectiveOperation, recordtype ); - - break; - - case OTF_EVENTCOMMENT_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_EventComment, recordtype ); - - break; - - case OTF_BEGINPROCESS_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_BeginProcess, recordtype ); - - break; - - case OTF_ENDPROCESS_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_EndProcess, recordtype ); - - break; - - case OTF_FILEOPERATION_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_FileOperation, recordtype ); - - break; - - case OTF_BEGINFILEOP_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_BeginFileOperation, recordtype ); - - break; - - case OTF_ENDFILEOP_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_EndFileOperation, recordtype ); - - break; - - case OTF_RMAPUT_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_RMAPut, recordtype ); - - break; - - case OTF_RMAPUTRE_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_RMAPutRemoteEnd, recordtype ); - - break; - - case OTF_RMAGET_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_RMAGet, recordtype ); - - break; - - case OTF_RMAEND_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_RMAEnd, recordtype ); - - break; - - case OTF_SNAPSHOTCOMMENT_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_SnapshotComment, recordtype ); - - break; - - case OTF_ENTERSNAPSHOT_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_EnterSnapshot, recordtype ); - - break; - - case OTF_SENDSNAPSHOT_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_SendSnapshot, recordtype ); - - break; - - case OTF_OPENFILESNAPSHOT_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_OpenFileSnapshot, recordtype ); - - break; - - case OTF_BEGINCOLLOPSNAPSHOT_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_BeginCollopSnapshot, recordtype ); - - break; - - case OTF_BEGINFILEOPSNAPSHOT_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_BeginFileOpSnapshot, recordtype ); - - break; - - case OTF_SUMMARYCOMMENT_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_SummaryComment, recordtype ); - - break; - - case OTF_FUNCTIONSUMMARY_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_FunctionSummary, recordtype ); - - break; - - case OTF_FUNCTIONGROUPSUMMARY_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_FunctionGroupSummary, recordtype ); - - break; - - case OTF_MESSAGESUMMARY_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_MessageSummary, recordtype ); - - break; - - case OTF_COLLOPSUMMARY_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_CollopSummary, recordtype ); - - break; - - case OTF_FILEOPERATIONSUMMARY_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_FileOperationSummary, recordtype ); - - break; - - case OTF_FILEGROUPOPERATIONSUMMARY_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_FileGroupOperationSummary, recordtype ); - - break; - - case OTF_UNKNOWN_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_UnknownRecord, recordtype ); - - break; - - case OTF_DEFMARKER_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_DefMarker, recordtype ); - - break; - - case OTF_MARKER_RECORD : - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) pyOTF_Handler_Marker, recordtype ); - - break; - - - - } - - - return OTF_RETURN_OK; -} - - -int pyOTF_HandlerArray_setFirstHandlerArg( OTF_HandlerArray* handlers, PyObject* fha, uint32_t recordtype ) { - - - pyOTF_FirstHandlerArgument* fhb; - - - /* assertion stuff */ - if ( recordtype > OTF_NRECORDS ) { - -#ifdef OTF_VERBOSE - PyErr_SetString(PyExc_TypeError,"Unexpected record type"); -#endif /* OTF_VERBOSE */ - return OTF_RETURN_ABORT; - } - - - /* if no fha or handler was set before for this record type */ - if ( NULL == handlers->firsthandlerarg[recordtype] ) { - - /* create an artificial first handler arg */ - fhb= malloc( sizeof( pyOTF_FirstHandlerArgument ) ); - if( NULL == fhb ) { -#ifdef OTF_VERBOSE - PyErr_SetString(PyExc_TypeError,"No Memory left"); -#endif /* OTF_VERBOSE */ - return OTF_RETURN_ABORT; - } - - - Py_INCREF(Py_None); - Py_INCREF(Py_None); - fhb->func= Py_None; - fhb->realfha= Py_None; - - OTF_HandlerArray_setFirstHandlerArg( handlers, fhb, recordtype ); - } - - - /* decrease reference counter of the older fha */ - Py_XDECREF( ((pyOTF_FirstHandlerArgument*)handlers->firsthandlerarg[recordtype])->realfha ); - - /* increase reference count of fha */ - Py_XINCREF(fha); - - /* add the python first handler arg */ - ((pyOTF_FirstHandlerArgument*)handlers->firsthandlerarg[recordtype])->realfha= fha; - - - return OTF_RETURN_OK; -} - - -#endif /* PYOTF_WRAPPER_H */ diff --git a/externals/otf/tests/hello/Makefile b/externals/otf/tests/hello/Makefile deleted file mode 100644 index ee777512d3f54e8afa7ff3236aa1c10769d97c89..0000000000000000000000000000000000000000 --- a/externals/otf/tests/hello/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - - -hello_otf: hello_otf.c - gcc -o hello_otf hello_otf.c `otfconfig --includes` `otfconfig --libs` - -clean: - rm -f hello_otf *.otf *.def *.events *.marker *.otf.z *.def.z *.events.z *.marker.z diff --git a/externals/otf/tests/hello/hello_otf.c b/externals/otf/tests/hello/hello_otf.c deleted file mode 100644 index d9d4b9ad93a7d328a2c6f6f35b2cc9380a404c55..0000000000000000000000000000000000000000 --- a/externals/otf/tests/hello/hello_otf.c +++ /dev/null @@ -1,302 +0,0 @@ - -#include <unistd.h> -#include <stdio.h> -#include <stdlib.h> -#include <time.h> -#include <string.h> -#include <sys/time.h> -#include <assert.h> - -#include "otf.h" - - -#define HELPTEXT "" \ -" \n" \ -" ./hello_otf - OTF hello world example that writes a most \n" \ -" simple trace to demonstrate the OTF writer API\n" \ -" \n" \ -" \n" \ - - -int main( int argc, const char** argv ) { - - - char *filename= "hello_world.otf"; - - OTF_FileManager* manager; - OTF_Writer* writer; - - /* test with # streams < or > # processes */ - uint32_t streams= 2; - uint32_t processes= 2; - - /* file handles available */ - uint32_t files= 100; - - /* per-stream budder size */ - uint32_t buffersize= 10*1024; - - /* compression on/off, test without compression to look at ASCII trace files */ - int compression= 0; - - uint64_t timestamp; - uint32_t cpuid; - uint32_t counterid= 5; - uint64_t countervalue; - - - manager= OTF_FileManager_open( files ); - assert( NULL != manager ); - - writer = OTF_Writer_open( filename, streams, manager ); - OTF_Writer_setBufferSizes( writer, buffersize ); - - if ( 0 < compression && compression <= 9 ) { - - OTF_Writer_setCompression( writer, compression ); - } - - /* do for a number of processes */ - for( cpuid= 1; cpuid <= processes; cpuid++ ) { - - timestamp= 0; - timestamp += 10000 + rand() % 100; - - /* enter main */ - - OTF_Writer_writeEnter( writer, - timestamp /* time */, - 1 /* statetoken */, - cpuid /* cpuid */, - 0 /* scltoken */ ); - countervalue= 0; - OTF_Writer_writeCounter( writer, - timestamp, - cpuid, - counterid, - countervalue ); - - timestamp += 1000 + rand() % 100; - - /* enter foo */ - - OTF_Writer_writeEnter( writer, - timestamp /* time */, - 2 /* statetoken */, - cpuid /* cpuid */, - 0 /* scltoken */ ); - countervalue= 100; - OTF_Writer_writeCounter( writer, - timestamp, - cpuid, - counterid, - countervalue ); - - timestamp += 1000 + rand() % 100; - - /* enter bar */ - - OTF_Writer_writeEnter( writer, - timestamp /* time */, - 3 /* statetoken */, - cpuid /* cpuid */, - 0 /* scltoken */ ); - countervalue= 110; - OTF_Writer_writeCounter( writer, - timestamp, - cpuid, - counterid, - countervalue ); - - timestamp += 1000 + rand() % 100; - - /* leave bar */ - - countervalue= 210; - OTF_Writer_writeCounter( writer, - timestamp, - cpuid, - counterid, - countervalue ); - - OTF_Writer_writeLeave( writer, - timestamp /* time */, - 3 /* statetoken */, - cpuid /* cpuid */, - 0 /* scltoken */ ); - - timestamp += 1000 + rand() % 100; - - /* enter bar */ - - OTF_Writer_writeEnter( writer, - timestamp /* time */, - 3 /* statetoken */, - cpuid /* cpuid */, - 0 /* scltoken */ ); - countervalue= 220; - OTF_Writer_writeCounter( writer, - timestamp, - cpuid, - counterid, - countervalue ); - - timestamp += 1000 + rand() % 100; - - /* leave bar */ - - countervalue= 320; - OTF_Writer_writeCounter( writer, - timestamp, - cpuid, - counterid, - countervalue ); - - OTF_Writer_writeLeave( writer, - timestamp /* time */, - 3 /* statetoken */, - cpuid /* cpuid */, - 0 /* scltoken */ ); - - timestamp += 1000 + rand() % 100; - - /* leave foo */ - - countervalue= 330; - OTF_Writer_writeCounter( writer, - timestamp, - cpuid, - counterid, - countervalue ); - - OTF_Writer_writeLeave( writer, - timestamp /* time */, - 2 /* statetoken */, - cpuid /* cpuid */, - 0 /* scltoken */ ); - - timestamp += 1000 + rand() % 100; - - /* leave main */ - - countervalue= 380; - OTF_Writer_writeCounter( writer, - timestamp, - cpuid, - counterid, - countervalue ); - - OTF_Writer_writeLeave( writer, - timestamp /* time */, - 1 /* statetoken */, - cpuid /* cpuid */, - 0 /* scltoken */ ); - - } - - - /* write definitions -- may be written at any time - before/during/after writing events */ - - OTF_Writer_writeDefTimerResolution( writer, - 0 /* uint32_t stream */, - 1e6 /* uint64_t ticksPerSecond */ ); - - for( cpuid= 1; cpuid <= processes; cpuid++ ) { - - char name[101]; - snprintf( name, 100, "Process %u", cpuid ); - - OTF_Writer_writeDefProcess( writer, - 0 /* uint32_t stream */, - cpuid /*uint32_t process */, - name /* const char *name */ , - 0 /* uint32_t parent */ ); - } - - OTF_Writer_writeDefFunctionGroup( writer, - 0 /* uint32_t stream */, - 16 /* uint32_t funcGroup */, - "standard functions" /* const char *name */ ); - - OTF_Writer_writeDefFunctionGroup( writer, - 0 /* uint32_t stream */, - 17 /* uint32_t funcGroup */, - "user functions" /* const char *name */ ); - - OTF_Writer_writeDefFunction( writer, - 0 /* uint32_t stream */, - 1 /* uint32_t func */, - "main" /* const char *name */, - 16 /* uint32_t funcGroup */, - 0 /* uint32_t source */ ); - - OTF_Writer_writeDefFunction( writer, - 0 /* uint32_t stream */, - 2 /* uint32_t func */, - "foo" /* const char *name */, - 17 /* uint32_t funcGroup */, - 0 /* uint32_t source */ ); - - OTF_Writer_writeDefFunction( writer, - 0 /* uint32_t stream */, - 3/* uint32_t func */, - "bar" /* const char *name */, - 17 /* uint32_t funcGroup */, - 0 /* uint32_t source */ ); - - OTF_Writer_writeDefCounterGroup( writer, - 0 /* uint32_t stream */, - 63 /* uint32_t counterGroup */, - "all my counters" /* const char *name */ ); - - OTF_Writer_writeDefCounter( writer, - 0 /* uint32_t stream */, - counterid /* uint32_t counter */, - "my counter" /* const char *name */, - OTF_COUNTER_TYPE_ACC | OTF_COUNTER_SCOPE_START /* uint32_t properties */, - 63 /* uint32_t counterGroup */, - "my unit" /* const char *unit */ ); - - - - OTF_Writer_writeDefMarker( writer, 0 /* stream ID*/, - 101 /* uint32_t token */, - "everything is easy" /* const char* name */, - OTF_MARKER_TYPE_HINT /* uint32_t type */ ); - - OTF_Writer_writeDefMarker( writer, 0 /* stream ID*/, - 102 /* uint32_t token */, - "yellow alarm" /* const char* name */, - OTF_MARKER_TYPE_WARNING /* uint32_t type */ ); - - OTF_Writer_writeDefMarker( writer, 0 /* stream ID*/, - 103 /* uint32_t token */, - "red alarm flag" /* const char* name */, - OTF_MARKER_TYPE_ERROR /* uint32_t type */ ); - - - OTF_Writer_writeMarker( writer, - 10000 /* uint64_t time */, - 1 /* uint32_t process */, - 101 /* uint32_t token */, - "tea, early grey, hot" /* const char* text */ ); - - OTF_Writer_writeMarker( writer, - 11000 /* uint64_t time */, - 1 /* uint32_t process */, - 102 /* uint32_t token */, - "bird of prey decloaking starboard" /* const char* text */ ); - - OTF_Writer_writeMarker( writer, - 12000 /* uint64_t time */, - 1 /* uint32_t process */, - 103 /* uint32_t token */, - "antimatter containment failing" /* const char* text */ ); - - OTF_Writer_close( writer ); - - return 0; -} - - diff --git a/externals/otf/tests/otf_python/groups.py b/externals/otf/tests/otf_python/groups.py deleted file mode 100644 index 46be553ab92f7c62a8019f15d1c98335b2311be2..0000000000000000000000000000000000000000 --- a/externals/otf/tests/otf_python/groups.py +++ /dev/null @@ -1,232 +0,0 @@ -#! /usr/bin/python - -################################################################################ -# A small quick hack script that re-orders and summarizes group definitions. -# -# It uses quite specific logic to get a new grouping but this might serve as -# an example for similar tools. -################################################################################ - -################################################################################ -# 1st parameter = trace to read -################################################################################ - -from otf import * -import sys - - - -# dict for new groups -newindex= 0 - -number_def_function= 0 -number_def_group= 0 -max_def_group= 0 - - -token_to_name= {} -token_to_shortname= {} -token_to_count= {} - -token_to_newtoken= {} - - -### stage 1 handlers ########################################################### - -def handleDefFunction_Stage_1( fha, stream, func, name, group, source, kvlist ): - -# print ' handleDefFunction: \"%s\", s%u, t%u, nm\"%s\", g%u, src%u' \ -# % (fha,stream, func,name,group,source) - - global number_def_function - number_def_function += 1 - - token_to_count[ group ] += 1 - - -# # find first part of source file name - shortname= "empty" - a= 0 - b= 0 - - a= name.find( "[{" ) - if -1 != a: - b= name.find( "}", a+2 ) - if -1 != b : - - c= name.find( "_", a+2, b ) - if -1 != c : - b= c - - c= name.find( ".", a+2, b ) - if -1 != c : - b= c - - c= name.find( " ", a+2, b ) - if -1 != c : - b= c - - shortname= name[a+2:b] - token_to_shortname[ group ]= shortname - - return OTF_RETURN_OK - - -def handleDefFunctionGroup_Stage_1( fha, stream, group, name, kvlist ): - -# print ' handleDefFunctionGroup: \"%s\", s%u, t%u, nm\"%s\"' \ -# % (fha,stream,group,name) - - global number_def_group - number_def_group += 1 - - global max_def_group - max_def_group= max_def_group if ( max_def_group > group ) else group - - token_to_name[ group ]= name - - global token_to_count - token_to_count[ group ]= 0 - - return OTF_RETURN_OK - - -### stage 2 handlers ########################################################### - - -def handleDefFunction_Stage_2( fha, stream, func, name, group, source, kvlist ): - - OTF_Writer_writeDefFunction( fha, stream, func, name, token_to_newtoken[ group ], source ) - - return OTF_RETURN_OK - - -def handleDefFunctionGroup_Stage_2( fha, stream, group, name, kvlist ): - - return OTF_RETURN_OK - - -### main ####################################################################### - - -if __name__ == '__main__': - - manager= OTF_FileManager_open( 100 ) - - inname= sys.argv[1] - print "read ", inname - - outname= OTF_stripFilename( inname ) + "_new" - print "write ", outname - - reader= OTF_Reader_open( inname, manager ) - - handlers= OTF_HandlerArray_open() - - - ### stage 1 - create group mapping ######################################### - - - OTF_HandlerArray_setHandler( handlers, handleDefFunction_Stage_1, OTF_DEFFUNCTION_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefFunctionGroup_Stage_1, OTF_DEFFUNCTIONGROUP_RECORD ) - - - num= OTF_Reader_readDefinitions( reader, handlers ) - - print "stage 1: read ", num, " records" - print "number of function definitions ", number_def_function - print "number of group definitions", number_def_group - print "len( token_to_name ) ", len( token_to_name ) - print "len( token_to_count ) ", len( token_to_count ) - print "\n" - -# print "list all:" -# for k, c in token_to_count.iteritems() : -# print k, " # ", c, " name ", token_to_name[ k ], " shortname ", token_to_shortname[ k ] - - ### compute mapping token_to_newtoken ###################################### - - writer= OTF_Writer_open( outname, 0, manager ) - max_def_group += 1 - - shortname_to_count= {} - - print "list keep:" - for k, c in token_to_count.iteritems() : - - if c >= 5 : - print "keep ", k, " # ", c, " name ", token_to_name[ k ] - OTF_Writer_writeDefFunctionGroup( writer, 0, k, token_to_name[ k ] ) - else : - print "k= ", k - print "token_to_shortname[ k ]", token_to_shortname[ k ] - shortname_to_count[ token_to_shortname[ k ] ]= 0 - - # sum over equal short names - for k, c in token_to_count.iteritems() : - - shortname_to_count[ token_to_shortname[ k ] ] += c - -# for k, c in token_to_shortname.iteritems() : -# print " ", k, " # ", c - - - shortname_to_newtoken= {} - - print "list new:" - for k, c in shortname_to_count.iteritems() : - - if c >= 5 : - OTF_Writer_writeDefFunctionGroup( writer, 0, max_def_group, k ) - shortname_to_newtoken[ k ]= max_def_group - print " new token ", max_def_group, ":", k, " # ", c - max_def_group += 1 - - # define "misc" group - k= "misc" - OTF_Writer_writeDefFunctionGroup( writer, 0, max_def_group, k ) - shortname_to_newtoken[ k ]= max_def_group - print " new token ", max_def_group, ":", k, " # x" - max_def_group += 1 - - - token_to_newtoken= {} - - for k, v in token_to_shortname.iteritems() : - - if token_to_count[ k ] >= 5 : - - token_to_newtoken[ k ]= k - - else : - - if shortname_to_newtoken.has_key( v ) : - - token_to_newtoken[ k ]= shortname_to_newtoken[ v ]; - else : - token_to_newtoken[ k ]= shortname_to_newtoken[ "misc" ]; - - -# print "\n mapping \n\n" -# for t, n in token_to_newtoken.iteritems() : -# print " ", t, " --> ", n - - - ### stage 2 - write new def file ########################################### - - # set copy handlers to all but FunctionDefs and FunctionGroupDefs - OTF_HandlerArray_getCopyHandler( handlers, writer ) - OTF_HandlerArray_setHandler( handlers, handleDefFunction_Stage_2, OTF_DEFFUNCTION_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefFunctionGroup_Stage_2, OTF_DEFFUNCTIONGROUP_RECORD ) - - OTF_Reader_close( reader ) - reader= OTF_Reader_open( inname, manager ) - - num= OTF_Reader_readDefinitions( reader, handlers ) - - print "stage 2: read ", num, " records" - - OTF_HandlerArray_close( handlers ) - OTF_Writer_close( writer ) - OTF_Reader_close( reader ) - OTF_FileManager_close( manager ) diff --git a/externals/otf/tests/otf_python/test_read.py b/externals/otf/tests/otf_python/test_read.py deleted file mode 100644 index d105d332fc4ccdfb00a9e221df9cd5269cbed8a9..0000000000000000000000000000000000000000 --- a/externals/otf/tests/otf_python/test_read.py +++ /dev/null @@ -1,438 +0,0 @@ -#! /usr/bin/python - -################################################################################ -# 1st parameter = trace to read -################################################################################ - -from otf import * -import sys - - -def handleDefComment( fha, stream, comment, kvlist ): - - print ' handleDefComment: \"%s\", c\"%s\"' % (fha,comment) - - return OTF_RETURN_OK - - -def handleDefTimerResolution( fha, stream, ticksPerSecond, kvlist ): - - print ' handleDefTimerResolution: \"%s\", s%u, s%u' % (fha,stream,ticksPerSecond) - - return OTF_RETURN_OK - - -def handleDefProcess( fha, stream, process, name, parent, kvlist ): - - print ' handleDefProcess: \"%s\", s%u, t%u, nm\"%s\", p%u' \ - % (fha,stream,process,name, parent) - - return OTF_RETURN_OK - - -def handleDefProcGroup( fha, stream, group, name, nr, proclist, kvlist ): - - output=' handleDefProcGroup: \"%s\", s%u, t%u, nm\"%s\", nr%u { ' \ - % (fha,stream,group,name,nr) - for proc in proclist: - output+= '%i, ' % proc - output += ' }' - print output - - return OTF_RETURN_OK - - -def handleDefFunction( fha, stream, func, name, group, source, kvlist ): - - print ' handleDefFunction: \"%s\", s%u, t%u, nm\"%s\", g%u, src%u' \ - % (fha,stream, func,name,group,source) - - return OTF_RETURN_OK - - -def handleDefFunctionGroup( fha, stream, group, name, kvlist ): - - print ' handleDefFunctionGroup: \"%s\", s%u, t%u, nm\"%s\"' \ - % (fha,stream,group,name) - - return OTF_RETURN_OK - - -def handleDefCollectiveOperation( fha, stream, coll, name, typee, kvlist ): - - print ' handleDefCollectiveOperation: \"%s\", s%u, t%u, nm\"%s\", tp%u' \ - % (fha,stream,coll,name,typee) - - return OTF_RETURN_OK - - -def handleDefCounter( fha, stream, counter, name, properties, group, unit, kvlist ): - - print ' handleDefCounter: \"%s\", s%u, t%u, nm\"%s\", prp%u, g%u, u\"%s\"' \ - % (fha, stream, counter, name, properties, group, unit) - - return OTF_RETURN_OK - - -def handleDefCounterGroup( fha, stream, group, name, kvlist ): - - print ' handleDefCounterGroup: \"%s\", s%u, t%u, nm\"%s\"' \ - % (fha, stream, group, name) - - return OTF_RETURN_OK - - -def handleDefScl( fha, stream, source, file, line, kvlist ): - - print ' handleDefScl: \"%s\", s%u, t%u, f%u, l%u' \ - % (fha, stream, source, file, line) - - return OTF_RETURN_OK - - -def handleDefSclFile( fha, stream, file, name, kvlist ): - - print ' handleDefSclFile: \"%s\", s%u, t%u, nm\"%s\"' % (fha, stream, file, name) - - return OTF_RETURN_OK - - -def handleDefCreator( fha, stream, creator, kvlist ): - - print ' handleDefCreator: \"%s\", s%u, cr\"%s\"' % (fha, stream, creator) - - return OTF_RETURN_OK - - -def handleDefVersion( fha, stream, major, minor, sub, string, kvlist ): - - print ' handleDefVersion: \"%s\", s%u, %u.%u.%u \"%s\"' \ - % (fha, stream, major, minor, sub, string) - - return OTF_RETURN_OK - - -def handleDefFile( fha, stream, token, name, group, kvlist ): - - print ' handleDefFile: \"%s\", s%u, t%u, nm\"%s\", g%u' \ - % (fha, stream, token, name, group) - - return OTF_RETURN_OK - - -def handleDefFileGroup( fha, stream, token, name, kvlist ): - - print ' handleDefFileGroup: \"%s\", s%u, t%u, nm\"%s\"' \ - % (fha, stream, token, name) - - return OTF_RETURN_OK - - -def handleEnter( fha, time, function, process, source, kvlist ): - - print ' handleEnter: \"%s\", t%u, f%u, p%u, src%u' \ - % (fha, time, function, process, source) - - return OTF_RETURN_OK - - -def handleLeave( fha, time, function, process, source, kvlist ): - - print ' handleLeave: \"%s\", t%u, f%u, p%u, src%u' \ - % (fha, time, function, process, source) - - return OTF_RETURN_OK - - -def handleSendMsg( fha, time, sender, receiver, group, typee, length, - source, kvlist ): - - print ' handleSendMsg: \"%s\", t%u, s%u, r%u, g%u, tp%u, l%u, src%u' \ - % (fha, time, sender, receiver, group, typee, length, source) - - return OTF_RETURN_OK - - -def handleRecvMsg( fha, time, recvProc, sendProc, group, typee, length, - source, kvlist ): - - print ' handleRecvMsg: \"%s\", t%u, r%u, s%u, g%u, tp%u, l%u, src%u' \ - % (fha, time, recvProc, sendProc, group, typee, length, source) - - return OTF_RETURN_OK - - -def handleCounter( fha, time, process, counter, value, kvlist ): - - print ' handleCounter: \"%s\", t%u, p%u, c%u, v%u' \ - % (fha, time, process, counter, value) - - return OTF_RETURN_OK - - -def handleCollectiveOperation( fha, time, process, collective, procGroup, - rootProc, sent, received, duration, source, kvlist ): - - print ' handleCollectiveOperation: \"%s\", t%u, p%u, c%u, pg%u, rt%u, sent%u, recvd%u, dur%u, src%u' \ - % (fha, time, process, collective, procGroup,rootProc, sent, received, duration, source) - - return OTF_RETURN_OK - - -def handleEventComment( fha, time, process, comment, kvlist ): - - print ' handleEventComment: \"%s\", t%u, p%u, c\"%s\"' \ - % (fha,time, process, comment) - - return OTF_RETURN_OK - - -def handleBeginProcess( fha, time, process, kvlist ): - - print ' handleBeginProcess: \"%s\", t%u, p%u' % (fha, time, process) - - return OTF_RETURN_OK - - -def handleEndProcess( fha, time, process, kvlist ): - - print ' handleEndProcess: \"%s\", t%u, p%u' % (fha, time, process) - - return OTF_RETURN_OK - - -def handleFileOperation( fha, time, fileid, process, handleid, operation, - bytes, duration, source, kvlist ): - - print ' handleFileOperation: \"%s\", t%u, f%u, p%u, h%u, op%u, b%u, dur%u, src%u' \ - % (fha, time, fileid, process, handleid, operation,bytes, duration, source) - - return OTF_RETURN_OK - - -def handleBeginFileOperation( fha, time, process, matchingid, scl, kvlist ): - - print ' handleBeginFileOp: \"%s\", t%u, p%u, m%u, src%u' \ - % (fha, time, process, matchingid, scl) - return OTF_RETURN_OK - - -def handleEndFileOperation( fha, time, process, fileid, matchingId, handleid, operation, bytes, scl, kvlist ): - - print ' handleEndFileOp: \"%s\", t%u, p%u, f%u, m%u, h%u, op%u, b%u, src%u' \ - % ( fha, time, process, fileid, matchingId, handleid, operation, bytes, scl ) - return OTF_RETURN_OK - - - -def handleSnapshotComment( fha, time, process, comment, kvlist ): - - print ' handleSnapshotComment: \"%s\", t%u, p%u, c\"%s\"' \ - % (fha, time, process, comment) - - return OTF_RETURN_OK - - -def handleEnterSnapshot( fha, time, originaltime, function, process, - source, kvlist ): - - print ' handleEnterSnapshot: \"%s\", t%u, ot%u, f%u, p%u, src%u' \ - % (fha, time, originaltime, function, process, source) - - return OTF_RETURN_OK - - -def handleSendSnapshot( fha, time, originaltime, sender, receiver, - procGroup, tag, length, source, kvlist ): - - print ' handleSendSnapshot: \"%s\", t%u, ot%u, s%u, r%u, pg%u, tag%u, len%u src%u' \ - % (fha, time, originaltime, sender, receiver,procGroup, tag, length, source) - - return OTF_RETURN_OK - - -def handleOpenFileSnapshot( fha, time, originaltime, fileid, - process, handleid, source, kvlist ): - - print ' handleOpenFileSnapshot: \"%s\", t%u, ot%u, f%u, p%u, h%u, src%u' \ - % (fha, time, originaltime, fileid,process, handleid, source) - - return OTF_RETURN_OK - - -def handleSummaryComment( fha, time, process, comment, kvlist ): - - print ' handleSummaryComment: \"%s\", t%u, p%u, c\"%s\"' \ - % (fha, time, process, comment) - - return OTF_RETURN_OK - - -def handleFunctionSummary( fha, time, function, process, invocations, - exclTime, inclTime, kvlist ): - - print ' handleFunctionSummary: \"%s\", t%u, f%u, p%u, inv%u, ext%u, int%u' \ - % (fha, time, function, process, invocations, exclTime, inclTime) - - return OTF_RETURN_OK - - -def handleFunctionGroupSummary( fha, time, group, process, - invocations, exclTime, inclTime, kvlist ): - - print ' handleFunctionGroupSummary: \"%s\", t%u, g%u, p%u, inv%u, ext%u, int%u' \ - % (fha, time, group, process,invocations, exclTime, inclTime) - - return OTF_RETURN_OK - - -def handleMessageSummary( fha, time, process, peer, comm, typee, - sentNumber, receivedNumber, sentBytes, receivedBytes, kvlist ): - - print ' handleMessageSummary: \"%s\", t%u, p%u, peer%u, comm%u, tp%u, sentnr%u, recvdnr%u, sentbt%u, recvdbt%u' \ - % (fha, time, process, peer, comm, typee,sentNumber, receivedNumber, sentBytes, receivedBytes) - - return OTF_RETURN_OK - - -def handleFileOperationSummary( fha, time, fileid, process, nopen, nclose, - nread, nwrite, nseek, bytesread, byteswrite, kvlist ): - - print ' handleFileOperationSummary: \"%s\", t%u, f%u, p%u, nopen%u, nclose%u, nrd%u, nwrt%u, nseek%u, btrd%u, btwrt%u' \ - % (fha, time, fileid, process, nopen, nclose, nread, nwrite, nseek, bytesread, byteswrite) - - return OTF_RETURN_OK - - -def handleFileGroupOperationSummary( fha, time, groupid, process, nopen, - nclose, nread, nwrite, nseek, bytesread, byteswrite, kvlist ): - - print ' handleFileGroupOperationSummary: \"%s\", t%u, g%u, p%u, nopen%u, nclose%u, nrd%u, nwrt%u, nseek%u, btrd%u, btwrt%u' \ - % (fha, time, groupid, process, nopen, nclose, nread, nwrite, nseek, bytesread, byteswrite) - - return OTF_RETURN_OK - - -def handleUnknownRecord( fha, time, process, record, kvlist ): - - print ' handleUnknownRecord: \"%s\", t%u, p%u, r\"%s\"' \ - % (fha, time, process, record) - - return OTF_RETURN_OK - - -################################################################################# - - -if __name__ == '__main__': - - manager= OTF_FileManager_open( 100 ) - reader= OTF_Reader_open( sys.argv[1], manager ) - handlers= OTF_HandlerArray_open() - - OTF_HandlerArray_setHandler( handlers, handleDefComment, OTF_DEFINITIONCOMMENT_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefTimerResolution, OTF_DEFTIMERRESOLUTION_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefProcess, OTF_DEFPROCESS_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefProcGroup, OTF_DEFPROCESSGROUP_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefFunction, OTF_DEFFUNCTION_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefFunctionGroup, OTF_DEFFUNCTIONGROUP_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefCollectiveOperation, OTF_DEFCOLLOP_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefCounter, OTF_DEFCOUNTER_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefCounterGroup, OTF_DEFCOUNTERGROUP_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefScl, OTF_DEFSCL_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefSclFile, OTF_DEFSCLFILE_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefCreator, OTF_DEFCREATOR_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefVersion, OTF_DEFVERSION_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefFile, OTF_DEFFILE_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleDefFileGroup, OTF_DEFFILEGROUP_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleEnter, OTF_ENTER_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleLeave, OTF_LEAVE_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleSendMsg, OTF_SEND_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleRecvMsg, OTF_RECEIVE_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleCounter, OTF_COUNTER_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleCollectiveOperation, OTF_COLLOP_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleEventComment, OTF_EVENTCOMMENT_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleBeginProcess, OTF_BEGINPROCESS_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleEndProcess, OTF_ENDPROCESS_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleFileOperation, OTF_FILEOPERATION_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleBeginFileOperation, OTF_BEGINFILEOP_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleEndFileOperation, OTF_ENDFILEOP_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleSnapshotComment, OTF_SNAPSHOTCOMMENT_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleEnterSnapshot, OTF_ENTERSNAPSHOT_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleSendSnapshot, OTF_SENDSNAPSHOT_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleOpenFileSnapshot, OTF_OPENFILESNAPSHOT_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleSummaryComment, OTF_SUMMARYCOMMENT_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleFunctionSummary, OTF_FUNCTIONSUMMARY_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleFunctionGroupSummary, OTF_FUNCTIONGROUPSUMMARY_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleMessageSummary, OTF_MESSAGESUMMARY_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleFileOperationSummary, OTF_FILEOPERATIONSUMMARY_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleFileGroupOperationSummary, OTF_FILEGROUPOPERATIONSUMMARY_RECORD ) - OTF_HandlerArray_setHandler( handlers, handleUnknownRecord, OTF_UNKNOWN_RECORD ) - -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFINITIONCOMMENT_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFTIMERRESOLUTION_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFPROCESS_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFPROCESSGROUP_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFFUNCTION_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFFUNCTIONGROUP_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFCOLLOP_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFCOUNTER_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFCOUNTERGROUP_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFSCL_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFSCLFILE_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFCREATOR_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFVERSION_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFFILE_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_DEFFILEGROUP_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_ENTER_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_LEAVE_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_SEND_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_RECEIVE_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_COUNTER_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_COLLOP_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_EVENTCOMMENT_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_BEGINPROCESS_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_ENDPROCESS_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_FILEOPERATION_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_SNAPSHOTCOMMENT_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_ENTERSNAPSHOT_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_SENDSNAPSHOT_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_OPENFILESNAPSHOT_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_SUMMARYCOMMENT_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_FUNCTIONSUMMARY_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_FUNCTIONGROUPSUMMARY_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_MESSAGESUMMARY_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_FILEOPERATIONSUMMARY_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_FILEGROUPOPERATIONSUMMARY_RECORD ) -# OTF_HandlerArray_setFirstHandlerArg( handlers, "", OTF_UNKNOWN_RECORD ) - - - OTF_Reader_readDefinitions( reader, handlers ) - - - # read events in portions - OTF_Reader_setRecordLimit( reader, 100000 ) - - while 1 : - - read= OTF_Reader_readEventsUnsorted( reader, handlers ) - if 0 == read: - break - - btprg= OTF_Reader_eventBytesProgress( reader ) - tmprg= OTF_Reader_eventTimeProgress( reader ) - print " ret_tm%u ret_bt%u INTERRUPT: read %u - timeprogress: %u < %u < %u - bytesprogress: %u < %u < %u" \ - % ( tmprg[0], btprg[0], read, tmprg[1], tmprg[2], tmprg[3], btprg[1], btprg[2], btprg[3] ) - - - OTF_Reader_setRecordLimit( reader, 1000000000 ) - - - OTF_Reader_readSnapshotsUnsorted( reader, handlers ) - - OTF_Reader_readStatisticsUnsorted( reader, handlers ) - - - OTF_HandlerArray_close( handlers ) - OTF_Reader_close( reader ) - OTF_FileManager_close( manager ) diff --git a/externals/otf/tests/otf_python/test_read_qt.py b/externals/otf/tests/otf_python/test_read_qt.py deleted file mode 100644 index 1b225b3b0855198d1561ae93d95749aff930fc11..0000000000000000000000000000000000000000 --- a/externals/otf/tests/otf_python/test_read_qt.py +++ /dev/null @@ -1,323 +0,0 @@ -#! /usr/bin/python - -# This script uses Python bindings for Qt4 (python-qt4). -# After installation you maybe have to add the module-path (e.g. /usr/lib/python2.5/site-packages) -# to the environment variable $PYTHONPATH - -################################################################################################## -# 1st parameter = trace to read -################################################################################################## - -import otf -import sys -from PyQt4.QtGui import * -from PyQt4.QtCore import * - -liste = [0 for j in xrange(47)] -names = ["DefinitionComment", "DefTimerResolution", "DefProcess", "DefProcessGroup", "DefFunction", "DefFunctionGroup", "DefCollectiveOperation", "DefCounter", "DefCounterGroup", "DefScl", "DefSclFile", "DefCreator", "DefVersion", "DefFile", "DefFileGroup", "Enter", "Leave", "SendMsg", "RecvMsg", "Counter", "CollectiveOperation", "BeginCollectiveOperation", "EndCollectiveOperation", "EventComment", "BeginProcess", "EndProcess", "FileOperation", "BeginFileOperation", "EndFileOperation", "SnapshotComment", "EnterSnapshot", "SendSnapshot", "OpenFileSnapshot", "SummaryComment", "FunctionSummary", "FunctionGroupSummary", "MessageSummary", "CollopSummary", "FileOperationSummary", "FileGroupOperationSummary", "UnknownRecord", "DefMarker", "Marker", "RMAPut", "RMAPutRemoteEnd", "RMAGet", "RMAEnd"] - -#### Definitions #### -def handleDefFunction(userData, stream, func, name, funcGroup, source, kvlist ): - liste[4] = liste[4] + 1 - return otf.OTF_RETURN_OK - -def handleDefFunctionGroup(userData, stream, funcGroup, name, kvlist ): - liste[5] = liste[5] + 1 - return otf.OTF_RETURN_OK - -def handleDefinitionComment(userData, stream, comment, kvlist ): - liste[0] = liste[0] + 1 - return otf.OTF_RETURN_OK - -def handleTimerResolution(userData, stream, ticksPerSecond, kvlist ): - liste[1] = liste[1] + 1 - return otf.OTF_RETURN_OK - -def handleDefProcess(userData, stream, process, name, parent, kvlist ): - liste[2] = liste[2] + 1; - return otf.OTF_RETURN_OK - -def handleDefProcessGroup(userData, stream, procGroup, name, numberOfProcs, procs, kvlist ): - liste[3] = liste[3] + 1 - return otf.OTF_RETURN_OK - -def handleDefCollectiveOperation (userData, stream, collOp, name, typ, kvlist ): - liste[6] = liste[6] + 1 - return otf.OTF_RETURN_OK - -def handleDefCounter (userData, stream, counter, name, properties, counterGroup, unit, kvlist ): - liste[7] = liste[7] + 1 - return otf.OTF_RETURN_OK - -def handleDefCounterGroup(userData, stream, counterGroup, name, kvlist ): - liste[8] = liste[8] + 1 - return otf.OTF_RETURN_OK - -def handleDefScl(userData, stream, source, sourceFile, line, kvlist ): - liste[9] = liste[9] + 1 - return otf.OTF_RETURN_OK - -def handleDefSclFile (userData, stream, sourceFile, name, kvlist ): - liste[10] = liste[10] + 1; - return otf.OTF_RETURN_OK - -def handleDefCreator (userData, stream, creator, kvlist ): - liste[11] = liste[11] + 1 - return otf.OTF_RETURN_OK - -def handleDefVersion (userData,stream, major, minor, sub, string, kvlist ): - liste[12] = liste[12] + 1 - return otf.OTF_RETURN_OK - -def handleDefFile (userData, stream, token, name, group, kvlist ): - liste[13] = liste[13] + 1 - return otf.OTF_RETURN_OK - -def handleDefFileGroup (userData, stream, token, name, kvlist ): - liste[14] = liste[14] + 1 - return otf.OTF_RETURN_OK - -#### Events #### -def handleEnter(userData, time, function, process, source, kvlist ): - liste[15] = liste[15] + 1 - return otf.OTF_RETURN_OK - -def handleLeave(userData, time, function, process, source, kvlist ): - liste[16] = liste[16] + 1 - return otf.OTF_RETURN_OK - -def handleSendMsg (userData, time, sender, receiver, group, typ, length, source, kvlist ): - liste[17] = liste[17] + 1 - return otf.OTF_RETURN_OK - -def handleRecvMsg (userData, time, recvProc, sendProc, group, typ, length, source, kvlist ): - liste[18] = liste[18] + 1 - return otf.OTF_RETURN_OK - -def handleCounter (userData, time, process, counter, value, kvlist ): - liste[19] = liste[19] + 1 - return otf.OTF_RETURN_OK - -def handleCollectiveOperation (userData, time, process, collective, procGroup, rootProc, sent, received, duration, source, kvlist ): - liste[20] = liste[20] + 1; - return otf.OTF_RETURN_OK - -def handleBeginCollectiveOperation (uData, time, process, collOp, matchingId, procGroup, rootProc, sent, received, scltoken, kvlist ): - liste[21] = liste[21] + 1 - return otf.OTF_RETURN_OK - -def handleEndCollectiveOperation (uData, time, process, matchingId, kvlist ): - liste[22] = liste[22] + 1 - return otf.OTF_RETURN_OK - -def handleEventComment (userData, time, process, comment, kvlist ): - liste[23] = liste[23] + 1 - return otf.OTF_RETURN_OK - -def handleBeginProcess (userData, time, process, kvlist ): - liste[24] = liste[24] + 1 - return otf.OTF_RETURN_OK - -def handleEndProcess (userData, time, process, kvlist ): - liste[25] = liste[25] + 1 - return otf.OTF_RETURN_OK - -def handleFileOperation (userData, time, fileid, process, handleid, operation, bytes, duration, source, kvlist ): - liste[26] = liste[26] + 1 - return otf.OTF_RETURN_OK - -def handleBeginFileOperation (writer, time, process, handleid, scltoken, kvlist ): - liste[27] = liste[27] + 1 - return otf.OTF_RETURN_OK - -def handleEndFileOperation (writer, time, process, fileid, matchingId, handleid, operation, bytes, scltoken, kvlist ): - liste[28] = liste[28] + 1 - return otf.OTF_RETURN_OK - -#### Snapshots #### -def handleSnapshotComment (userData, time, process, comment, kvlist ): - liste[29] = liste[29] + 1 - return otf.OTF_RETURN_OK - -def handleEnterSnapshot (userData, time, originaltime, function, process, source, kvlist ): - liste[30] = liste[30] + 1 - return otf.OTF_RETURN_OK - -def handleSendSnapshot (userData, time, originaltime, sender, receiver, procGroup, tag, length, source, kvlist ): - liste[31] = liste[31] + 1 - return otf.OTF_RETURN_OK - -def handleOpenFileSnapshot (userData, time, originaltime, fileid, process, handleid, source, kvlist ): - liste[32] = liste[32] + 1 - return otf.OTF_RETURN_OK - -#### Summary #### -def handleSummaryComment (userData, time, process, comment, kvlist ): - liste[33] = liste[33] + 1 - return otf.OTF_RETURN_OK - -def handleFunctionSummary (userData, time, function, process, invocations, exclTime, inclTime, kvlist ): - liste[34] = liste[34] + 1 - return otf.OTF_RETURN_OK - -def handleFunctionGroupSummary (userData, time, funcGroup, process, invocations, exclTime, inclTime, kvlist ): - liste[35] = liste[35] + 1 - return otf.OTF_RETURN_OK - -def handleMessageSummary (userData, time, process, peer, comm, typ, sentNumber, receivedNumber, sentBytes, receivedBytes, kvlist ): - liste[36] = liste[36] + 1 - return otf.OTF_RETURN_OK - -def handleCollopSummary (userData, time, process, comm, collective, sentNumber, receivedNumber, sentBytes, receivedBytes, kvlist ): - liste[37] = liste[37] + 1 - return otf.OTF_RETURN_OK - -def handleFileOperationSummary (userData, time, fileid, process, nopen, nclose, nread, nwrite, nseek, bytesread, byteswrite, kvlist ): - liste[38] = liste[38] + 1; - return otf.OTF_RETURN_OK - -def handleFileGroupOperationSummary (uD, time, groupid, process, nopen, nclose, nread, nwrite, nseek, bytesread, byteswrite, kvlist ): - liste[39] = liste[39] + 1 - return otf.OTF_RETURN_OK - - -def handleUnknownRecord (userData, time, process, record, kvlist ): - liste[40] = liste[40] + 1 - return otf.OTF_RETURN_OK - -#### Marker #### -def handleDefMarker (userData, stream, token, name, typ, kvlist ): - liste[41] = liste[41] + 1 - return otf.OTF_RETURN_OK - -def handleMarker (userData, time, process, token, text, kvlist ): - liste[42] = liste[42] + 1 - return otf.OTF_RETURN_OK - -def handleRMAPut (userData, time, process, origin, target, communicator, tag, bytes, source, kvlist ): - liste[43] = liste[43] + 1 - return otf.OTF_RETURN_OK - -def handleRMAPutRemoteEnd (userData, time, process, origin, target, communicator, tag, bytes, source, kvlist ): - liste[44] = liste[44] + 1 - return otf.OTF_RETURN_OK - -def handleRMAGet (userData, time, process, origin, target, communicator, tag, bytes, source, kvlist ): - liste[45] = liste[45] + 1 - return otf.OTF_RETURN_OK - -def handleRMAEnd (userData, time, process, remote, communicator, tag, source, kvlist ): - liste[46] = liste[46] + 1 - return otf.OTF_RETURN_OK - -if len(sys.argv) <= 1: - print "No tracefile given. Abort." - exit() - -print "Tracefile: ", sys.argv[1] - -manager = otf.OTF_FileManager_open(100) -handlers = otf.OTF_HandlerArray_open() -reader = otf.OTF_Reader_open(sys.argv[1], manager) - -#### DEFINITIONS #### -otf.OTF_HandlerArray_setHandler( handlers, handleDefFunction, otf.OTF_DEFFUNCTION_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefFunctionGroup, otf.OTF_DEFFUNCTIONGROUP_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefinitionComment, otf.OTF_DEFINITIONCOMMENT_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleTimerResolution, otf.OTF_DEFTIMERRESOLUTION_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefProcess, otf.OTF_DEFPROCESS_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefProcessGroup, otf.OTF_DEFPROCESSGROUP_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefCollectiveOperation, otf.OTF_DEFCOLLOP_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefCounter, otf.OTF_DEFCOUNTER_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefCounterGroup, otf.OTF_DEFCOUNTERGROUP_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefScl, otf.OTF_DEFSCL_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefSclFile, otf.OTF_DEFSCLFILE_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefCreator, otf.OTF_DEFCREATOR_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefVersion, otf.OTF_DEFVERSION_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefFile, otf.OTF_DEFFILE_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleDefFileGroup, otf.OTF_DEFFILEGROUP_RECORD ) - -#### EVENTS #### -otf.OTF_HandlerArray_setHandler( handlers, handleEnter, otf.OTF_ENTER_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleLeave, otf.OTF_LEAVE_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleSendMsg, otf.OTF_SEND_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleRecvMsg, otf.OTF_RECEIVE_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleCounter, otf.OTF_COUNTER_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleCollectiveOperation, otf.OTF_COLLOPSUMMARY_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleBeginCollectiveOperation, otf.OTF_BEGINCOLLOP_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleEndCollectiveOperation, otf.OTF_ENDCOLLOP_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleEventComment, otf.OTF_EVENTCOMMENT_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleBeginProcess, otf.OTF_BEGINPROCESS_RECORD) -otf.OTF_HandlerArray_setHandler( handlers, handleEndProcess, otf.OTF_ENDPROCESS_RECORD) -otf.OTF_HandlerArray_setHandler( handlers, handleFileOperation, otf.OTF_FILEOPERATION_RECORD) -otf.OTF_HandlerArray_setHandler( handlers, handleBeginFileOperation, otf.OTF_BEGINFILEOP_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleEndFileOperation, otf.OTF_ENDFILEOP_RECORD ) - -#### SNAPSHOTS #### -otf.OTF_HandlerArray_setHandler( handlers, handleSnapshotComment, otf.OTF_SNAPSHOTCOMMENT_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleEnterSnapshot, otf.OTF_ENTERSNAPSHOT_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleSendSnapshot, otf.OTF_SENDSNAPSHOT_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleOpenFileSnapshot, otf.OTF_OPENFILESNAPSHOT_RECORD ) - -#### SUMMARY #### -otf.OTF_HandlerArray_setHandler( handlers, handleSummaryComment, otf.OTF_SUMMARYCOMMENT_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleFunctionSummary, otf.OTF_FUNCTIONSUMMARY_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleFunctionGroupSummary, otf.OTF_FUNCTIONGROUPSUMMARY_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleMessageSummary, otf.OTF_MESSAGESUMMARY_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleCollopSummary, otf.OTF_COLLOPSUMMARY_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleFileOperationSummary, otf.OTF_FILEOPERATIONSUMMARY_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleFileGroupOperationSummary, otf.OTF_FILEGROUPOPERATIONSUMMARY_RECORD ) - -#### UNKNOWN #### -otf.OTF_HandlerArray_setHandler( handlers, handleUnknownRecord, otf.OTF_UNKNOWN_RECORD ) - -#### MARKER #### -otf.OTF_HandlerArray_setHandler( handlers, handleDefMarker, otf.OTF_DEFMARKER_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleMarker, otf.OTF_MARKER_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleRMAPut, otf.OTF_RMAPUT_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleRMAPutRemoteEnd, otf.OTF_RMAPUTRE_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleRMAGet, otf.OTF_RMAGET_RECORD ) -otf.OTF_HandlerArray_setHandler( handlers, handleRMAEnd, otf.OTF_RMAEND_RECORD ) - -otf.OTF_Reader_readDefinitions(reader, handlers) -otf.OTF_Reader_readEvents(reader, handlers) -otf.OTF_Reader_readSnapshots(reader, handlers) -otf.OTF_Reader_readStatistics(reader, handlers) -otf.OTF_Reader_readMarkers(reader, handlers) - -otf.OTF_Reader_close(reader) -otf.OTF_HandlerArray_close(handlers) -otf.OTF_FileManager_close(manager) - -app = QApplication(sys.argv) - -window = QWidget() -window.setWindowTitle("OTF-Reader in Python") -window.setGeometry(400,300,400,400) -window.setFixedSize(400,400) - -tabelle = QTableWidget(window) -tabelle.setGeometry(5,5,390,390) - -tabelle.setRowCount(0) -tabelle.setColumnCount(2) - -tabelle.setHorizontalHeaderItem(0,QTableWidgetItem("Records")) -tabelle.setHorizontalHeaderItem(1,QTableWidgetItem("Calls")) - -tabelle.setColumnWidth(0,245) -tabelle.horizontalHeader().setResizeMode(QHeaderView.Fixed); -tabelle.verticalHeader().setResizeMode(QHeaderView.Fixed) - -n = 0 -k = 0 -for i in liste: - if i > 0: - tabelle.setRowCount(tabelle.rowCount() + 1) - tabelle.setItem(k,0,QTableWidgetItem(names[n])) - tabelle.setItem(k,1,QTableWidgetItem(str(i))) - k = k + 1 - n = n + 1 - -window.show() -app.exec_() diff --git a/externals/otf/tests/otf_python/test_write.py b/externals/otf/tests/otf_python/test_write.py deleted file mode 100644 index baaae1de70c04e1d84985fd83798b2a5c35120f0..0000000000000000000000000000000000000000 --- a/externals/otf/tests/otf_python/test_write.py +++ /dev/null @@ -1,188 +0,0 @@ -#! /usr/bin/python - -################################################################################ -# 1st parameter = trace to write -################################################################################ - - -from otf import * -import sys - - -def WriteRecords( writer ): - - procs= [ 1, 2, 11, 12 ] - handleid= 0 - - # definitions - OTF_Writer_writeDefinitionComment( writer, 0, "this is a definition comment" ) - OTF_Writer_writeDefCreator( writer, 0, "test_complete" ) - OTF_Writer_writeDefTimerResolution( writer, 0, 1234 ) - OTF_Writer_writeDefProcess( writer, 0, procs[0], "process number one", 0 ) - OTF_Writer_writeDefProcess( writer, 0, procs[1], "process number two", 0 ) - OTF_Writer_writeDefProcess( writer, 0, procs[2], "child one of process one", procs[0] ) - OTF_Writer_writeDefProcess( writer, 0, procs[3], "child two of process one", procs[0] ) - OTF_Writer_writeDefProcessGroup( writer, 0, 1000, "commworld", 4, procs ) - - OTF_Writer_writeDefSclFile( writer, 0, 100000, "main.c" ) - OTF_Writer_writeDefScl( writer, 0, 10000, 100000, 123 ) #/*main*/ - OTF_Writer_writeDefScl( writer, 0, 20000, 100000, 456 ) #/*sub*/ - OTF_Writer_writeDefScl( writer, 0, 30000, 100000, 789 ) #/*sub2*/ - OTF_Writer_writeDefScl( writer, 0, 40000, 100000, 1111 ) #/*sendsnapshot*/ - - OTF_Writer_writeDefFunctionGroup( writer, 0, 1000, "functiongroup one" ) - OTF_Writer_writeDefFunctionGroup( writer, 0, 2000, "functiongroup two" ) - OTF_Writer_writeDefFunction( writer, 0, 1, "mainfunction", 1000, 10000 ) - OTF_Writer_writeDefFunction( writer, 0, 2, "subfunction one", 2000, 20000 ) - OTF_Writer_writeDefFunction( writer, 0, 3, "subfunction two", 2000, 30000 ) - - - OTF_Writer_writeDefCollectiveOperation( writer, 0, 1, "MPI_Barrier", OTF_COLLECTIVE_TYPE_BARRIER ); - - OTF_Writer_writeDefCounterGroup( writer, 0, 1000, "counter group one" ) - OTF_Writer_writeDefCounter( writer, 0, 1, "flops", OTF_COUNTER_TYPE_ACC|OTF_COUNTER_SCOPE_START, 1000, "#" ) - OTF_Writer_writeDefCounter( writer, 0, 2, "memory usage", OTF_COUNTER_TYPE_ABS|OTF_COUNTER_SCOPE_START, 1000, "MiB" ) - - - OTF_Writer_writeDefFileGroup( writer, 0, 100, "file group one" ) - OTF_Writer_writeDefFile( writer, 0, 1, "file one", 100 ) - OTF_Writer_writeDefFile( writer, 0, 2, "file two", 100 ) - - - - #/* *** events *** */ - for i in range(4): - - timebase= i*10000000 - nexttimebase= (i+1)*10000000 - - #/* *** determine own, previous and next processid *** */ - me= procs[i] - if 3 == i : - next= procs[0] - else : - next= procs[i+1] - if 0 == i : - prev= procs[3] - else : - prev= procs[i-1] - - #/* *** process start *** */ - OTF_Writer_writeBeginProcess( writer, timebase, me ) - OTF_Writer_writeEventComment( writer, timebase+1, me, "this process just started" ) - OTF_Writer_writeEnter( writer, timebase+2, 1, me, 10000) - - - OTF_Writer_writeFileOperation( writer, timebase+3, 1, me, handleid, 123, 456, 789, 0 ); - ++handleid; - - OTF_Writer_writeFileOperation( writer, timebase+4, 2, me, handleid, 1230, 4560, 7890, 0 ); - ++handleid; - - OTF_Writer_writeBeginFileOperation( writer, timebase +11, me, 100, 0 ); - OTF_Writer_writeEndFileOperation( writer, timebase +12, me, 1, 100, handleid, 1230, 4567, 0 ); - - for j in range(1,1000) : - #for j in range(1,3) : - - time= timebase+j*1000 - - OTF_Writer_writeCounter( writer, time, me, 1, j*10000 ) - OTF_Writer_writeCounter( writer, time+1, me, 2, j ) - - time+= 100 - - OTF_Writer_writeCollectiveOperation( writer, time, me, 1, 1000, 1, 123, 456, 100, 40000 ) - - time+= 100 - - OTF_Writer_writeSendMsg( writer, time, me, next, 1000, 0, 4, 40000 ) - - time+= 100 - - for k in range(10) : - #for k in range(3) : - - OTF_Writer_writeEnter( writer, time, 2, me, 20000 ) - time+=10 - OTF_Writer_writeLeave( writer, time, 2, me, 20000 ) - time+=20 - OTF_Writer_writeEnter( writer, time, 3, me, 30000 ) - time+=10 - OTF_Writer_writeLeave( writer, time, 3, me, 30000 ) - time+=10 - - - - time+= 100; - - OTF_Writer_writeRecvMsg( writer, time, me, prev, 1000, 0, 4, 40000 ) - - - - - #/* *** process end *** */ - OTF_Writer_writeLeave( writer, nexttimebase-3, 1, me, 10000 ) - OTF_Writer_writeEventComment( writer, nexttimebase-2, me, "this process will terminate soon" ) - OTF_Writer_writeEndProcess( writer, nexttimebase-1, me ) - - - - #/* *** snapshots *** */ - time= 100 - for i in range(4) : - - OTF_Writer_writeSnapshotComment( writer, time, procs[i], "snapshot testcomment" ) - time+= 10 - - OTF_Writer_writeEnterSnapshot( writer, time, 500, 1, procs[i], 10000 ) - time+= 10 - - OTF_Writer_writeSendSnapshot( writer, time, 1500, procs[i], 1, 1000, 0, 128, 40000 ) - time+= 10 - - OTF_Writer_writeOpenFileSnapshot( writer, time, 1, 2, procs[i], 3, 0 ) - time+= 10 - - - - #/* *** statistics *** */ - time= 100 - for i in range(4) : - - OTF_Writer_writeSummaryComment( writer, time, procs[i], "summary testcomment" ) - time+= 10 - - OTF_Writer_writeFunctionSummary( writer, time, 2, procs[i], 123, 300, 400 ) - time+= 10 - - OTF_Writer_writeFunctionGroupSummary( writer, time, 2000, procs[i], 456, 500, 600 ) - time+= 10 - - OTF_Writer_writeMessageSummary( writer, time, procs[i], 1, 1000, 0, 789, 123, 10000, 20000 ) - time+= 10 - - - OTF_Writer_writeFileOperationSummary( writer, time, 1, procs[i], 2, 3, 4, 5, 6, 7, 8 ) - time+= 10 - - OTF_Writer_writeFileGroupOperationSummary( writer, time, 1, procs[i], 2, 3, 4, 5, 6, 7, 8 ) - time+= 10 - - - - -################################################################################# - - -if __name__ == '__main__': - - manager= OTF_FileManager_open( 100 ) - writer= OTF_Writer_open( sys.argv[1], 1000000, manager ) - - - WriteRecords(writer) - - - OTF_Writer_close( writer ) - OTF_FileManager_close( manager ) diff --git a/externals/otf/tools/Makefile.am b/externals/otf/tools/Makefile.am deleted file mode 100644 index 6b299c63d11be3ad3c542e0b89d584a768befc62..0000000000000000000000000000000000000000 --- a/externals/otf/tools/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -TMP1 = otfaux otfconfig otfdump otfinfo otfmerge otfprofile otfshrink - -if AMHAVEVTF3 -TMP2 = otf2vtf vtf2otf -else -TMP2= -endif - -if AMHAVEZLIB -TMP3 = otfcompress -else -TMP3 = -endif - -if AMHAVEMPI -TMP4 = otfmerge-mpi -else -TMP4 = -endif - -SUBDIRS = $(TMP1) $(TMP2) $(TMP3) $(TMP4) diff --git a/externals/otf/tools/Makefile.in b/externals/otf/tools/Makefile.in deleted file mode 100644 index 8964dfcc0c3632ef46ba7a380bf6a80ec14349ee..0000000000000000000000000000000000000000 --- a/externals/otf/tools/Makefile.in +++ /dev/null @@ -1,625 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = tools -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = otfaux otfconfig otfdump otfinfo otfmerge otfprofile \ - otfshrink otf2vtf vtf2otf otfcompress otfmerge-mpi -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -TMP1 = otfaux otfconfig otfdump otfinfo otfmerge otfprofile otfshrink -@AMHAVEVTF3_FALSE@TMP2 = -@AMHAVEVTF3_TRUE@TMP2 = otf2vtf vtf2otf -@AMHAVEZLIB_FALSE@TMP3 = -@AMHAVEZLIB_TRUE@TMP3 = otfcompress -@AMHAVEMPI_FALSE@TMP4 = -@AMHAVEMPI_TRUE@TMP4 = otfmerge-mpi -SUBDIRS = $(TMP1) $(TMP2) $(TMP3) $(TMP4) -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-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 - - -# 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/externals/otf/tools/otf2vtf/Handler.c b/externals/otf/tools/otf2vtf/Handler.c deleted file mode 100644 index 4878dcee8741f53c6191d233e66f07983ba2a12e..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otf2vtf/Handler.c +++ /dev/null @@ -1,490 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <stdlib.h> -#include <assert.h> - -#include "otf.h" - -#include "vtf3.h" - -#include "Treehash.h" - -#include "Handler.h" - -#ifdef __GNUC__ -#else /* __GNUC__ */ -#define __PRETTY_FUNCTION__ "<unspecified function>" -#endif /* __GNUC__ */ - - - -/* *** Definition handler *** ************************************* */ - - -int handleDefinitionComment( void* firsthandlerarg, uint32_t streamid, - const char* comment ) { - - - return ( 0 == VTF3_WriteComment( ((fcbT*) firsthandlerarg)->fcb, 0, comment ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleDeftimerresolution( void* firsthandlerarg, uint32_t streamid, - uint64_t ticksPerSecond ) { - - - return ( 0 == VTF3_WriteDefclkperiod( ((fcbT*) firsthandlerarg)->fcb, - 1.0 / (double) ticksPerSecond ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleDefprocess( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t parent ) { - - - treehash_addnode ( ((fcbT*) firsthandlerarg)->p_hashtab, deftoken, name, - parent ); - - return OTF_RETURN_OK; -} - - -int handleDefprocessgroup( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t n, uint32_t* array ) { - - - unsigned int* tripletarray; - uint32_t i; - - - /* translate DefProcessgroup to VTF3 DefCommunicator although this is - ambiguous, it could be used as a DefCpuGrp as well. */ - - - /* do a very simple tranlation from an ordinary array to a triplet array - like used in vtf3 */ - tripletarray= malloc( 3 * n * sizeof(unsigned int) ); - assert( tripletarray ); - for ( i= 0; i < n; i++ ) { - - tripletarray[3*i+0]= array[i]; - tripletarray[3*i+1]= array[i]; - tripletarray[3*i+2]= 1; - } - - VTF3_WriteDefcommunicator( ((fcbT*) firsthandlerarg)->fcb, - deftoken /* int communicator */, - n /* int communicatorsize */, - n /* int tripletarraydim */, - tripletarray /* const unsigned int *tripletarray */ ); - - free( tripletarray ); - - return OTF_RETURN_OK; -} - - -int handleDeffunction( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t group, - uint32_t scltoken ) { - - - return ( 0 == VTF3_WriteDefstate( ((fcbT*) firsthandlerarg)->fcb, group, deftoken, - name, scltoken ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleDeffunctiongroup( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name ) { - - - return ( 0 == VTF3_WriteDefact( ((fcbT*) firsthandlerarg)->fcb, deftoken, name ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleDefcounter( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t properties, - uint32_t countergroup, const char* unit ) { - - - uint64_t valuebounds[2]= { (uint64_t) 0, (uint64_t) -1 }; - - int dodifferentiation; - int datarephint; - - - static int first= 1; - - if ( 1 == first ) { - first= 0; - fprintf( stderr, "translation of performance counter " - "definitions not fully supported\n" ); - } - - dodifferentiation= - ( OTF_COUNTER_TYPE_ACC == ( properties & OTF_COUNTER_TYPE_BITS ) ) ? 1 : 0; - - if ( OTF_COUNTER_SCOPE_START == ( properties & OTF_COUNTER_SCOPE_BITS ) ) { - - datarephint = VTF3_DATAREPHINT_SAMPLE; - - } else if ( OTF_COUNTER_SCOPE_LAST == ( properties & OTF_COUNTER_SCOPE_BITS ) ) { - - datarephint = VTF3_DATAREPHINT_BEFORE; - - } else { - - datarephint = VTF3_DATAREPHINT_SAMPLE; /* standard value */ - - fprintf( stderr, "otf2vtf: %s WARNING for counter def %u: " - "counter type not supported\n", __PRETTY_FUNCTION__, deftoken ); - } - - return ( 0 == VTF3_WriteDefsamp( ((fcbT*) firsthandlerarg)->fcb, - deftoken /* int sampletoken */, - countergroup /* int sampleclasstoken */, - 0 /* int iscpugrpsamp */, - 0 /* unsigned int cpuorcpugrpid */, - VTF3_VALUETYPE_UINT /* int valuetype */, - valuebounds /* const void *valuebounds */, - dodifferentiation /* int dodifferentiation */, - datarephint /* int datarephint */, - name /* const char *samplename */, - unit /* const char *sampleunit */ ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleDefcountergroup( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name ) { - - - return ( 0 == VTF3_WriteDefsampclass( ((fcbT*) firsthandlerarg)->fcb, deftoken, - name ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleDefCollectiveOperation( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t type ) { - - - return ( 0 == VTF3_WriteDefglobalop( ((fcbT*) firsthandlerarg)->fcb, deftoken, - name ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleDefscl( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, uint32_t sclfile, uint32_t sclline ) { - - - int sclfile2= sclfile; - int sclline2= sclline; - - - return ( 0 == VTF3_WriteDefscl( ((fcbT*) firsthandlerarg)->fcb, deftoken, 1, - &sclfile2, &sclline2 ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleDefsclfile( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* filename ) { - - - return ( 0 == VTF3_WriteDefsclfile( ((fcbT*) firsthandlerarg)->fcb, deftoken, - filename ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleDefFile( void* firsthandlerarg, uint32_t streamid, - uint32_t token, const char* name, uint32_t group ) { - - - return ( 0 == VTF3_WriteDefiofile( ((fcbT*) firsthandlerarg)->fcb, (int)token-1, - VTF3_NOCOMMUNICATOR, name ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - - -/* *** Event handler *** ****************************************** */ - - -int handleEventComment( void* firsthandlerarg, uint64_t time, - const char* comment ) { - - - FileIOEndQueue_check( &(((fcbT*) firsthandlerarg)->FileIOQueue), time, firsthandlerarg ); - - - return ( 0 == VTF3_WriteComment( ((fcbT*) firsthandlerarg)->fcb, time, comment ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleCounter( void* firsthandlerarg, uint64_t time, uint32_t process, - uint32_t token, uint64_t value ) { - - - int sampletokenarray= token; - int samplevaluetypearray= VTF3_VALUETYPE_UINT; - uint64_t samplevaluearray= value; - - nodeT *node = treehash_searchnode( ((fcbT*) firsthandlerarg)->p_hashtab, process ); - - if ( NULL == node ) { - - fprintf( stderr, "otf2vtf WARNING: undefined process %u, record ignored\n", - process ); - - return 0; - } - - FileIOEndQueue_check( &(((fcbT*) firsthandlerarg)->FileIOQueue), time, firsthandlerarg ); - - - return ( 0 == VTF3_WriteSamp( ((fcbT*) firsthandlerarg)->fcb, time, - node->processi, 1, &sampletokenarray, &samplevaluetypearray, &samplevaluearray ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleEnter( void* firsthandlerarg, uint64_t time, uint32_t statetoken, - uint32_t cpuid, uint32_t scltoken ) { - - - nodeT *node = treehash_searchnode(((fcbT*) firsthandlerarg)->p_hashtab, - cpuid); - - if ( 0 == node ) { - - fprintf( stderr, "otf2vtf WARNING: undefined process %u, record ignored\n", - cpuid ); - - return OTF_RETURN_OK; - } - - - while (node->stacks <= node->stackc) { - node->stacks += STACK_ALLOC_WIDTH; - node->stack = realloc(node->stack,sizeof(uint32_t)*node->stacks); - assert(node->stack); - } - - node->stack[node->stackc] = statetoken; - ++node->stackc; - - FileIOEndQueue_check( &(((fcbT*) firsthandlerarg)->FileIOQueue), time, firsthandlerarg ); - - - /* 1st test ********************************************/ - return ( 0 == VTF3_WriteDownto( ((fcbT*) firsthandlerarg)->fcb, time, statetoken, - node->processi, scltoken ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleCollectiveOperation( void* firsthandlerarg, uint64_t time, - uint32_t process, uint32_t globaloptoken, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken ) { - - - nodeT *node = treehash_searchnode(((fcbT*) firsthandlerarg)->p_hashtab, - process); - - nodeT *root = treehash_searchnode(((fcbT*) firsthandlerarg)->p_hashtab, - rootprocess); - - if ( 0 == node ) { - - fprintf( stderr, "otf2vtf WARNING: undefined process %u, record ignored\n", - process ); - - return OTF_RETURN_OK; - } - - FileIOEndQueue_check( &(((fcbT*) firsthandlerarg)->FileIOQueue), time, firsthandlerarg ); - - - return ( 0 == VTF3_WriteGlobalop( ((fcbT*) firsthandlerarg)->fcb, time, - globaloptoken, node->processi, communicator, - root->processi, sent, received, duration, scltoken ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleRecvmsg( void* firsthandlerarg, uint64_t time, uint32_t receiver, - uint32_t sender, uint32_t communicator, uint32_t msgtype, - uint32_t msglength, uint32_t scltoken ) { - - - nodeT *nodesender = treehash_searchnode( - ((fcbT*) firsthandlerarg)->p_hashtab, sender); - nodeT *nodereceiver = treehash_searchnode( - ((fcbT*) firsthandlerarg)->p_hashtab, receiver); - - if ( 0 == nodesender || 0 == nodereceiver ) { - - fprintf( stderr, "otf2vtf WARNING: undefined process %u or %u, record ignored\n", - sender, receiver ); - - return OTF_RETURN_OK; - } - - FileIOEndQueue_check( &(((fcbT*) firsthandlerarg)->FileIOQueue), time, firsthandlerarg ); - - - return ( 0 == VTF3_WriteRecvmsg( ((fcbT*) firsthandlerarg)->fcb, time, - nodereceiver->processi, nodesender->processi, - communicator, msgtype, msglength, scltoken ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleSendmsg( void* firsthandlerarg, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t communicator, uint32_t msgtype, - uint32_t msglength, uint32_t scltoken ) { - - - nodeT *nodesender = treehash_searchnode( - ((fcbT*) firsthandlerarg)->p_hashtab, sender ); - nodeT *nodereceiver = treehash_searchnode( - ((fcbT*) firsthandlerarg)->p_hashtab, receiver); - - if ( 0 == nodesender || 0 == nodereceiver ) { - - fprintf( stderr, "otf2vtf WARNING: undefined process %u or %u, record ignored\n", - sender, receiver ); - - return OTF_RETURN_OK; - } - - FileIOEndQueue_check( &(((fcbT*) firsthandlerarg)->FileIOQueue), time, firsthandlerarg ); - - - return ( 0 == VTF3_WriteSendmsg( ((fcbT*) firsthandlerarg)->fcb, time, - nodesender->processi, nodereceiver->processi, communicator, msgtype, - msglength, scltoken ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleLeave( void* firsthandlerarg, uint64_t time, uint32_t statetoken, - uint32_t cpuid, uint32_t scltoken ) { - - - uint32_t savedstatetoken; - - - nodeT *node = treehash_searchnode(((fcbT*) firsthandlerarg)->p_hashtab, - cpuid); - - if ( 0 == node ) { - - fprintf( stderr, "otf2vtf WARNING: undefined process %u, record ignored\n", - cpuid ); - - return OTF_RETURN_OK; - } - - savedstatetoken = node->stack[node->stackc-1]; - - assert(node->stackc); - --node->stackc; - - if( statetoken == 0 ) { - statetoken = savedstatetoken; - } - - FileIOEndQueue_check( &(((fcbT*) firsthandlerarg)->FileIOQueue), time, firsthandlerarg ); - - - return ( 0 == VTF3_WriteUpfrom( ((fcbT*) firsthandlerarg)->fcb, time, statetoken, - node->processi, scltoken ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleBeginProcess( void* firsthandlerarg, uint64_t time, - uint32_t process ) { - - - fprintf( stderr, "otf2vtf: %s not yet implemented\n", __PRETTY_FUNCTION__ ); - - return OTF_RETURN_OK; -} - -int handleEndProcess( void* firsthandlerarg, uint64_t time, - uint32_t process ) { - - - fprintf( stderr, "otf2vtf: %s not yet implemented\n", __PRETTY_FUNCTION__ ); - - return OTF_RETURN_OK; -} - - -int handleFileOperation( void* firsthandlerarg, uint64_t time, uint32_t fileid, - uint32_t cpuid, uint64_t handleid, uint32_t operation, uint64_t bytes, - uint64_t duration, uint32_t source ) { - - - int iotype= VTF3_FILEIOTYPE_NOTYPE; - int vtf3bytes; - FileIOEndRecord* fier; - - nodeT *node = treehash_searchnode(((fcbT*) firsthandlerarg)->p_hashtab, - cpuid); - - - if( OTF_FILEOP_READ == operation ) { - - iotype= VTF3_FILEIOTYPE_READ; - - } else if ( OTF_FILEOP_WRITE == operation ) { - - iotype= VTF3_FILEIOTYPE_WRITE; - - } - - if( VTF3_FILEIOTYPE_NOTYPE != iotype ) { - - FileIOEndQueue_check( &(((fcbT*) firsthandlerarg)->FileIOQueue), time, firsthandlerarg ); - - - vtf3bytes= ( bytes > (uint64_t) ((unsigned int)(1<<31)) - 1) ? - (int)((unsigned int)(1<<31)-1) : (int) bytes; - - VTF3_WriteFileiobegin( ((fcbT*) firsthandlerarg)->fcb, time, node->processi, - iotype, (int) fileid-1, vtf3bytes, (int)source ); - - - fier= (FileIOEndRecord*) malloc( sizeof(FileIOEndRecord) ); - assert( fier ); - - fier->time= time + duration; - fier->process= node->processi; - fier->iotype= iotype; - fier->fileid= (int) fileid-1; - fier->bytes= vtf3bytes; - fier->source= (int) source; - fier->next= NULL; - - FileIOEndQueue_push( &(((fcbT*) firsthandlerarg)->FileIOQueue), fier ); - } - - - return OTF_RETURN_OK; -} diff --git a/externals/otf/tools/otf2vtf/Handler.h b/externals/otf/tools/otf2vtf/Handler.h deleted file mode 100644 index 886d9742598c4d6f749239708f3ff32487844b6c..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otf2vtf/Handler.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef OTFTOVTF3_HANDLER_H -#define OTFTOVTF3_HANDLER_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "OTF_inttypes.h" - - -/* *** Definition handler *** ************************************* */ - -int handleDefinitionComment( void* firsthandlerarg, uint32_t streamid, - const char* comment ); - -int handleDeftimerresolution( void* firsthandlerarg, uint32_t streamid, - uint64_t ticksPerSecond ); - -int handleDefprocess( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t parent ); - -int handleDefprocessgroup( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t n, uint32_t* array ); - -int handleDeffunction( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t group, uint32_t scltoken ); - -int handleDeffunctiongroup( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name ); - -int handleDefcounter( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t properties, - uint32_t countergroup, const char* unit ); - -int handleDefcountergroup( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name ); - -int handleDefCollectiveOperation( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t type ); - -int handleDefscl( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, uint32_t sclfile, uint32_t sclline ); - -int handleDefsclfile( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* filename ); - -int handleDefFile( void* firsthandlerarg, uint32_t streamid, - uint32_t token, const char* name, uint32_t group ); - - -/* *** Event handler *** ****************************************** */ - -int handleEventComment( void* firsthandlerarg, uint64_t time, - const char* comment ); - -int handleCounter( void* firsthandlerarg, uint64_t time, uint32_t process, - uint32_t counter_token, uint64_t value ); - -int handleEnter( void* firsthandlerarg, uint64_t time, uint32_t statetoken, - uint32_t cpuid, uint32_t scltoken ); - -int handleCollectiveOperation( void* firsthandlerarg, uint64_t time, - uint32_t process, uint32_t globaloptoken, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken ); - -int handleRecvmsg( void* firsthandlerarg, uint64_t time, uint32_t receiver, - uint32_t sender, uint32_t communicator, uint32_t msgtype, uint32_t msglength, - uint32_t scltoken ); - -int handleSendmsg( void* firsthandlerarg, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t communicator, uint32_t msgtype, uint32_t msglength, - uint32_t scltoken ); - -int handleLeave( void* firsthandlerarg, uint64_t time, uint32_t statetoken, - uint32_t cpuid, uint32_t scltoken ); - -int handleBeginProcess( void* firsthandlerarg, uint64_t time, - uint32_t process ); - -int handleEndProcess( void* firsthandlerarg, uint64_t time, - uint32_t process ); - -int handleFileOperation( void* firsthandlerarg, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t handleid, uint32_t operation, uint64_t bytes, - uint64_t duration, uint32_t source ); - - - -#endif /* OTFTOVTF3_HANDLER_H */ diff --git a/externals/otf/tools/otf2vtf/Makefile.am b/externals/otf/tools/otf2vtf/Makefile.am deleted file mode 100644 index 10302c660429bec6ccd66dba45230490f1cc5494..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otf2vtf/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -INCLUDES = \ - -I$(top_builddir)/otflib -I$(top_srcdir)/otflib \ - $(VTF3_INCLUDE_LINE) - -if AMBUILDBINARIES -bin_PROGRAMS = \ - otf2vtf -endif - -otf2vtf_LDADD = $(top_builddir)/otflib/libotf.la $(VTF3_LIB_LINE) -otf2vtf_DEPENDENCIES = $(top_builddir)/otflib/libotf.la -otf2vtf_SOURCES = \ - Handler.h \ - Treehash.h \ - otf2vtf.c \ - Handler.c \ - Treehash.c - diff --git a/externals/otf/tools/otf2vtf/Makefile.in b/externals/otf/tools/otf2vtf/Makefile.in deleted file mode 100644 index d729c9b17698e24c1db1c85267457aa3c844f5f9..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otf2vtf/Makefile.in +++ /dev/null @@ -1,597 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@AMBUILDBINARIES_TRUE@bin_PROGRAMS = otf2vtf$(EXEEXT) -subdir = tools/otf2vtf -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_otf2vtf_OBJECTS = otf2vtf.$(OBJEXT) Handler.$(OBJEXT) \ - Treehash.$(OBJEXT) -otf2vtf_OBJECTS = $(am_otf2vtf_OBJECTS) -am__DEPENDENCIES_1 = -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(otf2vtf_SOURCES) -DIST_SOURCES = $(otf2vtf_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = \ - -I$(top_builddir)/otflib -I$(top_srcdir)/otflib \ - $(VTF3_INCLUDE_LINE) - -otf2vtf_LDADD = $(top_builddir)/otflib/libotf.la $(VTF3_LIB_LINE) -otf2vtf_DEPENDENCIES = $(top_builddir)/otflib/libotf.la -otf2vtf_SOURCES = \ - Handler.h \ - Treehash.h \ - otf2vtf.c \ - Handler.c \ - Treehash.c - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/otf2vtf/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/otf2vtf/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -otf2vtf$(EXEEXT): $(otf2vtf_OBJECTS) $(otf2vtf_DEPENDENCIES) - @rm -f otf2vtf$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(otf2vtf_OBJECTS) $(otf2vtf_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Handler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Treehash.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otf2vtf.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS 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-binPROGRAMS - -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: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - 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-binPROGRAMS 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 \ - uninstall-binPROGRAMS - - -# 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/externals/otf/tools/otf2vtf/Treehash.c b/externals/otf/tools/otf2vtf/Treehash.c deleted file mode 100644 index 8418649c5d8049542ceb58b02087522efaafd8ad..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otf2vtf/Treehash.c +++ /dev/null @@ -1,391 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#include <stdlib.h> -#include <string.h> - -#include <stdio.h> - -#include "OTF_Platform.h" - -#include "vtf3.h" - -#include "Treehash.h" - - -/* *** macros ****************************************/ -#define HASH_SIZE 65536 - -#ifndef sun - -#define HASH_GET_KEY(key) \ -{ \ - key += ~(key << 15); \ - key ^= (key >> 10); \ - key += (key << 3); \ - key ^= (key >> 6); \ - key += ~(key << 11); \ - key ^= (key >> 16); \ - key &= HASH_SIZE - 1; \ -} - -#else /* sun */ - -/* stupid stupid gcc2.95 on sun */ - -uint32_t hash_get_key( uint32_t key ) { - - key += ~(key << 15); - key ^= (key >> 10); - key += (key << 3); - key ^= (key >> 6); - key += ~(key << 11); - key ^= (key >> 16); - key &= HASH_SIZE - 1; - - return key; -} - -#define HASH_GET_KEY(key) key= hash_get_key(key) - -#endif /* sun */ - - -/* *** variables ****************************************/ -hashtabT* p_hashtab= NULL; - - -void treehash_init( nodeT **pp_root, hashtabT **pp_hashtab ) -{ - int i; - uint32_t hashkey; - - /* init the tree */ - (*pp_root) = (nodeT *) malloc( sizeof( nodeT ) ); - (*pp_root)->process = 0; - (*pp_root)->processi = 0; - (*pp_root)->name = 0; - (*pp_root)->childrensize = 0; - (*pp_root)->p_children = 0; - - (*pp_root)->stack = NULL; - (*pp_root)->stackc = 0; - (*pp_root)->stacks = 0; - - - /* init the hashtab */ - (*pp_hashtab) = (hashtabT *) malloc ( sizeof( hashtabT ) * HASH_SIZE ); - - /* zero init the whole hashtable */ - for( i = 0; i < HASH_SIZE; i++ ) - { - (*pp_hashtab)[i].p_node = 0; - (*pp_hashtab)[i].entryvecsize = 0; - (*pp_hashtab)[i].p_entryvec = 0; - } - - /* insert root to the hashtable */ - hashkey = 0; - HASH_GET_KEY( hashkey ); - (*pp_hashtab)[hashkey].p_node = (*pp_root); - (*pp_hashtab)[hashkey].entryvecsize = 0; - (*pp_hashtab)[hashkey].p_entryvec = 0; -} - -int treehash_addnode( hashtabT *p_hashtab, uint32_t process, const char* name, uint32_t parent ) -{ - nodeT *p_newnode; - nodeT *p_parentnode; - - uint32_t hashkey; - - /* -- get and fill the new node -- */ - p_newnode = (nodeT *) malloc( sizeof( nodeT ) ); - - p_newnode->process = process; - p_newnode->processi = 0; - if ( name ) - p_newnode->name = strdup( name ); - else - p_newnode->name = 0; - p_newnode->childrensize = 0; - p_newnode->p_children = 0; - - p_newnode->stack = NULL; - p_newnode->stackc = 0; - p_newnode->stacks = 0; - - /* -- search parent node and connect the parent node to the new node -- */ - p_parentnode = treehash_searchnode( p_hashtab, parent ); - - if( p_parentnode->childrensize == 0 ) - { - p_parentnode->p_children = (nodeT **) malloc( sizeof( nodeT *) ); - } - else - { - p_parentnode->p_children = (nodeT **) realloc( p_parentnode->p_children, - sizeof( nodeT *) * p_parentnode->childrensize + 1 ); - } - - p_parentnode->p_children[p_parentnode->childrensize] = p_newnode; - p_parentnode->childrensize++; - - /* -- insert the new node to the hashtable -- */ - hashkey = process; - - HASH_GET_KEY( hashkey ); - - if (p_hashtab[hashkey].p_node == 0) - { /* if hashkey is not used */ - p_hashtab[hashkey].p_node = p_newnode; - } - else - { /* if hashkey is used */ - int i; - - if (p_hashtab[hashkey].p_entryvec == 0) - { /* if entryvec == 0 take malloc, and copy first item into it */ - p_hashtab[hashkey].p_entryvec = - ( entryvecT * )malloc( sizeof( entryvecT ) * 2); - - /* no memory left */ - if (p_hashtab[hashkey].p_entryvec == 0) - return -1; - - /* insert first node of the hash */ - p_hashtab[hashkey].p_entryvec[0].p_node = p_hashtab[hashkey].p_node; - p_hashtab[hashkey].entryvecsize = 1; - } - else - { /* if entryvec != 0 take realloc */ - p_hashtab[hashkey].p_entryvec = ( entryvecT * ) - realloc( p_hashtab[hashkey].p_entryvec, sizeof( entryvecT ) * - (p_hashtab[hashkey].entryvecsize + 1) ); - - if (p_hashtab[hashkey].p_entryvec == 0) - return -1; - } - - /* search right position for the new node and make space for newnode*/ - for( i = p_hashtab[hashkey].entryvecsize - 1; i >= 0 && - p_hashtab[hashkey].p_entryvec[i].p_node->process > process; i-- ) - { - p_hashtab[hashkey].p_entryvec[i+1] - = p_hashtab[hashkey].p_entryvec[i]; - } - - /* insert newnode */ - p_hashtab[hashkey].p_entryvec[i+1].p_node = p_newnode; - - p_hashtab[hashkey].entryvecsize++; - } - - return 0; -} - -nodeT *treehash_searchnode ( hashtabT *p_hashtab, uint32_t process ) -{ - uint32_t hashkey = process; - - HASH_GET_KEY( hashkey ); - - if ( 0 == p_hashtab[hashkey].p_node ) - return 0; - - if ( p_hashtab[hashkey].p_node->process == process ) - return p_hashtab[hashkey].p_node; - else if ( !p_hashtab[hashkey].p_entryvec ) - return 0; - else - { /* search the vector of the hashkey */ - return treehash_searchvec(p_hashtab[hashkey].p_entryvec, - p_hashtab[hashkey].entryvecsize, process ); - } -} - -nodeT *treehash_searchvec ( entryvecT* vec, int vecsize, uint32_t process ) -{ - int l; - int r; - entryvecT *a; - - a = vec; - l = 0; - r = vecsize - 1; - while ( r >= l ) - { - int32_t m = ( l + r ) / 2; - - if ( process == a[m].p_node->process ) - { - return a[m].p_node; - } - - if ( process < a[m].p_node->process ) - r = m - 1; - else - l = m + 1; - } - - return 0; -} - -int treehash_createindices ( int index, nodeT *p_node ) -{ - int i; - - p_node->processi = index; - index++; - - for( i = 0; i < p_node->childrensize; i++ ) - index = treehash_createindices ( index, - p_node->p_children[i] ); - - return index; -} - - -void treehash_deleteall ( hashtabT *p_hashtab ) -{ - int i; - int a; - - for( i = 0; i < HASH_SIZE; i++ ) - { - treehash_deletenode ( p_hashtab[i].p_node ); - if ( p_hashtab[i].p_entryvec ) - p_hashtab[i].p_entryvec[0].p_node = 0; - - - if ( p_hashtab[i].p_entryvec ) - { - for( a = 0; a < p_hashtab[i].entryvecsize; a++ ) - { - treehash_deletenode ( p_hashtab[i].p_entryvec[a].p_node ); - } - - free( p_hashtab[i].p_entryvec ); - p_hashtab[i].p_entryvec = 0; - } - } -} - -void treehash_deletenode ( nodeT *p_node ) -{ - if ( p_node ) - { - if ( p_node->name ) - { - free( p_node->name ); - p_node->name = 0; - } - if ( p_node->p_children ) - { - free( p_node-> p_children ); - p_node-> p_children = 0; - } - - if( p_node->stack != NULL ) { - free(p_node->stack); - p_node->stack = NULL; - p_node->stackc = 0; - p_node->stacks = 0; - } - - free ( p_node ); - p_node = 0; - } -} - - -static void FileIOEndQueue_pop( FileIOEndRecord** queue ); - -FileIOEndRecord* FileIOEndQueue_init() { - - - return NULL; -} - - -void FileIOEndQueue_check( FileIOEndRecord** queue, uint64_t time, void* fha ) { - - - if( NULL == (*queue) ) return; - - while( NULL != (*queue) && (*queue)->time < time ) { - - VTF3_WriteFileioend( ((fcbT*) fha)->fcb, (*queue)->time, - (*queue)->process, (*queue)->iotype, (*queue)->fileid, - (*queue)->bytes, (*queue)->source ); - - FileIOEndQueue_pop( queue ); - } -} - - -void FileIOEndQueue_finish( FileIOEndRecord** queue ) { - - - while( NULL != (*queue) ) { - - FileIOEndQueue_pop( queue ); - } -} - - -void FileIOEndQueue_pop( FileIOEndRecord** queue ) { - - - FileIOEndRecord* tmp; - - if( (*queue) != NULL ) { - - if( (*queue)->next != NULL ) { - - tmp= (*queue)->next; - free( *queue ); - - } else { - - tmp= NULL; - free( *queue ); - - } - - *queue= tmp; - } -} - - -void FileIOEndQueue_push( FileIOEndRecord** queue, FileIOEndRecord* append ) { - - - FileIOEndRecord* tmp; - FileIOEndRecord* last; - - - tmp= (*queue); - last= NULL; - - while( NULL != tmp ) { - - if( append->time < tmp->time ) break; - - last= tmp; - tmp= tmp->next; - } - - if( NULL != last ) { - - append->next= tmp; - last->next= append; - - } else { - - append->next= tmp; - *queue= append; - } -} diff --git a/externals/otf/tools/otf2vtf/Treehash.h b/externals/otf/tools/otf2vtf/Treehash.h deleted file mode 100644 index 0fb0016fb38f7bfaa6c08c8655edff6cfb3a8ce9..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otf2vtf/Treehash.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef OTFTOVTF3_TREEHASH_H -#define OTFTOVTF3_TREEHASH_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <assert.h> - -#include "OTF_inttypes.h" -#include "OTF_Platform.h" - - -#define STACK_ALLOC_WIDTH 10 - - -/* *** queue of FileIOEnd records *********************/ -typedef struct FileIOEndRecord_s { - - uint64_t time; - uint32_t process; - int iotype; - int fileid; - uint32_t bytes; - int source; - - struct FileIOEndRecord_s* next; - -} FileIOEndRecord; - - -/* *** tree structure *******************************/ -typedef struct nodeS -{ - uint32_t process; /* cpu token of otf */ - uint32_t processi; /* index of cpu for vtf3 */ - char *name; /* process name */ - int childrensize; /* sizeof children vector */ - struct nodeS **p_children; /* vector of children */ - - /* function stack */ - uint32_t *stack; - uint32_t stackc; - uint32_t stacks; - -}nodeT; - -/* *** hash structures *******************************/ -typedef struct entryvecS -{ - nodeT *p_node; /* pointer to the treenode */ -}entryvecT; - -typedef struct hashtabS -{ - nodeT *p_node; - - int entryvecsize; - entryvecT * p_entryvec; -}hashtabT; - -typedef struct { - - void *fcb; - hashtabT *p_hashtab; - FileIOEndRecord* FileIOQueue; - -}fcbT; - -/* *** FileIOEndQueue functions *************************/ -/* init */ -FileIOEndRecord* FileIOEndQueue_init( void ); - - -void FileIOEndQueue_finish( FileIOEndRecord** queue ); - -/* check if there are events matching the current timestamp */ -void FileIOEndQueue_check( FileIOEndRecord** queue, uint64_t time, void* fha ); - -/* add an element at the end */ -void FileIOEndQueue_push( FileIOEndRecord** queue, FileIOEndRecord* append ); - - -/* *** treehash functions *******************************/ - -/* initialize the tree and the hash */ -void treehash_init( nodeT **pp_root, hashtabT **pp_hashtab ); - -/* add a node to the tree and hash */ -int treehash_addnode( hashtabT *p_hashtab, uint32_t process, const char* name, uint32_t parent ); - -/* search a node using the hash */ -nodeT *treehash_searchnode ( hashtabT *p_hashtab, uint32_t process ); - -/* search the entryvector of a tree (binary search) -- only used intern -- */ -nodeT *treehash_searchvec ( entryvecT* vec, int vecsize, uint32_t process ); - -/* create indices (treeform -> linear for vtf3 */ -int treehash_createindices ( int index, nodeT *p_node ); - -/* free all memory ... */ -void treehash_deleteall ( hashtabT *p_hashtab ); - -/* free a treenode */ -void treehash_deletenode ( nodeT *p_node ); - -#endif /* OTFTOVTF3_TREEHASH_H */ diff --git a/externals/otf/tools/otf2vtf/otf2vtf.c b/externals/otf/tools/otf2vtf/otf2vtf.c deleted file mode 100644 index 9e6d4622d1ca88f8a7055ffe21211f858c0356ae..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otf2vtf/otf2vtf.c +++ /dev/null @@ -1,354 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <stddef.h> -#include <stdlib.h> -#include <string.h> -#include <stdio.h> - -#include "OTF_Platform.h" -#include "otf.h" - -#ifdef HAVE_VTF3 -#include "vtf3.h" -#endif /* HAVE_VTF3 */ - -#include "Handler.h" -#include "Treehash.h" - - -#define OTF2VTF3VERSION 1 -#define OTF2VTF3CREATOR "otf2vtf3" - -#define SHOW_HELPTEXT { \ - int l = 0; while( Helptext[l] ) { printf( "%s", Helptext[l++] ); } } - -static const char* Helptext[] = { -" \n", -" otf2vtf - Convert OTF trace files to VTF format. \n", -" \n", -" otf2vtf [Options] <input file name> \n", -" \n", -" Options: \n", -" -h, --help show this help message \n", -" -V show OTF version \n", -" -o <file> output file \n", -" -b <n> size of the reader buffer \n", -" -A write VTF3 ASCII sub-format (default) \n", -" -B write VTF3 binary sub-format \n", -" \n", NULL }; - -void writenames_recursive ( void* firsthandlerarg, nodeT *p_node ); - -int main (int argc, char **argv) { - - -#ifdef HAVE_VTF3 - - - fcbT fha; - int i; - int numcpus; - - char* inputFile = NULL; - char* outputFile = NULL; - int buffersize= 1024; - uint64_t ret_read; - - OTF_FileManager* manager; - OTF_Reader* reader; - OTF_HandlerArray* handlers; - nodeT* p_root; - - int format= VTF3_FILEFORMAT_STD_ASCII; - - handlers = OTF_HandlerArray_open(); - - /* argument handling */ - - if ( 1 >= argc ) { - - SHOW_HELPTEXT; - exit(0); - } - - for ( i = 1; i < argc; i++ ) { - - if( 0 == strcmp( "-i", argv[i] ) ) { - - if( i+1 < argc ) { - - inputFile= strdup( argv[i+1] ); - ++i; - } - - } else if ( 0 == strcmp( "-o", argv[i] ) ) { - - if( i+1 < argc ) { - - outputFile = argv[i+1]; - ++i; - } - - } else if( ( 0 == strcmp( "-b", argv[i] ) ) && ( i+1 < argc ) ) { - - buffersize = atoi( argv[i+1] ); - ++i; - - } else if ( 0 == strcmp( "--help", argv[i] ) || - 0 == strcmp( "-h", argv[i] ) ) { - - SHOW_HELPTEXT; - exit(0); - - } else if ( 0 == strcmp( "-A", argv[i] ) ) { - - format= VTF3_FILEFORMAT_STD_ASCII; - - } else if ( 0 == strcmp( "-B", argv[i] ) ) { - - format= VTF3_FILEFORMAT_STD_BINARY; - - } else if ( 0 == strcmp( "-V", argv[i] ) ) { - - printf( "%u.%u.%u \"%s\"\n", OTF_VERSION_MAJOR, OTF_VERSION_MINOR, - OTF_VERSION_SUB, OTF_VERSION_STRING); - exit( 0 ); - - } else { - - if ( '-' != argv[i][0] ) { - - inputFile= strdup( argv[i] ); - - } else { - - fprintf( stderr, "ERROR: Unknown argument.\n" ); - exit(1); - } - } - } - - if ( NULL == inputFile ) { - - printf( " no input file specified\n" ); - exit(1); - } - - if ( NULL == outputFile ) { - - printf( " no output file specified\n" ); - exit(1); - } - - - /* open filemanager */ - manager= OTF_FileManager_open( 100 ); - assert( NULL != manager ); - - /* Open OTF Reader */ - reader = OTF_Reader_open( inputFile, manager ); - - if( NULL == reader ) { - - fprintf( stderr, "cannot open input trace '%s'\n", inputFile ); - exit( 1 ); - } - - - OTF_Reader_setBufferSizes( reader, buffersize ); - - free( inputFile ); - - /* Initialize VTF3. */ - (void) VTF3_InitTables (); - - fha.fcb = VTF3_OpenFileOutput ( outputFile, format, 0); - assert( 0 != fha.fcb ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefinitionComment, - OTF_DEFINITIONCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFINITIONCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDeftimerresolution, - OTF_DEFTIMERRESOLUTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFTIMERRESOLUTION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefprocess, - OTF_DEFPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefprocessgroup, - OTF_DEFPROCESSGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFPROCESSGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDeffunction, - OTF_DEFFUNCTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFFUNCTION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDeffunctiongroup, - OTF_DEFFUNCTIONGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFFUNCTIONGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefcounter, - OTF_DEFCOUNTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFCOUNTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefcountergroup, - OTF_DEFCOUNTERGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFCOUNTERGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefCollectiveOperation, - OTF_DEFCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefscl, - OTF_DEFSCL_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFSCL_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefsclfile, - OTF_DEFSCLFILE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFSCLFILE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefFile, - OTF_DEFFILE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFFILE_RECORD ); - - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleEventComment, - OTF_EVENTCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_EVENTCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleCounter, - OTF_COUNTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_COUNTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleEnter, - OTF_ENTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_ENTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) - handleCollectiveOperation, OTF_COLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_COLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleRecvmsg, - OTF_RECEIVE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_RECEIVE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleSendmsg, - OTF_SEND_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_SEND_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleLeave, - OTF_LEAVE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_LEAVE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginProcess, - OTF_BEGINPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_BEGINPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndProcess, - OTF_ENDPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_ENDPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFileOperation, - OTF_FILEOPERATION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_FILEOPERATION_RECORD ); - - - /***************/ - treehash_init( &p_root, &fha.p_hashtab); - fha.FileIOQueue= FileIOEndQueue_init(); - /***************/ - - - VTF3_WriteDefversion( fha.fcb, OTF2VTF3VERSION); - VTF3_WriteDefcreator( fha.fcb, OTF2VTF3CREATOR ); - - ret_read = OTF_Reader_readDefinitions( reader, handlers ); - if( ret_read == OTF_READ_ERROR ) { - fprintf(stderr,"An error occurred while reading the tracefile. It seems to be damaged. Abort.\n"); - return 1; - } - - /***************/ - numcpus = 0; - /* indicate the processes */ - - for( i = 0; i < p_root->childrensize; i++ ) { - - numcpus = treehash_createindices( numcpus, p_root->p_children[i] ); - } - - if ( numcpus == 0) - { - fprintf( stderr, "There are no cpus.\n" ); - exit(1); - } - - /* write VTF3_syscpunum-record */ - VTF3_WriteDefsyscpunums( fha.fcb, 1, &numcpus ); - - /* write VFT3_cpuname-records */ - for( i = 0; i < p_root->childrensize; i++ ) { - - writenames_recursive( fha.fcb, p_root->p_children[i] ); - } - /***************/ - - ret_read = OTF_Reader_readEvents( reader, handlers ); - if( ret_read == OTF_READ_ERROR ) { - fprintf(stderr,"An error occurred while reading the tracefile. It seems to be damaged. Abort.\n"); - return 1; - } - - /***************/ - FileIOEndQueue_finish( &fha.FileIOQueue ); - treehash_deleteall( fha.p_hashtab ); - /***************/ - - /* Close all devices. */ - (void) VTF3_Close ( fha.fcb ); - - OTF_Reader_close( reader ); - OTF_HandlerArray_close( handlers ); - OTF_FileManager_close( manager ); - -#else /* HAVE_VTF3 */ - - fprintf( stderr, "VTF3 not available, otf2vtf deactivated\n" ); - -#endif /* HAVE_VTF3 */ - - return (0); -} - -void writenames_recursive ( void* firsthandlerarg, nodeT *p_node ) { - - -#ifdef HAVE_VTF3 - int i; - - if( p_node->name ) - VTF3_WriteDefcpuname( firsthandlerarg, p_node->processi, - p_node->name ); - - for( i = 0; i < p_node->childrensize; i++ ) - writenames_recursive ( firsthandlerarg, p_node->p_children[i] ); - -#endif /* HAVE_VTF3 */ -} - diff --git a/externals/otf/tools/otfaux/Control.cpp b/externals/otf/tools/otfaux/Control.cpp deleted file mode 100644 index be18c331fe1d70a14e923767937d6974f3fe0d4d..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfaux/Control.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - - -#include <iostream> -using namespace std; - - -#include "Control.h" - - -Control::Control( OTF_Writer* w, bool _verbose, bool _usefunctiongroups, - bool _usefilegroups, bool _doSnapshots, bool _doStatistics ) : - writer( w ), verbose( _verbose ), - usefunctiongroups( _usefunctiongroups ) { - - - nextTime= (uint64_t) -1; - state= new State( _usefunctiongroups, _usefilegroups, _doSnapshots, - _doStatistics ); -} - - -Control::~Control() { - - delete state; - -} - - -/** add time stamp where to generate a snapshot */ -void Control::addTime( uint64_t time ) { - - timestamps.insert( time ); - - nextTime= *( timestamps.begin() ); -} - - -uint64_t Control::getLastTime() { - - - return *(timestamps.rbegin()); -} - - -double Control::checkTime( uint64_t time ) { - - - if ( time >= nextTime ) { - - - if ( verbose ) { - - cout << hex << "[" << time << "]" << endl; - } - - //state->printStatistics( time ); - - state->writeStatistics( writer, nextTime ); - - /* write snapshot only when its not the very end of the trace */ - if ( nextTime != getLastTime() ) { - - - //state->printStack(); - //state->printSends(); - //state->printOpenFiles(); - state->writeSnapshot( writer, nextTime ); - } - - - timestamps.erase( nextTime ); - - if ( ! timestamps.empty() ) { - - nextTime= *( timestamps.begin() ); - - } else { - - nextTime= (uint64_t) -1; - } - - return (double) nextTime; - } - - return (double) time; -} - diff --git a/externals/otf/tools/otfaux/Control.h b/externals/otf/tools/otfaux/Control.h deleted file mode 100644 index 45252743349ef05750ff9f62141d1ae921cab4b5..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfaux/Control.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef CONTROL_H -#define CONTROL_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <set> - -#include "OTF_inttypes.h" -#include "otf.h" - -#include "State.h" - - -struct Control { - - - State *state; - - /* time stamps where to generate a snapshots */ - std::set<uint64_t> timestamps; - - uint64_t nextTime; - - OTF_Writer* writer; - - bool verbose; - - int usefunctiongroups; - - - Control( OTF_Writer* writer= NULL, bool _verbose= false, - bool _usefunctiongroups= false, bool _usefilegroups= false, - bool _doSnapshots= true, bool _doStatistics= true ); - ~Control(); - - /** add time stamp where to generate a snapshot */ - void addTime( uint64_t time ); - - uint64_t getLastTime(); - - double checkTime( uint64_t time ); -}; - - -#endif /* CONTROL_H */ - diff --git a/externals/otf/tools/otfaux/Handler.cpp b/externals/otf/tools/otfaux/Handler.cpp deleted file mode 100644 index b2e4aa13d67cab3c90a74960550c819d434a1b59..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfaux/Handler.cpp +++ /dev/null @@ -1,306 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - - -#include <cassert> - -#include "Handler.h" -#include "Control.h" - - -/* *** Definition handler *** ************************************* */ - - -int handleDeftimerresolution( void* firsthandlerarg, uint32_t streamid, - uint64_t ticksPerSecond ) { - - - /* fprintf( stderr, " %s\n", __PRETTY_FUNCTION__ ); */ - - return OTF_RETURN_OK; -} - - -int handleDefprocess( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t parent ) { - - - /* fprintf( stderr, " %s\n", __PRETTY_FUNCTION__ ); */ - - Control* control= (Control*) firsthandlerarg; - - control->state->defProcess( deftoken ); - - return OTF_RETURN_OK; -} - - -int handleDefFunction( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t group, uint32_t scltoken ) { - - - /* fprintf( stderr, " %s\n", __PRETTY_FUNCTION__ ); */ - - Control* control= (Control*) firsthandlerarg; - - control->state->defFunction( deftoken, group ); - - return OTF_RETURN_OK; -} - - -int handleDefFile( void* firsthandlerarg, uint32_t stream, uint32_t token, - const char* name, uint32_t group ) { - - - /* fprintf( stderr, " %s\n", __PRETTY_FUNCTION__ ); */ - - Control* control= (Control*) firsthandlerarg; - - control->state->defFile( token, group ); - - return OTF_RETURN_OK; -} - -int handleDefCollectiveOperation(void *firsthandlerarg, uint32_t stream, uint32_t collOp, const char *name, uint32_t type) { - - - Control* control= (Control*) firsthandlerarg; - - control->state->defCollOp( collOp, type ); - - return OTF_RETURN_OK; -} - - -/* *** Event handler *** ****************************************** */ - - -int handleCounter( void* firsthandlerarg, uint64_t time, uint32_t process, - uint32_t token, uint64_t value ) { - - - /* fprintf( stderr, " %llu: %s\n", (unsigned long long) time, __PRETTY_FUNCTION__ ); */ - - return OTF_RETURN_OK; -} - - -int handleEnter( void* firsthandlerarg, uint64_t time, uint32_t statetoken, - uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList *kvlist ) { - - - /* fprintf( stderr, " %llu: %s\n", (unsigned long long) time, __PRETTY_FUNCTION__ ); */ - - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - control->state->enterFunction( time, cpuid, statetoken, kvlist ); - - return OTF_RETURN_OK; -} - - -int handleLeave( void* firsthandlerarg, uint64_t time, uint32_t statetoken, - uint32_t cpuid, uint32_t scltoken ) { - - - /* fprintf( stderr, " %llu: %s\n", (unsigned long long) time, __PRETTY_FUNCTION__ ); */ - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - control->state->leaveFunction( time, cpuid, statetoken ); - - return OTF_RETURN_OK; -} - - -int handleRecvmsg( void* firsthandlerarg, uint64_t time, uint32_t receiver, - uint32_t sender, uint32_t procGroup, uint32_t msgtag, - uint32_t msglength, uint32_t scltoken ) { - - - /* fprintf( stderr, " %llu: %s\n", (unsigned long long) time, __PRETTY_FUNCTION__ ); */ - - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - control->state->recvMessage( sender, receiver, procGroup, msgtag, - msglength ); - - return OTF_RETURN_OK; -} - - -int handleSendmsg( void* firsthandlerarg, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t procGroup, uint32_t msgtag, - uint32_t msglength, uint32_t scltoken, OTF_KeyValueList *kvlist ) { - - - /* fprintf( stderr, " %llu: %s\n", (unsigned long long) time, __PRETTY_FUNCTION__ ); */ - - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - control->state->sendMessage( time, sender, receiver, procGroup, msgtag, - msglength, scltoken, kvlist ); - - return OTF_RETURN_OK; -} - - -int handleBeginProcess( void* firsthandlerarg, uint64_t time, uint32_t process ) { - - - /* fprintf( stderr, " %llu: %s\n", (unsigned long long) time, __PRETTY_FUNCTION__ ); */ - - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - return OTF_RETURN_OK; -} - - -int handleEndProcess( void* firsthandlerarg, uint64_t time, uint32_t process ) { - - - /* fprintf( stderr, " %llu: %s\n", (unsigned long long) time, __PRETTY_FUNCTION__ ); */ - - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - return OTF_RETURN_OK; -} - - -int handleEventComment( void* firsthandlerarg, uint64_t time, - const char* comment ) { - - - /* fprintf( stderr, " %llu: %s\n", (unsigned long long) time, __PRETTY_FUNCTION__ ); */ - - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - return OTF_RETURN_OK; -} - - -int handleCollectiveOperation( void* firsthandlerarg, uint64_t time, - uint32_t process, uint32_t collective, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken ) { - - - /* fprintf( stderr, " %llu: %s\n", (unsigned long long) time, __PRETTY_FUNCTION__ ); */ - - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - control->state->collOperation( time, process, rootprocess, collective, sent, received ); - - return OTF_RETURN_OK; -} - - -int handleFileOperation( void* firsthandlerarg, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t handleid, uint32_t operation, uint64_t bytes, - uint64_t duration, uint32_t source, OTF_KeyValueList *kvlist ) { - - - /* fprintf( stderr, " %llu: %s\n", (unsigned long long) time, __PRETTY_FUNCTION__ ); */ - - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - return control->state->fileOperation( time, fileid, process, handleid, operation, - bytes, duration, source, kvlist ); -} - - -int handleBeginCollectiveOperation( void *firsthandlerarg, uint64_t time, uint32_t process, - uint32_t collOp, uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken, OTF_KeyValueList *kvlist ) { - - - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - control->state->beginCollOperation( time, process, rootProc, - procGroup, collOp,matchingId, sent, received, scltoken, kvlist ); - - - return OTF_RETURN_OK; - -} - -int handleEndCollectiveOperation( void *firsthandlerarg, uint64_t time, - uint32_t process, uint64_t matchingId ) { - - - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - control->state->endCollOperation( time, process, matchingId ); - - - return OTF_RETURN_OK; - -} - -int handleBeginFileOperation( void *firsthandlerarg, uint64_t time, uint32_t process, - uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *kvlist ) { - - - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - control->state->beginFileOperation( time, process, matchingId, scltoken, kvlist ); - - return OTF_RETURN_OK; - -} - -int handleEndFileOperation( void *firsthandlerarg, uint64_t time, uint32_t process, - uint32_t fileid, uint64_t matchingId, uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList *kvlist ) { - - - Control* control= (Control*) firsthandlerarg; - - while ( time > control->checkTime( time ) ) - ; - - control->state->endFileOperation( time, process, fileid, matchingId, - handleId, operation, bytes, scltoken, kvlist ); - - return OTF_RETURN_OK; - -} - diff --git a/externals/otf/tools/otfaux/Handler.h b/externals/otf/tools/otfaux/Handler.h deleted file mode 100644 index 8bb4254e711a435e69929194fcb7f17d087c947c..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfaux/Handler.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef OTFTOVTF3_HANDLER_H -#define OTFTOVTF3_HANDLER_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "OTF_inttypes.h" - -#include "otf.h" - - -/* *** Definition handler *** ************************************* */ - - -int handleDeftimerresolution( void* firsthandlerarg, uint32_t streamid, - uint64_t ticksPerSecond ); - -int handleDefprocess( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t parent ); - -int handleDefFunction( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t group, uint32_t scltoken ); - -int handleDefFile( void* userData, uint32_t stream, uint32_t token, - const char* name, uint32_t group ); - -int handleDefCollectiveOperation(void *firsthandlerarg, uint32_t stream, - uint32_t collOp, const char *name, uint32_t type); - -/* *** Event handler *** ****************************************** */ - -int handleCounter( void* firsthandlerarg, uint64_t time, uint32_t process, - uint32_t counter_token, uint64_t value ); - -int handleEnter( void* firsthandlerarg, uint64_t time, uint32_t statetoken, - uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList *kvlist ); - -int handleRecvmsg( void* firsthandlerarg, uint64_t time, uint32_t receiver, - uint32_t sender, uint32_t procGroup, uint32_t msgtag, uint32_t msglength, - uint32_t scltoken ); - -int handleSendmsg( void* firsthandlerarg, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t procGroup, uint32_t msgtag, uint32_t msglength, - uint32_t scltoken, OTF_KeyValueList *kvlist ); - -int handleLeave( void* firsthandlerarg, uint64_t time, uint32_t statetoken, - uint32_t cpuid, uint32_t scltoken ); - -int handleBeginProcess( void* firsthandlerarg, uint64_t time, - uint32_t process ); - -int handleEndProcess( void* firsthandlerarg, uint64_t time, - uint32_t process ); - -int handleEventComment( void* firsthandlerarg, uint64_t time, - const char* comment ); - -int handleCollectiveOperation( void* firsthandlerarg, uint64_t time, - uint32_t process, uint32_t functionToken, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken ); - -int handleFileOperation( void* firsthandlerarg, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t handleid, uint32_t operation, uint64_t bytes, - uint64_t duration, uint32_t source, OTF_KeyValueList *kvlist ); - -int handleBeginCollectiveOperation( void *firsthandlerarg, uint64_t time, uint32_t process, - uint32_t collOp, uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken, OTF_KeyValueList *kvlist ); - -int handleEndCollectiveOperation( void *firsthandlerarg, uint64_t time, - uint32_t process, uint64_t matchingId ); - -int handleBeginFileOperation( void *firsthandlerarg, uint64_t time, uint32_t process, - uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *kvlist ); - -int handleEndFileOperation( void *firsthandlerarg, uint64_t time, uint32_t process, - uint32_t fileid, uint64_t matchingId, uint64_t handleId, uint32_t operation, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *kvlist ); - -#endif /* OTFTOVTF3_HANDLER_H */ diff --git a/externals/otf/tools/otfaux/Makefile.am b/externals/otf/tools/otfaux/Makefile.am deleted file mode 100644 index 98221531ebb0d3e3a0918ab761a26fe1b6f44866..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfaux/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib - -if AMBUILDBINARIES -bin_PROGRAMS = \ - otfaux -endif - -otfaux_LDADD = $(top_builddir)/otflib/libotf.la -otfaux_DEPENDENCIES = $(otfaux_LDADD) -otfaux_SOURCES = \ - Control.h \ - Handler.h \ - State.h \ - otfaux.cpp \ - Control.cpp \ - Handler.cpp \ - State.cpp - -EXTRA_DIST = \ - otfaux_vs08.vcproj - diff --git a/externals/otf/tools/otfaux/Makefile.in b/externals/otf/tools/otfaux/Makefile.in deleted file mode 100644 index 10b4e66ca8f40df566dd7f8ab450533136c15486..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfaux/Makefile.in +++ /dev/null @@ -1,615 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@AMBUILDBINARIES_TRUE@bin_PROGRAMS = otfaux$(EXEEXT) -subdir = tools/otfaux -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_otfaux_OBJECTS = otfaux.$(OBJEXT) Control.$(OBJEXT) \ - Handler.$(OBJEXT) State.$(OBJEXT) -otfaux_OBJECTS = $(am_otfaux_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) -am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CXXLD_0 = @echo " CXXLD " $@; -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(otfaux_SOURCES) -DIST_SOURCES = $(otfaux_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib -otfaux_LDADD = $(top_builddir)/otflib/libotf.la -otfaux_DEPENDENCIES = $(otfaux_LDADD) -otfaux_SOURCES = \ - Control.h \ - Handler.h \ - State.h \ - otfaux.cpp \ - Control.cpp \ - Handler.cpp \ - State.cpp - -EXTRA_DIST = \ - otfaux_vs08.vcproj - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/otfaux/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/otfaux/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -otfaux$(EXEEXT): $(otfaux_OBJECTS) $(otfaux_DEPENDENCIES) - @rm -f otfaux$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(otfaux_OBJECTS) $(otfaux_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Control.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Handler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/State.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfaux.Po@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS 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-binPROGRAMS - -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: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - 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-binPROGRAMS 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 \ - uninstall-binPROGRAMS - - -# 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/externals/otf/tools/otfaux/State.cpp b/externals/otf/tools/otfaux/State.cpp deleted file mode 100644 index 147ee222af1f4f4b06137aaa4a8d089f4dc065e4..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfaux/State.cpp +++ /dev/null @@ -1,1544 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#include "OTF_Platform.h" - -#include "State.h" - - -#include <iostream> -#include <cassert> -using namespace std; - - -FunctionCall::FunctionCall( uint64_t _time, uint32_t _token, OTF_KeyValueList *_kvlist ) { - - time = _time; - token = _token; - - kvlist = OTF_KeyValueList_new(); - - OTF_KeyValueList_appendKeyValueList( kvlist, _kvlist ); - -} - -FunctionCall::FunctionCall( const FunctionCall& fc ) { - - time = fc.time; - token = fc.token; - - kvlist = OTF_KeyValueList_new(); - - OTF_KeyValueList_appendKeyValueList( kvlist, fc.kvlist ); - -} - -FunctionCall::~FunctionCall() { - - OTF_KeyValueList_close( kvlist ); - -} - -FunctionCall FunctionCall::operator=( const FunctionCall& fc ) { - - if( this == &fc ) - return *this; - - time = fc.time; - token = fc.token; - - OTF_KeyValueList_reset( kvlist ); - - OTF_KeyValueList_appendKeyValueList( kvlist, fc.kvlist ); - - return *this; - -} - - -Send::Send( uint64_t _originaltime, uint32_t _receiver, uint32_t _procGroup, - uint32_t _tag, uint32_t _length, uint32_t _source, OTF_KeyValueList *_kvlist ) { - - originaltime = _originaltime; - receiver = _receiver; - procGroup = _procGroup; - tag = _tag; - length = _length; - source = _source; - - kvlist = OTF_KeyValueList_new(); - - OTF_KeyValueList_appendKeyValueList( kvlist, _kvlist ); - -} - -Send::Send( const Send& s ) { - - originaltime = s.originaltime; - receiver = s.receiver; - procGroup = s.procGroup; - tag = s.tag; - length = s.length; - source = s.source; - - kvlist = OTF_KeyValueList_new(); - - OTF_KeyValueList_appendKeyValueList( kvlist, s.kvlist ); - -} - -Send::~Send() { - - OTF_KeyValueList_close( kvlist ); - -} - -Send Send::operator=( const Send& s ) { - - if( this == &s ) - return *this; - - originaltime = s.originaltime; - receiver = s.receiver; - procGroup = s.procGroup; - tag = s.tag; - length = s.length; - source = s.source; - - OTF_KeyValueList_reset( kvlist ); - - OTF_KeyValueList_appendKeyValueList( kvlist, s.kvlist ); - - return *this; - -} - - -BeginCollOperation::BeginCollOperation( uint64_t _time, uint32_t _root, uint32_t _procGroup, - uint32_t _col, uint32_t _type, uint64_t _invoc_sent, uint64_t _invoc_recv, uint64_t _bytesSent, - uint64_t _bytesRecv, uint32_t _scltoken, OTF_KeyValueList *_kvlist ) { - - time = _time; - root = _root; - procGroup = _procGroup; - col = _col; - type = _type; - invoc_sent = _invoc_sent; - invoc_recv = _invoc_recv; - bytesSent = _bytesSent; - bytesRecv = _bytesRecv; - scltoken = _scltoken; - - kvlist = OTF_KeyValueList_new(); - - OTF_KeyValueList_appendKeyValueList( kvlist, _kvlist ); - -} - -BeginCollOperation::BeginCollOperation( const BeginCollOperation& cop ) { - - time = cop.time; - root = cop.root; - procGroup = cop.procGroup; - col = cop.col; - type = cop.type; - invoc_sent = cop.invoc_sent; - invoc_recv = cop.invoc_recv; - bytesSent = cop.bytesSent; - bytesRecv = cop.bytesRecv; - scltoken = cop.scltoken; - - kvlist = OTF_KeyValueList_new(); - - OTF_KeyValueList_appendKeyValueList( kvlist, cop.kvlist ); - -} - -BeginCollOperation::~BeginCollOperation() { - - OTF_KeyValueList_close( kvlist ); - -} - -BeginCollOperation BeginCollOperation::operator=( const BeginCollOperation& cop ) { - - if( this == &cop ) - return *this; - - time = cop.time; - root = cop.root; - procGroup = cop.procGroup; - col = cop.col; - type = cop.type; - invoc_sent = cop.invoc_sent; - invoc_recv = cop.invoc_recv; - bytesSent = cop.bytesSent; - bytesRecv = cop.bytesRecv; - scltoken = cop.scltoken; - - OTF_KeyValueList_reset( kvlist ); - - OTF_KeyValueList_appendKeyValueList( kvlist, cop.kvlist ); - - return *this; - -} - - -BeginFileOperation::BeginFileOperation( uint64_t _time, uint32_t _scltoken, OTF_KeyValueList *_kvlist ) { - - time = _time; - scltoken = _scltoken; - - kvlist = OTF_KeyValueList_new(); - - OTF_KeyValueList_appendKeyValueList( kvlist, _kvlist ); - -} - -BeginFileOperation::BeginFileOperation( const BeginFileOperation& fop ) { - - time = fop.time; - scltoken = fop.scltoken; - - kvlist = OTF_KeyValueList_new(); - - OTF_KeyValueList_appendKeyValueList( kvlist, fop.kvlist ); -} - -BeginFileOperation::~BeginFileOperation() { - - OTF_KeyValueList_close( kvlist ); - -} - -BeginFileOperation BeginFileOperation::operator=( const BeginFileOperation& fop ) { - - if( this == &fop ) - return *this; - - time = fop.time; - scltoken = fop.scltoken; - - OTF_KeyValueList_reset( kvlist ); - - OTF_KeyValueList_appendKeyValueList( kvlist, fop.kvlist ); - - return *this; - -} - - -FileOpen::FileOpen( uint64_t _time, uint32_t _fileid, uint32_t _source, OTF_KeyValueList *_kvlist ) { - - time = _time; - fileid = _fileid; - source = _source; - - kvlist = OTF_KeyValueList_new(); - - OTF_KeyValueList_appendKeyValueList( kvlist, _kvlist ); - -} - -FileOpen::FileOpen( const FileOpen& fo ) { - - time = fo.time; - fileid = fo.fileid; - source = fo.source; - - kvlist = OTF_KeyValueList_new(); - - OTF_KeyValueList_appendKeyValueList( kvlist, fo.kvlist ); - -} - -FileOpen::~FileOpen() { - - OTF_KeyValueList_close( kvlist ); - -} - -FileOpen FileOpen::operator=( const FileOpen& fo ) { - - if( this == &fo ) - return *this; - - time = fo.time; - fileid = fo.fileid; - source = fo.source; - - OTF_KeyValueList_reset( kvlist ); - - OTF_KeyValueList_appendKeyValueList( kvlist, fo.kvlist ); - - return *this; - -} - - -/* *** ProcessState *** ********************************* */ - - -void ProcessState::enterFunction( uint64_t time, uint32_t token, OTF_KeyValueList *kvlist ) { - - - - fstack.push_back( FunctionCall( time, token, kvlist ) ); - - FunctionStatistics& stat= fstatistics[ token ]; - stat.occurrences++; -} - - -void ProcessState::leaveFunction( uint64_t time, uint32_t token ) { - - - assert( ! fstack.empty() ); - - const FunctionCall& call= fstack.back(); - - /* if not special token 0 tokens must match */ - if ( ( 0 != token ) && ( call.token != token ) ) { - - cerr << " leave at " << time << " with corrupt stack " << - call.token << " != " << token << endl; - } - - /* update stack */ - fstack.pop_back(); - - /* update statistics */ - FunctionStatistics& stat= fstatistics[ call.token ]; - - stat.exclusiveTime += time - call.time; - stat.inclusiveTime += time - call.time; - - /* subtract time from parents 'exclusiveTime' */ - if ( ! fstack.empty() ) { - - const FunctionCall& parent= fstack.back(); - - FunctionStatistics& parentstat= fstatistics[ parent.token ]; - - parentstat.exclusiveTime -= time - call.time; - } -} - -void ProcessState::collOperation( uint64_t time, uint32_t col, uint32_t type, uint32_t numSent, - uint32_t numRecv, uint32_t bytesSent, uint32_t bytesRecv ) { - - CollOps.numSent[type] += numSent; - CollOps.numRecv[type] += numRecv; - CollOps.bytesSent[type] += bytesSent; - CollOps.bytesRecv[type] += bytesRecv; - CollOps.Type2Col[type] = col; -} - -int ProcessState::beginCollOperation( uint64_t time, uint32_t root, uint32_t procGroup, - uint32_t col, uint32_t type, uint64_t matchingId, uint64_t invoc_sent, - uint64_t invoc_recv, uint64_t bytesSent, uint64_t bytesRecv, uint32_t scltoken, - OTF_KeyValueList *kvlist ) { - - - std::map<uint64_t, BeginCollOperation>::iterator it; - - it = beginCollOps.find( matchingId ); - - if( it != beginCollOps.end() ) { - -# ifdef OTF_VERBOSE - fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "MatchingId %llu has already been used. aborting\n", - __FUNCTION__, __FILE__, __LINE__, (long long unsigned) matchingId ); -# endif - - return OTF_RETURN_ABORT; - - } - - /* insert the record into the list of begun collective operations */ - beginCollOps.insert( pair<uint64_t,BeginCollOperation>( matchingId, - BeginCollOperation( time, root, procGroup, col, type, invoc_sent, - invoc_recv, bytesSent, bytesRecv, scltoken, kvlist ) ) ); - - - return OTF_RETURN_OK; - -} - -int ProcessState::endCollOperation( uint64_t time, uint32_t matchingId ) { - - std::map<uint64_t, BeginCollOperation>::iterator it; - - it = beginCollOps.find( matchingId ); - - if( it == beginCollOps.end() ) { - -# ifdef OTF_VERBOSE - fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "MatchingId %llu was not found. aborting\n", - __FUNCTION__, __FILE__, __LINE__, (long long unsigned) matchingId ); -# endif - - return OTF_RETURN_ABORT; - - } - - collOperation( time /*?*/, it->second.col, it->second.type, it->second.invoc_sent, - it->second.invoc_recv, it->second.bytesSent, it->second.bytesRecv ); - - beginCollOps.erase( it ); - - return OTF_RETURN_OK; - -} - -int ProcessState::beginFileOperation( uint64_t time, uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *kvlist ) { - - std::map<uint64_t, BeginFileOperation>::iterator it; - - it = beginFileOps.find( matchingId ); - - if( it != beginFileOps.end() ) { - -# ifdef OTF_VERBOSE - fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Handleid %llu has already been used. aborting\n", - __FUNCTION__, __FILE__, __LINE__, (long long unsigned) matchingId ); -# endif - - return OTF_RETURN_ABORT; - - } - - /* insert the record into the list of unfinished file operations */ - beginFileOps.insert( pair<uint64_t, BeginFileOperation>( matchingId, BeginFileOperation( time, scltoken, kvlist ) ) ); - - return OTF_RETURN_OK; - -} - -int ProcessState::endFileOperation( uint64_t matchingId ) { - - - std::map<uint64_t, BeginFileOperation>::iterator it; - - it = beginFileOps.find( matchingId ); - - if( it == beginFileOps.end() ) { - -# ifdef OTF_VERBOSE - fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Handleid %llu was not found. aborting\n", - __FUNCTION__, __FILE__, __LINE__, (long long unsigned) matchingId ); -# endif - - return OTF_RETURN_ABORT; - - } - - beginFileOps.erase( it ); - - return OTF_RETURN_OK; - -} - - -void ProcessState::sendMessage( uint64_t time, uint32_t receiver, - uint32_t procGroup, uint32_t tag, uint32_t msglength, uint32_t source, - OTF_KeyValueList *kvlist ) { - - - sstatistics.bytes_sent+= msglength; - sstatistics.number_sent++; - - - - sstack.push_back( Send( time, receiver, procGroup, tag, msglength, source, kvlist ) ); -} - - -void ProcessState::recvMessage( uint32_t msglength ) { - - sstatistics.bytes_recvd+= (uint64_t) msglength; - sstatistics.number_recvd++; -} - - -void ProcessState::matchMessage( uint32_t receiver, uint32_t procGroup, uint32_t tag ) { - - - deque<Send>::iterator jt= sstack.begin(); - deque<Send>::iterator jtend= sstack.end(); - - for ( ; jt != jtend; ++jt ) { - - if (jt->receiver == receiver - && procGroup == jt->procGroup - && tag == jt->tag ) { - - sstack.erase( jt ); - break; - } - } -} - - -int ProcessState::openFile( uint64_t time, uint32_t fileid, uint64_t handleid, - uint32_t source, OTF_KeyValueList *kvlist ) { - - - std::map<uint64_t, FileOpen>::iterator it; - - it= openfiles.find( handleid ); - - if( it == openfiles.end() ) { - - /* insert the file into the list of opened files */ - openfiles.insert( pair<uint64_t,FileOpen>( handleid, - FileOpen( time, fileid, source, kvlist ) ) ); - - - /* make the statistics */ - map<uint32_t,FileOperationStatistics>::iterator it2; - - it2= fostatistics.find( fileid ); - - if( it2 != fostatistics.end() ) { - - FileOperationStatistics& fos= it2->second; - - ++fos.nopen; - - } else { - - fostatistics.insert( pair<uint32_t, FileOperationStatistics> ( fileid, - FileOperationStatistics( 1, 0, 0, 0, 0, 0, 0 ) ) ); - - } - - return OTF_RETURN_OK; - - } else { - -# ifdef OTF_VERBOSE - fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Handleid %llu has already been used. aborting\n", - __FUNCTION__, __FILE__, __LINE__, (long long unsigned) handleid ); -# endif - - return OTF_RETURN_ABORT; - } -} - - -int ProcessState::closeFile( uint64_t handleid ) { - - - uint32_t ret; - map<uint64_t/*handleid*/, FileOpen>::iterator it; - - it= openfiles.find( handleid ); - - - if( it == openfiles.end() ) { - -# ifdef OTF_VERBOSE - fprintf( stderr, "WARNING in function %s, file: %s, line: %i:\n " - "Trying to close a file that is not open with handle %llu. " - "This might be caused by a VT error, please check! Ignore this for now.\n", - __FUNCTION__, __FILE__, __LINE__, (long long unsigned) handleid ); -# endif - - /* make it a warning that cannot be disabled because I suspect an error in VT ! */ - /* return OTF_RETURN_ABORT; */ - return OTF_RETURN_OK; - } - - - - /* make the statistics */ - map<uint32_t,FileOperationStatistics>::iterator it2; - - it2= fostatistics.find( it->second.fileid ); - - if( it2 != fostatistics.end() ) { - - FileOperationStatistics& fos= it2->second; - - ++fos.nclose; - - ret= OTF_RETURN_OK; - - } else { - -# ifdef OTF_VERBOSE - fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Trying to close not yet opened file. aborting\n", - __FUNCTION__, __FILE__, __LINE__ ); -# endif - - ret= OTF_RETURN_ABORT; - } - - /* erase the file from the opened files list */ - openfiles.erase( it ); - - return ret; -} - - -int ProcessState::writeFile( uint32_t fileid, uint64_t bytes ) { - - - map<uint32_t,FileOperationStatistics>::iterator it; - - it= fostatistics.find( fileid ); - - if( it != fostatistics.end() ) { - - FileOperationStatistics& fos= it->second; - - ++fos.nwrite; - fos.byteswrite+= bytes; - - } else { - - fostatistics.insert( pair<uint32_t, FileOperationStatistics> ( fileid, - FileOperationStatistics( 0, 0, 0, 1, 0, 0, bytes ) ) ); - - } - - return OTF_RETURN_OK; -} - - -int ProcessState::readFile( uint32_t fileid, uint64_t bytes ) { - - - map<uint32_t,FileOperationStatistics>::iterator it; - - it= fostatistics.find( fileid ); - - if( it != fostatistics.end() ) { - - FileOperationStatistics& fos= it->second; - - ++fos.nread; - fos.bytesread+= bytes; - - } else { - - fostatistics.insert( pair<uint32_t, FileOperationStatistics> ( fileid, - FileOperationStatistics( 0, 0, 1, 0, 0, bytes, 0 ) ) ); - - } - - return OTF_RETURN_OK; -} - - -int ProcessState::seekFile( uint32_t fileid, uint64_t bytes ) { - map<uint32_t,FileOperationStatistics>::iterator it; - - it= fostatistics.find( fileid ); - - if( it != fostatistics.end() ) { - - FileOperationStatistics& fos= it->second; - - ++fos.nseek; - - return OTF_RETURN_OK; - - } else { - -# ifdef OTF_VERBOSE - fprintf( stderr, "ERROR in function %s, file: %s, line: %i:\n " - "Trying to seek in a not yet opened file. aborting\n", - __FUNCTION__, __FILE__, __LINE__ ); -# endif - - return OTF_RETURN_ABORT; - } -} - - -void ProcessState::printStack( uint32_t processid ) const { - - - cerr << " stack of process " << processid << endl; - - deque<FunctionCall>::const_iterator it= fstack.begin(); - deque<FunctionCall>::const_iterator itend= fstack.end(); - for ( ; it != itend; ++it ) { - - cerr << " " << it->time << ": " << it->token << endl; - } -} - - -void ProcessState::printSends( uint32_t processid ) const { - - - cerr << " pending sends on process " << processid << endl; - - deque<Send>::const_iterator it= sstack.begin(); - deque<Send>::const_iterator itend= sstack.end(); - - for ( ; it != itend; ++it ) { - - cerr << " " << "otime: " << it->originaltime << " recver: " << it->receiver << - " group: " << it->procGroup << " tag: " << it->tag << " source: " << - it->source << endl; - } -} - - -void ProcessState::printOpenFiles( uint32_t processid ) const { - - - cerr << " opened files on process " << processid << endl; - - map<uint64_t/*handleid*/, FileOpen>::const_iterator it; - map<uint64_t/*handleid*/, FileOpen>::const_iterator itend= openfiles.end(); - - - for( it= openfiles.begin(); it != itend; ++it ) { - - cerr << " " << "time " << it->second.time << " handleid " << it->first << " fileid " - << it->second.fileid << " source " << it->second.source << endl; - - } -} - - -void ProcessState::printStatistics( uint32_t processid, uint64_t time, - map< uint32_t, uint32_t> *functiongroups, - map< uint32_t, uint32_t> *filegroups ) const { - - - map<uint32_t,FunctionStatistics> localStatistics; - map<uint32_t,FunctionStatistics> groupStatistics; - - uint64_t lasttime= time; - - deque<FunctionCall>::const_reverse_iterator it= fstack.rbegin(); - deque<FunctionCall>::const_reverse_iterator itend= fstack.rend(); - for ( ; it != itend; ++it ) { - - FunctionStatistics& lstats= localStatistics[ it->token ]; - /* lstats.occurrences++; */ - lstats.exclusiveTime += lasttime - it->time; - lstats.inclusiveTime += time - it->time; - - assert( lasttime >= it->time ); - - lasttime= it->time; - } - - - /* actually write statistics */ - cerr << " statistics of process " << processid << endl; - - map<uint32_t,FunctionStatistics>::const_iterator jt= fstatistics.begin(); - map<uint32_t,FunctionStatistics>::const_iterator jtend= fstatistics.end(); - - for ( ; jt != jtend; ++jt ) { - - uint64_t oc= jt->second.occurrences; - uint64_t ex= jt->second.exclusiveTime; - uint64_t in= jt->second.inclusiveTime; - - map<uint32_t,FunctionStatistics>::const_iterator kt= localStatistics.find( jt->first ); - map<uint32_t,FunctionStatistics>::const_iterator ktend= localStatistics.end(); - - if ( kt != ktend ) { - - oc += kt->second.occurrences; - ex += kt->second.exclusiveTime; - in += kt->second.inclusiveTime; - } - - if ( NULL == functiongroups ) { - - cerr << " func " << jt->first << ": " << - oc << ", " << - ex << ", " << - in << ", " << endl; - - } else { - - groupStatistics[(*functiongroups)[jt->first]].occurrences+= oc; - groupStatistics[(*functiongroups)[jt->first]].exclusiveTime+= ex; - groupStatistics[(*functiongroups)[jt->first]].inclusiveTime+= in; - } - } - - /* write functiongroup summary */ - if ( NULL != functiongroups ) { - - map<uint32_t,FunctionStatistics>::const_iterator kt= groupStatistics.begin(); - map<uint32_t,FunctionStatistics>::const_iterator ktend= groupStatistics.end(); - - for( ; kt != ktend; kt++ ) { - - uint64_t oc= kt->second.occurrences; - uint64_t ex= kt->second.exclusiveTime; - uint64_t in= kt->second.inclusiveTime; - - cerr << " funcgroup" << kt->first << ": " << - oc << ", " << - ex << ", " << - in << ", " << endl; - } - } - - /* write the message summary if any message was sent */ - cerr << " " << sstatistics.number_sent << " messages sent, " << sstatistics.number_recvd - << " messages received, " << sstatistics.bytes_sent << - " sent bytes, " << sstatistics.bytes_recvd << " bytes received" << endl; - - - /* write file operation statistics */ - map<uint32_t,FileOperationStatistics>::const_iterator itfo; - map<uint32_t,FileOperationStatistics>::const_iterator itendfo= fostatistics.end(); - - if( NULL == filegroups ) { - - /* print out alle statistics */ - for( itfo= fostatistics.begin(); itfo != itendfo; ++itfo ) { - - const FileOperationStatistics& fost= itfo->second; - - cerr << " file " << itfo->first << ": " << fost.nopen << " opened files, " - << fost.nclose << " closed files, " << fost.nread << " read events, " - << fost.nwrite << " write events, " << fost.nseek << " seek events, " - << fost.bytesread << " read bytes, " << fost.byteswrite << " written bytes " - << endl; - } - - } else { - - map<uint32_t/*groupid*/,FileOperationStatistics> groupstats; - map<uint32_t/*groupid*/,FileOperationStatistics>::iterator itgr; - map<uint32_t/*groupid*/,FileOperationStatistics>::iterator itendgr; - - /* calculate group statistics */ - for( itfo= fostatistics.begin(); itfo != itendfo; ++itfo ) { - - itgr= groupstats.find( (*filegroups)[itfo->first] ); - - if( itgr != groupstats.end() ) { - - FileOperationStatistics& fost= itgr->second; - - fost.nopen+= itfo->second.nopen; - fost.nclose+= itfo->second.nclose; - fost.nread+= itfo->second.nread; - fost.nwrite+= itfo->second.nwrite; - fost.nseek+= itfo->second.nseek; - fost.bytesread+= itfo->second.bytesread; - fost.byteswrite+= itfo->second.byteswrite; - - } else { - - groupstats.insert( pair<uint32_t,FileOperationStatistics>( - (*filegroups)[itfo->first], - FileOperationStatistics( itfo->second.nopen, itfo->second.nclose, - itfo->second.nread, itfo->second.nwrite, itfo->second.nseek, - itfo->second.bytesread, itfo->second.byteswrite ) ) ); - - } - } - - - /* print out all group statistics */ - for( itgr= groupstats.begin(), itendgr= groupstats.end(); itgr != itendgr; ++itgr ) { - - const FileOperationStatistics& fost= itgr->second; - - cerr << " filegroup " << itgr->first << ": " << fost.nopen << " opened files, " - << fost.nclose << " closed files, " << fost.nread << " read events, " - << fost.nwrite << " write events, " << fost.nseek << " seek events, " - << fost.bytesread << " read bytes, " << fost.byteswrite << " written bytes " - << endl; - } - } -} - - -void ProcessState::writeStack( OTF_Writer* writer, uint64_t time, uint32_t processid ) const { - - - if ( fstack.empty() ) { - - OTF_Writer_writeSnapshotComment( writer, - time, processid, "empty stack" ); - return; - } - - OTF_KeyValueList *kvlist = OTF_KeyValueList_new(); - - deque<FunctionCall>::const_iterator jt= fstack.begin(); - deque<FunctionCall>::const_iterator jtend= fstack.end(); - - for ( ; jt != jtend; ++jt ) { - - /* make a copy of the key-value list to keep the data */ - OTF_KeyValueList_appendKeyValueList( kvlist, jt->kvlist ); - - /* this will reset the key-value list */ - OTF_Writer_writeEnterSnapshotKV( writer, time, - jt->time /* uint64_t originaltime */, - jt->token /* uint32_t function */, - processid /* uint32_t process */, - 0 /* uint32_t source */, - kvlist /* key-value list */ ); - } - - OTF_KeyValueList_close( kvlist ); -} - - -void ProcessState::writeStatistics( OTF_Writer* writer, uint64_t time, - uint32_t processid, map< uint32_t,uint32_t> *functiongroups, - map< uint32_t,uint32_t> *filegroups ) const { - - - /* all past function calls are considered in 'fstatistics' already, - now the time and occurrences of all active functions need to be added. - one could modify & restore the 'fstatistics' but this seems unsafe. - furthermore, this is a 'const' method. therfore we use a temporary - data structure even though it is kind of overkill :( */ - - map<uint32_t,FunctionStatistics> localStatistics; - map<uint32_t,FunctionStatistics> groupStatistics; - - uint64_t lasttime= time; - - - /* cerr << "writeStatistics p" << processid << ", t" << time << endl; */ - - - deque<FunctionCall>::const_reverse_iterator it= fstack.rbegin(); - deque<FunctionCall>::const_reverse_iterator itend= fstack.rend(); - for ( ; it != itend; ++it ) { - - FunctionStatistics& lstats= localStatistics[ it->token ]; - /* lstats.occurrences++; */ - lstats.exclusiveTime += lasttime - it->time; - lstats.inclusiveTime += time - it->time; - - assert( lasttime >= it->time ); - - lasttime= it->time; - } - - - /* actually write statistics */ - - map<uint32_t,FunctionStatistics>::const_iterator jt= fstatistics.begin(); - map<uint32_t,FunctionStatistics>::const_iterator jtend= fstatistics.end(); - - for ( ; jt != jtend; ++jt ) { - - uint64_t oc= jt->second.occurrences; - uint64_t ex= jt->second.exclusiveTime; - uint64_t in= jt->second.inclusiveTime; - - map<uint32_t,FunctionStatistics>::const_iterator kt= localStatistics.find( jt->first ); - map<uint32_t,FunctionStatistics>::const_iterator ktend= localStatistics.end(); - - if ( kt != ktend ) { - - oc += kt->second.occurrences; - ex += kt->second.exclusiveTime; - in += kt->second.inclusiveTime; - } - - if ( NULL == functiongroups ) { - - OTF_Writer_writeFunctionSummary( writer, - time /* uint64_t time */, - jt->first /* uint32_t function */, - processid /* uint32_t process */, - oc /* uint64_t count */, - ex /* uint64_t excltime */, - in /* uint64_t incltime */ ); - - } else { - - groupStatistics[(*functiongroups)[jt->first]].occurrences+= oc; - groupStatistics[(*functiongroups)[jt->first]].exclusiveTime+= ex; - groupStatistics[(*functiongroups)[jt->first]].inclusiveTime+= in; - } - - } - - /* write functiongroup summary */ - if ( NULL != functiongroups ) { - - map<uint32_t,FunctionStatistics>::const_iterator kt= groupStatistics.begin(); - map<uint32_t,FunctionStatistics>::const_iterator ktend= groupStatistics.end(); - - for( ; kt != ktend; kt++ ) { - - uint64_t oc= kt->second.occurrences; - uint64_t ex= kt->second.exclusiveTime; - uint64_t in= kt->second.inclusiveTime; - - OTF_Writer_writeFunctionGroupSummary( writer, - time /* uint64_t time */, - kt->first /* uint32_t functiongroup */, - processid /* uint32_t process */, - oc /* uint64_t count */, - ex /* uint64_t excltime */, - in /* uint64_t incltime */ ); - } - } - - /* write the message summary if any message was sent */ - - if ( sstatistics.number_sent > 0 || sstatistics.number_recvd > 0) { - - OTF_Writer_writeMessageSummary( writer, time /* current time */, - processid /* id of the process */, 0 /* peer */, 0 /* communicator */, - 0 /* message tag */, sstatistics.number_sent, sstatistics.number_recvd, - sstatistics.bytes_sent, sstatistics.bytes_recvd ); - } - - /* write the collop summary */ - map<uint32_t,uint32_t>::iterator Iter; - - for(Iter=CollOps.Type2Col.begin(); Iter!=CollOps.Type2Col.end(); ++Iter) { - OTF_Writer_writeCollopSummary(writer,time,processid,0,Iter->second,CollOps.numSent[Iter->first], - CollOps.numRecv[Iter->first],CollOps.bytesSent[Iter->first],CollOps.bytesRecv[Iter->first]); - } - - /* write file operation statistics */ - map<uint32_t,FileOperationStatistics>::const_iterator itfo; - map<uint32_t,FileOperationStatistics>::const_iterator itendfo= fostatistics.end(); - - if( NULL == filegroups ) { - - /* print out alle statistics */ - for( itfo= fostatistics.begin(); itfo != itendfo; ++itfo ) { - - const FileOperationStatistics& fost= itfo->second; - - OTF_Writer_writeFileOperationSummary( writer, time, itfo->first, - processid, fost.nopen, fost.nclose, fost.nread, fost.nwrite, - fost.nseek, fost.bytesread, fost.byteswrite ); - } - - } else { - - map<uint32_t/*groupid*/,FileOperationStatistics> groupstats; - map<uint32_t/*groupid*/,FileOperationStatistics>::iterator itgr; - map<uint32_t/*groupid*/,FileOperationStatistics>::iterator itendgr; - - /* calculate group statistics */ - for( itfo= fostatistics.begin(); itfo != itendfo; ++itfo ) { - - itgr= groupstats.find( (*filegroups)[itfo->first] ); - - if( itgr != groupstats.end() ) { - - FileOperationStatistics& fost= itgr->second; - - fost.nopen+= itfo->second.nopen; - fost.nclose+= itfo->second.nclose; - fost.nread+= itfo->second.nread; - fost.nwrite+= itfo->second.nwrite; - fost.nseek+= itfo->second.nseek; - fost.bytesread+= itfo->second.bytesread; - fost.byteswrite+= itfo->second.byteswrite; - - } else { - - groupstats.insert( pair<uint32_t,FileOperationStatistics>( - (*filegroups)[itfo->first], - FileOperationStatistics( itfo->second.nopen, itfo->second.nclose, - itfo->second.nread, itfo->second.nwrite, itfo->second.nseek, - itfo->second.bytesread, itfo->second.byteswrite ) ) ); - - } - } - - - /* print out all group statistics */ - for( itgr= groupstats.begin(), itendgr= groupstats.end(); itgr != itendgr; ++itgr ) { - - const FileOperationStatistics& fost= itgr->second; - - OTF_Writer_writeFileGroupOperationSummary( writer, time, - itgr->first, processid, fost.nopen, fost.nclose, fost.nread, - fost.nwrite, fost.nseek, fost.bytesread, fost.byteswrite ); - } - } -} - - -void ProcessState::writeSends( OTF_Writer* writer, uint64_t time, - uint32_t processid ) const { - - - /* - if ( sstack.empty() ) { - - OTF_Writer_writeSnapshotComment( writer, - time, processid, "no msgs" ); - - return; - } - */ - - OTF_KeyValueList *kvlist = OTF_KeyValueList_new(); - - deque<Send>::const_iterator jt= sstack.begin(); - deque<Send>::const_iterator jtend= sstack.end(); - - for ( ; jt != jtend; ++jt ) { - - /* make a copy of the key-value list to keep the data */ - OTF_KeyValueList_appendKeyValueList( kvlist, jt->kvlist ); - - /* this will reset the key-value list */ - OTF_Writer_writeSendSnapshotKV( writer, - time, /* current time */ - jt->originaltime /* uint64_t originaltime */, - processid /* sender */, - jt->receiver /* receiver */, - jt->procGroup /* proc group */, - jt->tag /* message tag */, - jt->length /* message length */, - jt->source /* source code location */, - kvlist /* key-value list */ ); - - } - - OTF_KeyValueList_close( kvlist ); -} - - -void ProcessState::writeOpenFiles( OTF_Writer* writer, uint64_t time, - uint32_t processid ) const { - - - /* - if( openfiles.empty() ) { - - OTF_Writer_writeSnapshotComment( writer, - time, processid, "no openfiles" ); - - return; - } - */ - - OTF_KeyValueList *kvlist = OTF_KeyValueList_new(); - - map<uint64_t, FileOpen>::const_iterator it; - map<uint64_t, FileOpen>::const_iterator itend= openfiles.end(); - - - for( it= openfiles.begin(); it != itend; ++it ) { - - /* make a copy of the key-value list to keep the data */ - OTF_KeyValueList_appendKeyValueList( kvlist, it->second.kvlist ); - - /* this will reset the key-value list */ - OTF_Writer_writeOpenFileSnapshotKV( writer, - time, - it->second.time, - it->second.fileid, - processid, - it->first, - it->second.source, - kvlist ); - } - - OTF_KeyValueList_close( kvlist ); -} - -void ProcessState::writeCollOps( OTF_Writer* writer, uint64_t time, - uint32_t processid ) const { - - - OTF_KeyValueList *kvlist = OTF_KeyValueList_new(); - map<uint64_t, BeginCollOperation>::const_iterator it; - - - for ( it = beginCollOps.begin(); it != beginCollOps.end(); ++it ) { - - /* make a copy of the key-value list to keep the data */ - OTF_KeyValueList_appendKeyValueList( kvlist, it->second.kvlist ); - - /* this will reset the key-value list */ - OTF_Writer_writeBeginCollopSnapshotKV( writer, - time, /* current time */ - it->second.time, /* originaltime */ - processid, /* process */ - it->second.col, - it->first, /* matchingId */ - it->second.procGroup, - it->second.root, - it->second.bytesSent, - it->second.bytesRecv, - it->second.scltoken, - kvlist ); - - } - - OTF_KeyValueList_close( kvlist ); - -} - -void ProcessState::writeFileOps( OTF_Writer* writer, uint64_t time, - uint32_t processid ) const { - - - OTF_KeyValueList *kvlist = OTF_KeyValueList_new(); - map<uint64_t, BeginFileOperation>::const_iterator it; - - - for ( it = beginFileOps.begin(); it != beginFileOps.end(); ++it ) { - - /* make a copy of the key-value list to keep the data */ - OTF_KeyValueList_appendKeyValueList( kvlist, it->second.kvlist ); - - /* this will reset the key-value list */ - OTF_Writer_writeBeginFileOpSnapshotKV( writer, - time, - it->second.time, - processid, - it->first, - it->second.scltoken, - kvlist ); - - } - - OTF_KeyValueList_close( kvlist ); - -} - -void State::defProcess( uint32_t processid ) { - - - /* explicit creation is not necessary. - it would furthermore disturbs selective creation of statistics - - processes[ processid ]; - */ -} - - -void State::defFunction( uint32_t function, uint32_t group ) { - - - functiongroups[function]= group; -} - - -void State::defFile( uint32_t fileid, uint32_t group ) { - - - filegroups[fileid]= group; -} - -void State::defCollOp( uint32_t col, uint32_t type) { - - Col2Type[col] = type; -} - -void State::enterFunction( uint64_t time, uint32_t processid, uint32_t token, OTF_KeyValueList *kvlist ) { - - - /* cerr << " " << time << " enter " << token << " on " << processid << endl; */ - - processes[ processid ].enterFunction( time, token, kvlist ); - -} - - -void State::leaveFunction( uint64_t time, uint32_t processid, uint32_t token ) { - - - /* cerr << " " << time << " leave " << token << " on " << processid << endl; */ - - processes[ processid ].leaveFunction( time, token ); - -} - - -void State::sendMessage( uint64_t time, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t tag, uint32_t length, uint32_t source, - OTF_KeyValueList *kvlist ) { - - - processes[ sender ].sendMessage( time, receiver, procGroup, tag, length, source, kvlist ); -} - - -void State::recvMessage( uint32_t sender, uint32_t receiver, uint32_t procGroup, - uint32_t tag, uint32_t msglength ) { - - - processes[ receiver ].recvMessage( msglength ); - - - /* only touch other process if 'doSnapshots' is set to true */ - if ( doSnapshots ) { - - processes[ sender ].matchMessage( receiver, procGroup, tag ); - } -} - - -void State::collOperation( uint64_t time, uint32_t proc, uint32_t root, uint32_t col, - uint32_t bytesSent, uint32_t bytesRecv ) { - - uint32_t invoc_sent = 0; - uint32_t invoc_recv = 0; - - switch (Col2Type[col]) - { - case OTF_COLLECTIVE_TYPE_ALL2ONE: - if(proc == root) { - invoc_sent = 1; - invoc_recv = 1; - } else { - invoc_sent = 1; - } - break; - case OTF_COLLECTIVE_TYPE_ONE2ALL: - if(proc == root) { - invoc_sent = 1; - invoc_recv = 1; - } else { - invoc_recv = 1; - } - break; - case OTF_COLLECTIVE_TYPE_ALL2ALL: - invoc_sent = 1; - invoc_recv = 1; - break; - case OTF_COLLECTIVE_TYPE_BARRIER: - invoc_sent = 1; - break; - } - - processes[proc].collOperation( time, col, Col2Type[col], invoc_sent, invoc_recv, bytesSent, bytesRecv ); -} - - -int State::fileOperation( uint64_t time, uint32_t fileid, uint32_t process, - uint64_t handleid, uint32_t operation, uint64_t bytes, uint64_t duration, - uint32_t source, OTF_KeyValueList *kvlist ) { - - switch( operation & OTF_FILEOP_BITS ) { - - case OTF_FILEOP_OPEN: - return processes[ process ].openFile( time, fileid, handleid, source, kvlist ); - case OTF_FILEOP_CLOSE: - return processes[ process ].closeFile( handleid ); - case OTF_FILEOP_READ: - return processes[ process ].readFile( fileid, bytes ); - case OTF_FILEOP_WRITE: - return processes[ process ].writeFile( fileid, bytes ); - case OTF_FILEOP_SEEK: - return processes[ process ].seekFile( fileid, bytes ); - } - - return OTF_RETURN_OK; -} - -int State::beginCollOperation( uint64_t time, uint32_t proc, uint32_t root, uint32_t procGroup, - uint32_t col, uint64_t matchingId, uint64_t bytesSent, uint64_t bytesRecv, uint32_t scltoken, - OTF_KeyValueList *kvlist ) { - - - uint64_t invoc_sent = 0; - uint64_t invoc_recv = 0; - - switch (Col2Type[col]) - { - case OTF_COLLECTIVE_TYPE_ALL2ONE: - - if(proc == root) { - invoc_sent = 1; - invoc_recv = 1; - } else { - invoc_sent = 1; - } - break; - - case OTF_COLLECTIVE_TYPE_ONE2ALL: - - if(proc == root) { - invoc_sent = 1; - invoc_recv = 1; - } else { - invoc_recv = 1; - } - break; - - case OTF_COLLECTIVE_TYPE_ALL2ALL: - - invoc_sent = 1; - invoc_recv = 1; - break; - - case OTF_COLLECTIVE_TYPE_BARRIER: - - invoc_sent = 1; - break; - } - - return processes[proc].beginCollOperation( time, root, procGroup, col, Col2Type[col], matchingId, invoc_sent, - invoc_recv, bytesSent, bytesRecv, scltoken, kvlist ); - -} - - int State::endCollOperation( uint64_t time, uint32_t proc, uint64_t matchingId ) { - - - return processes[proc].endCollOperation( time, matchingId ); - - } - - int State::beginFileOperation( uint64_t time, uint32_t process, uint64_t matchingId, - uint32_t scltoken, OTF_KeyValueList *kvlist ) { - - - return processes[process].beginFileOperation( time, matchingId, scltoken, kvlist ); - } - - - int State::endFileOperation( uint64_t time, uint32_t process, uint32_t fileid, - uint64_t matchingId, uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList *kvlist ) { - - int ret; - - ret = processes[process].endFileOperation( matchingId ); - - if( ret == OTF_RETURN_ABORT ) { - return ret; - } - - switch( operation & OTF_FILEOP_BITS ) { - - case OTF_FILEOP_OPEN: - return processes[ process ].openFile( time, fileid, handleId, scltoken, kvlist ); - case OTF_FILEOP_CLOSE: - return processes[ process ].closeFile( handleId ); - case OTF_FILEOP_READ: - return processes[ process ].readFile( fileid, bytes ); - case OTF_FILEOP_WRITE: - return processes[ process ].writeFile( fileid, bytes ); - case OTF_FILEOP_SEEK: - return processes[ process ].seekFile( fileid, bytes ); - } - - return OTF_RETURN_OK; -} - - -void State::printStack() const { - - - map<uint32_t,ProcessState>::const_iterator it= processes.begin(); - map<uint32_t,ProcessState>::const_iterator itend= processes.end(); - for ( ; it != itend; ++it ) { - - it->second.printStack( it->first ); - } -} - - -void State::printSends() const { - - - map<uint32_t,ProcessState>::const_iterator it= processes.begin(); - map<uint32_t,ProcessState>::const_iterator itend= processes.end(); - for ( ; it != itend; ++it ) { - - it->second.printSends( it->first ); - } -} - - -void State::printOpenFiles() const { - - - map<uint32_t,ProcessState>::const_iterator it= processes.begin(); - map<uint32_t,ProcessState>::const_iterator itend= processes.end(); - for ( ; it != itend; ++it ) { - - it->second.printOpenFiles( it->first ); - } -} - - - -void State::printStatistics( uint64_t time ) { - - - map<uint32_t,ProcessState>::const_iterator it= processes.begin(); - map<uint32_t,ProcessState>::const_iterator itend= processes.end(); - - for ( ; it != itend; ++it ) { - - it->second.printStatistics( it->first, time, false == usefunctiongroups ? - NULL : &functiongroups, false == usefilegroups ? NULL : &filegroups ); - } - -} - - -void State::writeSnapshot( OTF_Writer* writer, uint64_t time ) const { - - - if ( ! doSnapshots ) return; - - - assert( NULL != writer ); - - /* cout << " SNAPSHOT " << time << endl; */ - map<uint32_t,ProcessState>::const_iterator it= processes.begin(); - map<uint32_t,ProcessState>::const_iterator itend= processes.end(); - for ( ; it != itend; ++it ) { - - - it->second.writeStack( writer, time, it->first /* processid */ ); - it->second.writeSends( writer, time, it->first /* processid */ ); - it->second.writeOpenFiles( writer, time, it->first /* processid */ ); - it->second.writeCollOps( writer, time, it->first /* processid */ ); - it->second.writeFileOps( writer, time, it->first /* processid */ ); - } -} - - -void State::writeStatistics( OTF_Writer* writer, uint64_t time ) { - - - if ( ! doStatistics ) return; - - - assert( NULL != writer ); - - /* cout << " STATISTICS " << time << endl; */ - map<uint32_t,ProcessState>::const_iterator it= processes.begin(); - map<uint32_t,ProcessState>::const_iterator itend= processes.end(); - - for ( ; it != itend; ++it ) { - - it->second.writeStatistics( writer, time, - it->first /* processid */, false == usefunctiongroups ? - NULL : &functiongroups, false == usefilegroups ? NULL : &filegroups ); - } -} diff --git a/externals/otf/tools/otfaux/State.h b/externals/otf/tools/otfaux/State.h deleted file mode 100644 index 827f9884219b41a6f261cdf3aa2ac95fed7169e6..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfaux/State.h +++ /dev/null @@ -1,427 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef STATE_H -#define STATE_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <vector> -#include <deque> -#include <map> -#include <list> - -#include "OTF_inttypes.h" - -#include "otf.h" - - -/* *** function stuff *** ********************************* */ - -struct FunctionCall { - - -public: - - uint64_t time; - uint32_t token; - OTF_KeyValueList *kvlist; - - -public: - - /** constructor */ - FunctionCall( uint64_t _time, uint32_t _token, OTF_KeyValueList *_kvlist ); - - /** copy constructor */ - FunctionCall( const FunctionCall& fc ); - - /** destructor */ - ~FunctionCall(); - - /** assignment operator */ - FunctionCall operator=( const FunctionCall& fc ); -}; - - -struct FunctionStatistics { - - -public: - - int64_t occurrences; - int64_t exclusiveTime; - int64_t inclusiveTime; - - -public: - - /** constructor */ - FunctionStatistics( int64_t o= 0, int64_t ex= 0, int64_t in= 0 ) : - occurrences( o ), exclusiveTime( ex ), inclusiveTime( in ) {}; - - /** copy constructor */ - FunctionStatistics( const FunctionStatistics& other ) : - occurrences( other.occurrences ), exclusiveTime( other.exclusiveTime ), - inclusiveTime( other.inclusiveTime ) {}; -}; - - -/* *** send stuff ************************************** */ -struct Send { - - -public: - - uint64_t originaltime; - uint32_t receiver; - uint32_t procGroup; - uint32_t tag; - uint32_t length; - uint32_t source; - OTF_KeyValueList *kvlist; - -public: - - /** constructor */ - Send( uint64_t _originaltime, uint32_t _receiver, uint32_t _procGroup, uint32_t _tag, - uint32_t _length, uint32_t _source, OTF_KeyValueList *_kvlist ); - - /** copy constructor */ - Send( const Send& s ); - - /** destructor */ - ~Send(); - - /** assignment operator */ - Send operator=( const Send& s ); -}; - - -struct SendStatistics { - -public: - - uint64_t number_sent; - uint64_t number_recvd; - uint64_t bytes_sent; - uint64_t bytes_recvd; - -public: - - SendStatistics( uint64_t ns= 0, uint64_t nr= 0, uint64_t bs= 0, uint64_t br= 0 ) : - number_sent( ns ), number_recvd( nr ), bytes_sent( bs ), - bytes_recvd( br ) {}; - - SendStatistics( const SendStatistics& other ) : - number_sent( other.number_sent ), number_recvd( other.number_recvd ), - bytes_sent( other.bytes_sent ), bytes_recvd( other.bytes_recvd ) {}; -}; - - -struct CollectiveOperations { - -public: - - mutable std::map<uint32_t,uint64_t> numSent; - mutable std::map<uint32_t,uint64_t> numRecv; - mutable std::map<uint32_t,uint64_t> bytesSent; - mutable std::map<uint32_t,uint64_t> bytesRecv; - mutable std::map<uint32_t,uint32_t> Type2Col; -}; - - -struct BeginCollOperation { - -public: - - uint64_t time; - uint32_t root; - uint32_t procGroup; - uint32_t col; - uint32_t type; - uint64_t invoc_sent; - uint64_t invoc_recv; - uint64_t bytesSent; - uint64_t bytesRecv; - uint32_t scltoken; - OTF_KeyValueList *kvlist; - -public: - - /** constructor */ - BeginCollOperation( uint64_t _time, uint32_t _root, uint32_t _procGroup, - uint32_t _col, uint32_t _type, uint64_t _invoc_sent, uint64_t _invoc_recv, - uint64_t _bytesSent, uint64_t _bytesRecv, uint32_t _scltoken, OTF_KeyValueList *_kvlist ); - - /** copy constructor */ - BeginCollOperation( const BeginCollOperation& cop ); - - /** destructor */ - ~BeginCollOperation(); - - /** assignment operator */ - BeginCollOperation operator=( const BeginCollOperation& cop ); - -}; - -struct BeginFileOperation { - -public: - - uint64_t time; - uint32_t scltoken; - OTF_KeyValueList *kvlist; - - -public: - - /** constructor */ - BeginFileOperation( uint64_t _time, uint32_t _scltoken, OTF_KeyValueList *_kvlist ); - - /** copy constructor */ - BeginFileOperation( const BeginFileOperation& fop ); - - /** destructor */ - ~BeginFileOperation(); - - /** assignment operator */ - BeginFileOperation operator=( const BeginFileOperation& fop ); - -}; - -/* *** file operation stuff ******************************** */ -struct FileOpen { - -public: - - uint64_t time; - uint32_t fileid; - uint32_t source; - OTF_KeyValueList *kvlist; - -public: - - /** constructor */ - FileOpen( uint64_t _time, uint32_t _fileid, uint32_t _source, OTF_KeyValueList *_kvlist ); - - /** copy constructor */ - FileOpen( const FileOpen& fo ); - - /** destructor */ - ~FileOpen(); - - /** assignment operator */ - FileOpen operator=( const FileOpen& fo ); -}; - - -struct FileOperationStatistics { - -public: - - uint64_t nopen; - uint64_t nclose; - uint64_t nread; - uint64_t nwrite; - uint64_t nseek; - uint64_t bytesread; - uint64_t byteswrite; - -public: - - FileOperationStatistics( uint64_t no= 0, uint64_t nc= 0, uint64_t nr= 0, - uint64_t nw= 0, uint64_t ns= 0, uint64_t br= 0, uint64_t bw= 0 ) : - nopen( no ), nclose( nc ), nread( nr ), nwrite( nw ), nseek( ns ), - bytesread( br ), byteswrite( bw ) {}; - - FileOperationStatistics( const FileOperationStatistics& other ) : - nopen( other.nopen ), nclose( other.nclose ), nread( other.nread ), - nwrite( other.nwrite ), nseek( other.nseek ), - bytesread( other.bytesread ), byteswrite( other.byteswrite ) {}; -}; - - -/* *** ProcessState *** ********************************* */ - - -/** class containing the state of a process trace at a given */ -class ProcessState { - - -public: - - /* function stack */ - std::deque<FunctionCall> fstack; - - /* list of pending messages */ - std::deque<Send> sstack; - - /* map of open files */ - std::map<uint64_t/*handleid*/, FileOpen> openfiles; - - /* map of begun collective operations */ - std::map<uint64_t/*matchingId*/, BeginCollOperation> beginCollOps; - - /* map of unfinished file operations */ - std::map<uint64_t/*handleid*/, BeginFileOperation> beginFileOps; - - /* statistic per function since the beginning of the trace */ - std::map<uint32_t,FunctionStatistics> fstatistics; - - /* statistics for messages */ - SendStatistics sstatistics; - - /* statistics for collective operations */ - CollectiveOperations CollOps; - - /* statistic per file since the beginning of the trace */ - std::map<uint32_t,FileOperationStatistics> fostatistics; - - -public: - - /** constructor */ - ProcessState() {}; - - - void enterFunction( uint64_t time, uint32_t token, OTF_KeyValueList *kvlist ); - - void leaveFunction( uint64_t time, uint32_t token ); - - void sendMessage( uint64_t time, uint32_t receiver, uint32_t procGroup, - uint32_t tag, uint32_t msglength, uint32_t source, OTF_KeyValueList *kvlist ); - - void collOperation( uint64_t time, uint32_t col, uint32_t type, uint32_t numSent, uint32_t numRecv, - uint32_t bytesSent, uint32_t bytesRecv ); - - void recvMessage( uint32_t msglength ); - - void matchMessage( uint32_t receiver, uint32_t procGroup, uint32_t tag ); - - int openFile( uint64_t time, uint32_t fileid, uint64_t handleid, - uint32_t source, OTF_KeyValueList *kvlist ); - int closeFile( uint64_t handleid ); - int writeFile( uint32_t fileid, uint64_t bytes ); - int readFile( uint32_t fileid, uint64_t bytes ); - int seekFile( uint32_t fileid, uint64_t bytes ); - - - int beginCollOperation( uint64_t time, uint32_t root, uint32_t procGroup, - uint32_t col, uint32_t type, uint64_t matchingId, uint64_t invoc_sent, - uint64_t invoc_recv, uint64_t bytesSent, uint64_t bytesRecv, - uint32_t scltoken, OTF_KeyValueList *kvlist ); - - int endCollOperation( uint64_t time, uint32_t matchingId ); - - int beginFileOperation( uint64_t time, uint64_t matchingId, uint32_t scltoken, - OTF_KeyValueList *kvlist ); - - int endFileOperation( uint64_t matchingId ); - - - void printStack( uint32_t processid ) const; - void printStatistics( uint32_t processid, uint64_t time, - std::map< uint32_t, uint32_t> *functiongroups, - std::map< uint32_t, uint32_t> *filegroups ) const; - void printSends( uint32_t processid ) const; - void printOpenFiles( uint32_t processid ) const; - - void writeStack( OTF_Writer* writer, uint64_t time, uint32_t processid ) const; - void writeStatistics( OTF_Writer* writer, uint64_t time, - uint32_t processid, - std::map< uint32_t, uint32_t> *functiongroups, - std::map< uint32_t, uint32_t> *filegroups ) const; - void writeSends( OTF_Writer* writer, uint64_t time, uint32_t processid ) const; - void writeOpenFiles( OTF_Writer* writer, uint64_t time, uint32_t processid ) const; - void writeCollOps( OTF_Writer* writer, uint64_t time, uint32_t processid ) const; - void writeFileOps( OTF_Writer* writer, uint64_t time, uint32_t processid ) const; -}; - -/* *** State *** **************************************** */ - -/** state of a whole trace */ -class State { - - - std::map<uint32_t,ProcessState> processes; - - /* maps the collective operation to its type */ - std::map<uint32_t,uint32_t> Col2Type; - - /* maps the function to its funtiongroupid */ - std::map< uint32_t, uint32_t> functiongroups; - - /* maps the files to its filegroupid */ - std::map< uint32_t, uint32_t> filegroups; - - bool usefunctiongroups; - bool usefilegroups; - bool doSnapshots; - bool doStatistics; - -public: - - /** constructor */ - State( bool _usefunctiongroups= false, bool _usefilegroups= false, - bool _doSnapshots= true, bool _doStatistics= true ) : - usefunctiongroups( _usefunctiongroups ), usefilegroups( _usefilegroups ), - doSnapshots( _doSnapshots ), doStatistics( _doStatistics ) {}; - - - void defProcess( uint32_t processid ); - - void defFunction( uint32_t function, uint32_t group ); - - void defFile( uint32_t fileid, uint32_t group ); - - void defCollOp( uint32_t col, uint32_t type ); - - void enterFunction( uint64_t time, uint32_t processid, uint32_t token, OTF_KeyValueList *kvlist ); - - void leaveFunction( uint64_t time, uint32_t processid, uint32_t token ); - - void sendMessage( uint64_t time, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t tag, uint32_t length, uint32_t source, - OTF_KeyValueList *kvlist ); - - void collOperation( uint64_t time, uint32_t proc, uint32_t root, uint32_t col, - uint32_t bytesSent, uint32_t bytesRecv ); - - void recvMessage( uint32_t sender, uint32_t receiver, uint32_t procGroup, - uint32_t tag, uint32_t msglength ); - - int fileOperation( uint64_t time, uint32_t fileid, uint32_t process, - uint64_t handleid, uint32_t operation, uint64_t bytes, - uint64_t duration, uint32_t source, OTF_KeyValueList *kvlist ); - - int beginCollOperation( uint64_t time, uint32_t proc, uint32_t root, uint32_t procGroup, - uint32_t col, uint64_t matchingId, uint64_t bytesSent, uint64_t bytesRecv, - uint32_t scltoken, OTF_KeyValueList *kvlist ); - - int endCollOperation( uint64_t time, uint32_t proc, uint64_t matchingId ); - - int beginFileOperation( uint64_t time, uint32_t process, uint64_t matchingId, - uint32_t scltoken, OTF_KeyValueList *kvlist ); - - int endFileOperation( uint64_t time, uint32_t process, uint32_t fileid, uint64_t matchingId, - uint64_t handleId, uint32_t operation, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *kvlist ); - - - void printStack() const; - void printStatistics( uint64_t time ); - void printSends() const; - void printOpenFiles() const; - - - void writeSnapshot( OTF_Writer* writer, uint64_t time ) const; - void writeStatistics( OTF_Writer* writer, uint64_t time ); -}; - -#endif /* STATE_H */ - diff --git a/externals/otf/tools/otfaux/otfaux.cpp b/externals/otf/tools/otfaux/otfaux.cpp deleted file mode 100644 index 8171483db4fbebe909cfdee5cb00b5d1f2c3b0ac..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfaux/otfaux.cpp +++ /dev/null @@ -1,686 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <set> -#include <iostream> -#include <cassert> -using namespace std; - -#ifdef HAVE_UNISTD_H - #include <unistd.h> -#endif - -#include "OTF_Platform.h" - -#include "Handler.h" -#include "Control.h" - -#define SHOW_HELPTEXT { \ - int l = 0; while( Helptext[l] ) { printf( "%s", Helptext[l++] ); } } - -static const char* Helptext[] = { -" \n", -" otfaux - append snapshots and statistics to existing otf traces \n", -" at given 'break' time stamps. \n", -" \n", -" \n", -" otfaux [Options] <file name> \n", -" \n", -" Options: \n", -" -h, --help show this help message \n", -" -V show OTF version \n", -" -b <size> buffer size for read and write operations \n", -" -n <n> number of breaks (distributed regularly) \n", -" if -p and -t are not set, the default for -n is 200 \n", -" breaks \n", -" -p <p> create break every 'p' ticks \n", -" (if both, -n and -p are specified the one producing \n", -" more breaks wins) \n", -" -t <t> define (additional) break at given time stamp \n", -" -F force overwrite old snapshots and statistics \n", -" -R delete existing snapshots and statistics only \n", -" -f <n> max number of filehandles output \n", -" --funcgroups create functiongroup summaries instead of \n", -" function summaries \n", -" --filegroups create file group summaries instead of file \n", -" summaries \n", -" -v verbose mode, print break time stamps \n", -" -a show advancing progress during operation \n", -" \n", -" --snapshots write ONLY snapshots but NO statistics \n", -" --statistics write ONLY statistics but NO snapshots \n", -" \n", -" -s a[,b]* regard given streams only when computing statistics. \n", -" expects a single token or comma separated list. \n", -" this implies the '--statistics' option! \n", -" -l list existing stream tokens \n", -" \n", NULL }; - -#define DEFAULT_SUMMARYNUMBER 200 - - -void checkExistingFile( const char* tmpfilename, bool forceoverwrite, bool deleteonly ); - - -int main ( int argc, const char** argv ) { - - char* filename = NULL; - int buffersize= 1024; - - /** minimum number of snapshots distributed regularly over the trace's - time interval, i.e. not at the very beginning or very end */ - uint64_t summary_number= 0; - - /** distance of successive snapshots in ticks */ - uint64_t summary_distance= (uint64_t) -1; - - OTF_FileManager* manager; - OTF_Reader* reader= NULL; - OTF_Writer* writer= NULL; - OTF_MasterControl* mc= NULL; - - OTF_HandlerArray* handlers; - - char *namestub; - bool forceoverwrite= false; - bool deleteonly= false; - - OTF_FileCompression compression= OTF_FILECOMPRESSION_UNCOMPRESSED; - unsigned int maxfilehandles = 100; - - bool verbose= false; - bool usefunctiongroups= false; - bool usefilegroups= false; - bool showprogress= false; - bool listonly= false; - - bool doSnapshots= true; - bool doStatistics= true; - - uint64_t read; - - /* has something been set? 1= n, 2= p, 4= t */ - int npt= 0; - - /** set of selected streams, all streams if set is empty! */ - std::set<uint32_t> streams; - - /** list of explicit time stamps for snapshots */ - std::set<uint64_t> timestamps; - - - /* argument handling */ - - if ( 1 >= argc ) { - - SHOW_HELPTEXT; - exit(0); - } - - for ( int i = 1; i < argc; i++ ) { - - if ( ( 0 == strcmp( "-i", argv[i] ) ) && ( i+1 < argc ) ) { - - filename= strdup( argv[i+1] ); - ++i; - - } else if ( ( 0 == strcmp( "-b", argv[i] ) ) && ( i+1 < argc ) ) { - - buffersize = atoi( argv[i+1] ); - ++i; - - } else if ( 0 == strcmp( "--help", argv[i] ) || 0 == strcmp( "-h", argv[i] ) ) { - - SHOW_HELPTEXT; - exit(0); - - } else if ( 0 == strcmp( "-V", argv[i] ) ) { - - printf( "%u.%u.%u \"%s\"\n", OTF_VERSION_MAJOR, OTF_VERSION_MINOR, - OTF_VERSION_SUB, OTF_VERSION_STRING); - exit( 0 ); - - } else if ( ( 0 == strcmp( "-n", argv[i] ) ) && ( i+1 < argc ) ) { - - summary_number= atoi( argv[i+1] ); - npt= 1; - ++i; - - } else if ( ( 0 == strcmp( "-p", argv[i] ) ) && ( i+1 < argc ) ) { - - summary_distance= atoi( argv[i+1] ); - npt= 2; - ++i; - - } else if ( ( 0 == strcmp( "-t", argv[i] ) ) && ( i+1 < argc ) ) { - - uint64_t time = atoi( argv[i+1] ); - timestamps.insert( time ); - npt= 4; - ++i; - - } else if ( 0 == strcmp( "-F", argv[i] ) ) { - - forceoverwrite= true; - - } else if ( 0 == strcmp( "-R", argv[i] ) ) { - - deleteonly= true; - - } else if( 0 == strcmp( "-z", argv[i] ) ) { - - compression= OTF_FILECOMPRESSION_COMPRESSED; - - } else if ( ( 0 == strcmp( "-f", argv[i] ) ) && ( i+1 < argc ) ) { - - maxfilehandles= atoi( argv[i+1] ); - ++i; - - } else if( 0 == strcmp( "-a", argv[i] ) ) { - - showprogress= true; - - } else if( 0 == strcmp( "-v", argv[i] ) ) { - - verbose= true; - - }else if( 0 == strcmp( "--funcgroups", argv[i] ) ) { - - usefunctiongroups= true; - - } else if( 0 == strcmp( "--filegroups", argv[i] ) ) { - - usefilegroups= true; - - } else if( 0 == strcmp( "-l", argv[i] ) ) { - - listonly= true; - - } else if ( ( 0 == strcmp( "-s", argv[i] ) ) && ( i+1 < argc ) ) { - - /* operation for selected streams IMPLIES '--statistics' */ - doSnapshots= false; - - - const char* p= argv[i+1]; - ++i; - - while ( '\0' != *p ) { - - uint32_t token= strtol( p, (char**) NULL, 16 ); - - streams.insert( token ); - - /* search comma or '\n' */ - while ( ( '\0' != *p ) && ( ',' != *p ) ) { - - ++p; - } - - /* skip comma */ - if ( ',' == *p ) { - - ++p; - } - } - - } else if( 0 == strcmp( "--snapshots", argv[i] ) ) { - - doStatistics= false; - - } else if( 0 == strcmp( "--statistics", argv[i] ) ) { - - doSnapshots= false; - - } else { - - if ( '-' != argv[i][0] ) { - - filename= strdup( argv[i] ); - - } else { - - fprintf( stderr, "ERROR: Unknown argument.\n" ); - exit(1); - } - } - } - - - if ( NULL == filename ) { - - printf( " no input file specified, abort\n" ); - exit(1); - } - - if ( ! ( doStatistics || doSnapshots ) ) { - - printf( "ERROR: contradicting options '--snapshots' and '--statistics', abort\n" ); - exit(1); - } - - - /* n has been set, not p, not t */ - if ( 1 == npt && 2 > summary_number ) { - - printf( " you must at least have 2 breaks\n" ); - exit(1); - } - - if ( 1 > maxfilehandles ) { - - printf( " there must be at least 1 available filehandle\n" ); - exit(1); - } - - if ( 0 == npt ) { - - summary_number= 200; - } - - /* open filemanager */ - manager= OTF_FileManager_open( maxfilehandles ); - assert( NULL != manager ); - - /* Open OTF Reader */ - reader= OTF_Reader_open( filename, manager ); - if ( NULL == reader ) { - - fprintf( stderr, "%s ERROR: could not open '%s'\n", "otfaux", filename ); - return 1; - } - - OTF_Reader_setBufferSizes( reader, buffersize ); - mc= OTF_Reader_getMasterControl( reader ); - - - if ( listonly ) { - - printf( "stream ID : process IDs ... \n" ); - - uint32_t index= 0; - const OTF_MapEntry* entry; - while ( NULL != ( entry= OTF_MasterControl_getEntryByIndex( mc, index ) ) ) { - - printf( "%x : ", entry->argument ); - for ( uint32_t i= 0; i < entry->n; ++i ) { - - printf( "%x ", entry->values[i] ); - } - printf( "\n" ); - - ++index; - } - - /* exit otfaux */ - return 0; - } - - /** if 'streams' is empty, i.e. all existing streams are to be used, - fill all existing stream tokens into 'streams'. */ - if ( streams.empty() ) { - - - uint32_t index= 0; - const OTF_MapEntry* entry; - while ( NULL != ( entry= OTF_MasterControl_getEntryByIndex( mc, index ) ) ) { - - streams.insert( entry->argument ); - ++index; - } - } - - /* check if there are already existing statistics and snapshots */ - /* get streamcount and namestub */ - namestub= OTF_stripFilename( filename ); - - - std::set<uint32_t>::const_iterator jt= streams.begin(); - std::set<uint32_t>::const_iterator jtend= streams.end(); - - for ( ; jt != jtend; ++jt ) { - - char* tmpfilename; - OTF_FileType type; - - type= OTF_FILETYPE_SNAPS; - tmpfilename= OTF_getFilename( namestub, *jt, type, 0, NULL ); - checkExistingFile( tmpfilename, forceoverwrite, deleteonly ); - free( tmpfilename ); - - type= OTF_FILETYPE_STATS; - tmpfilename= OTF_getFilename( namestub, *jt, type, 0, NULL ); - checkExistingFile( tmpfilename, forceoverwrite, deleteonly ); - free( tmpfilename ); - - type= OTF_FILETYPE_SNAPS | OTF_FILECOMPRESSION_COMPRESSED; - tmpfilename= OTF_getFilename( namestub, *jt, type, 0, NULL ); - checkExistingFile( tmpfilename, forceoverwrite, deleteonly ); - free( tmpfilename ); - - type= OTF_FILETYPE_STATS | OTF_FILECOMPRESSION_COMPRESSED; - tmpfilename= OTF_getFilename( namestub, *jt, type, 0, NULL ); - checkExistingFile( tmpfilename, forceoverwrite, deleteonly ); - free( tmpfilename ); - } - - /* deleting files is done by now, exit */ - if ( deleteonly ) { - - return 0; - } - - /* Open OTF Writer */ - writer= OTF_Writer_open( filename, 0, manager ); - assert( NULL != writer ); - OTF_Writer_setBufferSizes( writer, buffersize ); - OTF_Writer_setCompression( writer, compression ); - OTF_Writer_setMasterControl( writer, mc ); - - free( filename ); - - - Control* control= new Control( writer, verbose, usefunctiongroups, - usefilegroups, doSnapshots, doStatistics ); - - - handlers= OTF_HandlerArray_open(); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFunction, - OTF_DEFFUNCTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_DEFFUNCTION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDeftimerresolution, - OTF_DEFTIMERRESOLUTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_DEFTIMERRESOLUTION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefprocess, - OTF_DEFPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_DEFPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFile, - OTF_DEFFILE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_DEFFILE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCollectiveOperation, - OTF_DEFCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_DEFCOLLOP_RECORD ); - - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleCounter, - OTF_COUNTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_COUNTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEnter, - OTF_ENTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_ENTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRecvmsg, - OTF_RECEIVE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_RECEIVE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleSendmsg, - OTF_SEND_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_SEND_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleLeave, - OTF_LEAVE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_LEAVE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginProcess, - OTF_BEGINPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_BEGINPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndProcess, - OTF_ENDPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_ENDPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleCollectiveOperation, - OTF_COLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_COLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEventComment, - OTF_EVENTCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_EVENTCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFileOperation, - OTF_FILEOPERATION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_FILEOPERATION_RECORD ); - - - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginCollectiveOperation, - OTF_BEGINCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_BEGINCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndCollectiveOperation, - OTF_ENDCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_ENDCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginFileOperation, - OTF_BEGINFILEOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_BEGINFILEOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndFileOperation, - OTF_ENDFILEOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, (void*) control, - OTF_ENDFILEOP_RECORD ); - - - /* cout << "read " << read << " defs" << endl; */ - read = OTF_Reader_readDefinitions( reader, handlers ); - if( read == OTF_READ_ERROR ) { - fprintf(stderr,"An error occurred while reading the tracefile. It seems to be damaged. Abort.\n"); - return 1; - } - - /** compute where to put snapshots */ - - uint64_t tmin= 0; - uint64_t tcur= 0; - uint64_t tmax= (uint64_t) -1; - - /* init read operation but do not start to read records yet. this ensures the - time interval of the trace is extracted */ - OTF_Reader_setRecordLimit( reader, 0 ); - read = OTF_Reader_readEvents( reader, handlers ); - if( read == OTF_READ_ERROR ) { - fprintf(stderr,"An error occurred while reading the tracefile. It seems to be damaged. Abort.\n"); - return 1; - } - - /* cout << "read " << read << " events" << endl; */ - OTF_Reader_setRecordLimit( reader, OTF_READ_MAXRECORDS ); - - OTF_Reader_eventProgress( reader, &tmin, &tcur, &tmax ); - - /* increase in order to place final statistics after the very last record */ - tmax += 1; - - /* - cout << "total time " << - (unsigned long long) tmin << " - " << - (unsigned long long) tmax << endl; - */ - - double d= ((double) ( tmax - tmin ) ) / ((double) summary_number ); - d= ( d <= (double) summary_distance ) ? d : (double) summary_distance; - d= ( 1.0 < d ) ? d : 1.0; - - /* - * generated sample points, but don't include t_min, - * it is defined as 0-point - */ - for ( double t= (double) tmin + d; t < tmax; t += d ) { - control->addTime( (uint64_t) t ); - } - - - /* append user defined time stamps */ - - set<uint64_t>::const_iterator it= timestamps.begin(); - set<uint64_t>::const_iterator itend= timestamps.end(); - for ( ; it != itend; ++it ) { - - control->addTime( *it ); - } - - /* place very last statistics _after_ the last record but not right before it. - Needs to be triggered explictily in the end. */ - if ( control->getLastTime() < tmax ) { - - control->addTime( tmax ); - } - - - /* restrict streams resp. processes to be read */ - - /* first disable all processes */ - OTF_Reader_setProcessStatusAll( reader, 0 ); - - /* then enable all processes of all selected streams */ - jt= streams.begin(); - jtend= streams.end(); - for ( ; jt != jtend; ++jt ) { - - OTF_MapEntry* entry= OTF_MasterControl_getEntry( mc, *jt ); - - if ( NULL != entry ) { - - for ( uint32_t i= 0; i < entry->n; ++i ) { - - OTF_Reader_setProcessStatus( reader, entry->values[i], 1 ); - } - - } else { - - printf( "WARNING: stream '%x' undefined\n", *jt ); - } - } - - if ( true == control->timestamps.empty() ) { - - fprintf( stderr, " no statistics or snapshots will be created.\n" ); - exit(0); - } - - if ( showprogress ) { - - /* show progress report */ - - uint64_t min; - uint64_t cur; - uint64_t max; - - OTF_Reader_setRecordLimit( reader, 100000 ); - - while ( 0 < ( read = OTF_Reader_readEvents( reader, handlers ) ) ) { - - if( read == OTF_READ_ERROR ) { - fprintf(stderr,"An error occurred while reading the tracefile. It seems to be damaged. Abort. Abort.\n"); - return 1; - } - - OTF_Reader_eventProgress( reader, &min, &cur, &max ); - fprintf( stdout, " progress %4.1f %%\r%10s", - 100.0 * ( (double) ( cur - min ) ) / ( (double) ( max - min ) ), "" ); - } - - fprintf( stdout, "%40s\n", "" ); - - OTF_Reader_setRecordLimit( reader, OTF_READ_MAXRECORDS ); - - } else { - - read = OTF_Reader_readEvents( reader, handlers ); - if( read == OTF_READ_ERROR ) { - fprintf(stderr,"An error occurred while reading the tracefile. It seems to be damaged. Abort.\n"); - return 1; - } - /* cout << "read " << read << " events" << endl; */ - } - - /* explicitly trigger writing for the very last timestamp +1 such that - the very last event is included in the final statistics */ - control->checkTime( tmax ); - - delete control; - - OTF_Reader_close( reader ); - - - /* DO NOT close the writer in order to prevent the original MasterControl file - to be overwritten. Instead close only all the streams of that writer. */ - OTF_Writer_closeAllStreams( writer ); - - OTF_HandlerArray_close( handlers ); - OTF_FileManager_close( manager ); - - return (0); -} - - -void checkExistingFile( const char* tmpfilename, bool forceoverwrite, bool deleteonly ) { - - - FILE* tmpfile= fopen( tmpfilename, "rb" ); - if ( NULL != tmpfile ) { - - fclose( tmpfile ); - - if ( forceoverwrite || deleteonly ) { - - unlink( tmpfilename ); - - } else { - - printf( "ERROR: cannot overwrite/delete file '%s', abort\n", tmpfilename ); - exit( 1 ); - } - } -} - diff --git a/externals/otf/tools/otfaux/otfaux_vs08.vcproj b/externals/otf/tools/otfaux/otfaux_vs08.vcproj deleted file mode 100644 index a96ee59b8d87910011ae21a3fa763a30ef72cedb..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfaux/otfaux_vs08.vcproj +++ /dev/null @@ -1,388 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="otfaux" - ProjectGUID="{24587836-ED5E-49DF-A7AD-419FDC208C08}" - RootNamespace="otfaux" - Keyword="Win32Proj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="../../debug" - IntermediateDirectory="tmp" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="libotf.lib" - LinkIncremental="2" - AdditionalLibraryDirectories="../../debug" - GenerateDebugInformation="true" - SubSystem="1" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_ZLIB" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - LinkIncremental="2" - AdditionalLibraryDirectories="" - GenerateDebugInformation="true" - SubSystem="1" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release Static|Win32" - OutputDirectory="../../release_static_32bit" - IntermediateDirectory="tmp_32bit" - ConfigurationType="1" - UseOfMFC="0" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="false" - DebugInformationFormat="0" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="libotf.lib" - LinkIncremental="1" - AdditionalLibraryDirectories="../../release_static_32bit" - DelayLoadDLLs="$(NOINHERIT)" - GenerateDebugInformation="false" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release Static|x64" - OutputDirectory="../../release_static_64bit" - IntermediateDirectory="tmp_64bit" - ConfigurationType="1" - UseOfMFC="0" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="false" - DebugInformationFormat="0" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="libotf.lib" - LinkIncremental="1" - AdditionalLibraryDirectories="../../release_static_64bit" - DelayLoadDLLs="$(NOINHERIT)" - GenerateDebugInformation="false" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Quelldateien" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\Control.cpp" - > - </File> - <File - RelativePath=".\Handler.cpp" - > - </File> - <File - RelativePath=".\otfaux.cpp" - > - </File> - <File - RelativePath=".\State.cpp" - > - </File> - </Filter> - <Filter - Name="Headerdateien" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath=".\Control.h" - > - </File> - <File - RelativePath=".\Handler.h" - > - </File> - <File - RelativePath=".\State.h" - > - </File> - </Filter> - <Filter - Name="Ressourcendateien" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/externals/otf/tools/otfcompress/Makefile.am b/externals/otf/tools/otfcompress/Makefile.am deleted file mode 100644 index 8d20641a3852a3a62d845dd9fc8ec692f9c63ebf..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfcompress/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -INCLUDES = \ - -I$(top_builddir)/otflib -I$(top_srcdir)/otflib \ - $(ZLIB_INCLUDE_LINE) - -if AMBUILDBINARIES -bin_PROGRAMS = otfcompress - -install-exec-hook: - (cd $(DESTDIR)$(bindir); rm -f otfdecompress; \ - $(LN_S) otfcompress$(EXEEXT) otfdecompress$(EXEEXT)) -endif - -otfcompress_LDADD = $(top_builddir)/otflib/libotf.la -otfcompress_DEPENDENCIES = $(otfcompress_LDADD) -otfcompress_SOURCES = \ - sys_time.h \ - otfcompress.c - -EXTRA_DIST = \ - otfcompress_vs08.vcproj - diff --git a/externals/otf/tools/otfcompress/Makefile.in b/externals/otf/tools/otfcompress/Makefile.in deleted file mode 100644 index e00e72ad64d419359cc4861e1d1fbaa6dd762723..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfcompress/Makefile.in +++ /dev/null @@ -1,599 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@AMBUILDBINARIES_TRUE@bin_PROGRAMS = otfcompress$(EXEEXT) -subdir = tools/otfcompress -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_otfcompress_OBJECTS = otfcompress.$(OBJEXT) -otfcompress_OBJECTS = $(am_otfcompress_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(otfcompress_SOURCES) -DIST_SOURCES = $(otfcompress_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = \ - -I$(top_builddir)/otflib -I$(top_srcdir)/otflib \ - $(ZLIB_INCLUDE_LINE) - -otfcompress_LDADD = $(top_builddir)/otflib/libotf.la -otfcompress_DEPENDENCIES = $(otfcompress_LDADD) -otfcompress_SOURCES = \ - sys_time.h \ - otfcompress.c - -EXTRA_DIST = \ - otfcompress_vs08.vcproj - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/otfcompress/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/otfcompress/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -otfcompress$(EXEEXT): $(otfcompress_OBJECTS) $(otfcompress_DEPENDENCIES) - @rm -f otfcompress$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(otfcompress_OBJECTS) $(otfcompress_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfcompress.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -@AMBUILDBINARIES_FALSE@install-exec-hook: -clean: clean-am - -clean-am: clean-binPROGRAMS 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-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -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: uninstall-binPROGRAMS - -.MAKE: install-am install-exec-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - 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-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - 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 uninstall-binPROGRAMS - - -@AMBUILDBINARIES_TRUE@install-exec-hook: -@AMBUILDBINARIES_TRUE@ (cd $(DESTDIR)$(bindir); rm -f otfdecompress; \ -@AMBUILDBINARIES_TRUE@ $(LN_S) otfcompress$(EXEEXT) otfdecompress$(EXEEXT)) - -# 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/externals/otf/tools/otfcompress/otfcompress.c b/externals/otf/tools/otfcompress/otfcompress.c deleted file mode 100644 index d24b03e4a09d05aad7b7dd201cdf2287c3d42976..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfcompress/otfcompress.c +++ /dev/null @@ -1,638 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#define _LARGEFILE64_SOURCE -#define _LARGEFILE64_SOURCE -#define _LARGE_FILES -#define _FILE_OFFSET_BITS 64 - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <assert.h> -#include <time.h> - -#ifdef HAVE_SYS_TIME_H - #include <sys/time.h> -#else - #include "sys_time.h" -#endif - - -#ifdef HAVE_ZLIB - #include <zlib.h> -#endif /* HAVE_ZLIB */ - -#ifdef HAVE_UNISTD_H - #include <unistd.h> -#endif - -#include "OTF_inttypes.h" -#include "OTF_Platform.h" -#include "OTF_Definitions.h" - -#define SHOW_HELPTEXT { \ - int l = 0; while( Helptext[l] ) { printf( "%s", Helptext[l++] ); } } - -static const char* Helptext[] = { -" \n", -" otf(de)compress - compression program for single OTF files. \n", -" \n", -" Usage: otf(de)compress [OPTIONS] <FILES> \n", -" \n", -" -h, --help show this help message \n", -" -V show OTF version \n", -" -c compress (default action when called as 'otfcompress') \n", -" -d decompress (default action if called as 'otfdecompress')\n", -" -k keep original file (compressed resp. uncompressed) \n", -" -o <dir> output directory (implicitly sets -k) \n", -" -[0-9] use given compression level (default 4) \n", -" 0 - plain \n", -" 1 - minimum compression, fastest \n", -" 9 - maximum compression, slowest \n", -" \n", -NULL }; - -#ifdef HAVE_ZLIB - - -int compressFile( const char* filename, const char* outfilename, - uint32_t level, uint32_t blocksize ); - -int decompressFile( const char* filename, const char* outfilename, - uint32_t blocksize ); - - -#define ZLEVEL 4 -#define BUFFERSIZE (10*1024) - -#define MODE_DEFAULT 0 -#define MODE_COMPRESS 1 -#define MODE_DECOMPRESS 2 - - -int main ( int argc, char** argv ) { - - - int ret; - int i; - - uint32_t mode= MODE_DEFAULT; - const char* command= NULL; - const char* p; - - uint32_t infilenamelen; - uint32_t outfilenamelen; - const char* infilename; - char* outfilename= NULL; - char* outdir= NULL; - - int keep= 0; - int zlevel= ZLEVEL; - - - if ( 1 >= argc ) { - - SHOW_HELPTEXT; - return 0; - } - - - /* collect parameters */ - for ( i= 1; i < argc; i++ ) { - - if ( 0 == strcmp( "-h", argv[i] ) || 0 == strcmp( "--help", argv[i] ) ) { - - SHOW_HELPTEXT; - exit( 0 ); - - } else - - if ( 0 == strcmp( "-k", argv[i] ) ) { - - keep= 1; - - } else - - if ( 0 == strcmp( "-o", argv[i] ) && i < argc -1 ) { - - outdir= argv[++i]; - keep= 1; - - } else - - if ( 0 == strcmp( "-c", argv[i] ) ) { - - if ( MODE_DEFAULT == mode ) { - - mode= MODE_COMPRESS; - - } else { - - fprintf( stderr, "mode already set, cannot re-set, ignoring '-c'\n" ); - } - - } else - - if ( 0 == strcmp( "-d", argv[i] ) ) { - - if ( MODE_DEFAULT == mode ) { - - mode= MODE_DECOMPRESS; - - } else { - - fprintf( stderr, "mode already set, cannot re-set, ignoring '-d'\n" ); - } - - } else - - if ( ( '-' == argv[i][0] ) && ( '0' <= argv[i][1] ) && ( '9' >= argv[i][1] ) ) { - - zlevel= (int) ( argv[i][1] - '0' ); - - } else - - if ( 0 == strcmp( "-V", argv[i] ) ) { - - printf( "%u.%u.%u \"%s\"\n", OTF_VERSION_MAJOR, OTF_VERSION_MINOR, - OTF_VERSION_SUB, OTF_VERSION_STRING); - exit( 0 ); - } - } - - /* look at argv[0], mode defaults to compress/decomress according to command name */ - if ( MODE_DEFAULT == mode ) { - - p= strrchr( argv[0], '/' ); - command = NULL != p ? p+1 : argv[0]; - - if ( 0 == strcmp( "otfdecompress", command ) ) { - - mode= MODE_DECOMPRESS; - - } - - } - - - /* files to (de)compress */ - for ( i= 1; i < argc; i++ ) { - - if ( '-' == argv[i][0] ) { - - /* switches already handled */ - - if ( outdir != NULL && 0 == strcmp( argv[i], "-o" ) ) { - - /* skip value of option '-o' */ - i++; - - } - - } else { - - /* assume argument is a file name */ - - infilename= argv[i]; - infilenamelen= strlen( infilename ); - - /* calculate length of output file name */ - outfilenamelen= NULL != outdir ? strlen( outdir ) +1 : 0; - p= strrchr( infilename, '/' ); - outfilenamelen+= NULL != p ? strlen( p +1 ) : strlen( infilename ); - - switch ( mode ) { - - case MODE_DECOMPRESS: - - /* decompress file */ - - /* check for ".z" at the end and refuse uncompression if not found */ - if ( ( 2 >= infilenamelen ) || - ( 0 != strcmp( ".z", infilename +infilenamelen -2 ) ) ) { - - fprintf( stderr, "ERROR: no trailing '.z' in filename '%s', rejecting\n", - infilename ); - - continue; - } - - /* allocate memory for output file name */ - outfilenamelen-= 2; - outfilename= realloc( outfilename, (outfilenamelen +1) * sizeof(char) ); - assert( NULL != outfilename ); - - /* build outfilename */ - if ( outdir ) { - - snprintf( outfilename, outfilenamelen +1, "%s/%s", outdir, infilename ); - - } else { - - strncpy( outfilename, infilename, outfilenamelen ); - outfilename[outfilenamelen]= '\0'; - - } - - fprintf( stdout, "decompress \"%s\" -> \"%s\"\n", - infilename, outfilename ); - - ret= decompressFile( infilename, outfilename, BUFFERSIZE ); - - if ( 0 == ret ) { - - if ( keep ) { - - /* keep compressed file */ - - } else { - - /* remove compressed file */ - ret= unlink( infilename ); - - if ( 0 != ret ) { - - fprintf( stderr, "error removing '%s'\n", infilename ); - } - } - - } else { - - fprintf( stderr, "decompress error for file '%s'\n", infilename ); - } - - break; - - case MODE_COMPRESS: - case MODE_DEFAULT: - default: - - /* compress file */ - - /* check for ".z" at the end and refuse compression if found */ - if ( ( 2 < infilenamelen ) && - ( 0 == strcmp( ".z", infilename +infilenamelen -2 ) ) ) { - - fprintf( stderr, "ERROR: found '.z' suffix in filename, " - "file '%s' seems already compressed, skip\n", - infilename ); - - continue; - } - - /* allocate memory for output file name */ - outfilenamelen+= 2; - outfilename= realloc( outfilename, (outfilenamelen +1) * sizeof(char) ); - assert( NULL != outfilename ); - - /* build outfilename */ - if ( outdir ) { - - snprintf( outfilename, outfilenamelen +1, "%s/%s.z", outdir, infilename ); - - } else { - - snprintf( outfilename, outfilenamelen +1, "%s.z", infilename ); - - } - - fprintf( stdout, "compress \"%s\" -> \"%s\"\n", - infilename, outfilename ); - - ret= compressFile( infilename, outfilename, zlevel, BUFFERSIZE ); - - if ( 0 == ret ) { - - if ( keep ) { - - if ( outdir ) { - - /* keep uncompressed file */ - - } else { - - /* rename original file */ - - outfilename= realloc( outfilename, infilenamelen +10 ); - assert( NULL != outfilename ); - - /* built outfilename */ - sprintf( outfilename, "%s.original", infilename ); - - ret= rename( infilename, outfilename ); - - if ( 0 != ret ) { - - fprintf( stderr, "error renaming '%s' to '%s'\n", - infilename, outfilename ); - - } - - } - - } else { - - /* remove uncompressed */ - - ret= unlink( infilename ); - - if ( 0 != ret ) { - - fprintf( stderr, "error removing '%s'\n", infilename ); - } - } - - } else { - - fprintf( stderr, "compress error for file '%s'\n", infilename ); - } - - break; - } - } - } - - free( outfilename ); - outfilename= NULL; - infilename= NULL; - - return 0; -} - - - -int compressFile( const char* filename, const char* outfilename, - uint32_t level, uint32_t blocksize ) { - - - z_stream z; - int status; - - unsigned char* inbuf; - unsigned char* outbuf; - FILE *fin; - FILE *fout; - - - uint64_t totalin= 0; - uint64_t totalout= 0; - uint64_t read; - uint64_t write; - - struct timeval start; - struct timeval stop; - double time; - - - inbuf= (unsigned char*) malloc( blocksize * sizeof(unsigned char) ); - assert( NULL != inbuf ); - outbuf= (unsigned char*) malloc( blocksize * sizeof(unsigned char) ); - assert( NULL != outbuf ); - - fin= fopen( filename, "rb" ); - if ( NULL == fin ) { - - fprintf( stderr, "cannot open file '%s' for reading, skip\n", filename ); - free( inbuf ); - free( outbuf ); - return 1; - } - fout= fopen( outfilename, "wb" ); - if ( NULL == fout ) { - - fprintf( stderr, "cannot open file '%s' for writing, skip\n", outfilename ); - fclose( fin ); - free( inbuf ); - free( outbuf ); - return 1; - } - - z.zalloc= NULL; - z.zfree= NULL; - z.opaque= NULL; - - deflateInit( &z, level ); - - z.avail_in= 0; - z.next_out= outbuf; - z.avail_out= blocksize; - - gettimeofday( &start, NULL ); - - while ( 1 ) { - - /* is no more data in the buffer? */ - if ( 0 == z.avail_in ) { - - /* get new data */ - z.next_in= inbuf; - read= fread( inbuf, sizeof(char), blocksize, fin ); - - if ( 0 == read ) { - - break; - } - - totalin += read; - z.avail_in= (uInt) read; - } - - /* deflate the buffer */ - status= deflate( &z, Z_FULL_FLUSH ); - write= blocksize - z.avail_out; - - if ( Z_OK != status ) { - - fprintf( stderr, " status= %u\n", status ); - } - - write= blocksize - z.avail_out; - totalout += write; - - /* write to output if there is any data */ - if ( write > 0 ) { - - fwrite( outbuf, sizeof(char), (size_t) write, fout ); - } -/* - gettimeofday( &stop, NULL ); - time= ((double) ( stop.tv_sec - start.tv_sec ) ) + - 0.000001 * ((double) ( stop.tv_usec - start.tv_usec ) ); - fprintf( stderr, " %llu / %llu %6.2fs\n", - totalout, totalin, time ); -*/ - z.next_out= outbuf; - z.avail_out= blocksize; - } - - gettimeofday( &stop, NULL ); - time= ((double) ( stop.tv_sec - start.tv_sec ) ) + - 0.000001 * ((double) ( stop.tv_usec - start.tv_usec ) ); - - fprintf( stdout, "\tlevel= %u, buf= %ub : %llub / %llub = %6.2f%%, time= %5.3fs\n", - level, blocksize, - (unsigned long long) totalout, - (unsigned long long) totalin, - 100.0 * ((double) totalout) / ((double) totalin), - time ); - - deflateEnd( &z ); - fclose( fin ); - fclose( fout ); - - free( inbuf ); - free( outbuf ); - - return 0; -} - - -int decompressFile( const char* infilename, const char* outfilename, uint32_t blocksize ) { - - - z_stream z; - int status; - - unsigned char* inbuf; - unsigned char* outbuf; - FILE *fin; - FILE *fout; - - uint64_t totalin= 0; - uint64_t totalout= 0; - uint64_t read; - uint64_t write; - - struct timeval start; - struct timeval stop; - double time; - - - inbuf= (unsigned char*) malloc( blocksize * sizeof(unsigned char) ); - assert( NULL != inbuf ); - outbuf= (unsigned char*) malloc( blocksize * sizeof(unsigned char) ); - assert( NULL != outbuf ); - - fin= fopen( infilename, "rb" ); - if ( NULL == fin ) { - - fprintf( stderr, "cannot open file '%s' for reading, skip\n", infilename ); - free( inbuf ); - free( outbuf ); - return 1; - } - fout= fopen( outfilename, "wb" ); - if ( NULL == fout ) { - - fprintf( stderr, "cannot open file '%s' for writing, skip\n", outfilename ); - fclose( fin ); - free( inbuf ); - free( outbuf ); - return 1; - } - - z.zalloc = NULL; - z.zfree = NULL; - z.opaque = NULL; - - inflateInit( &z ); - - /* initial setup */ - z.avail_in = 0; - z.next_out = outbuf; - z.avail_out = blocksize; - - gettimeofday( &start, NULL ); - - while(1) { - - /* is no more data in the buffer? */ - if ( z.avail_in == 0 ) { - - /* get new data */ - z.next_in= inbuf; - read= fread( inbuf, sizeof( char ), blocksize, fin ); - - /* is the file empty? */ - if ( 0 == read ) { - - break; - } - - totalin += read; - z.avail_in= (uInt) read; - } - - - /* uncompress */ - status = inflate( &z, Z_SYNC_FLUSH ); - if ( Z_OK != status ) { - - fprintf( stderr, "error in uncompressing\n" ); - fclose( fin ); - fclose( fout ); - return 0; - } - - /* get size of the out buffer */ - write= blocksize - z.avail_out; - totalout += write; - - /* write to output if there is any data */ - if ( 0 < write ) { - - fwrite( outbuf, sizeof( char ), (size_t) write, fout ); - } - - z.next_out = outbuf; - z.avail_out = blocksize; - } - - gettimeofday( &stop, NULL ); - time= ((double) ( stop.tv_sec - start.tv_sec ) ) + - 0.000001 * ((double) ( stop.tv_usec - start.tv_usec ) ); - - fprintf( stdout, "\tbuf= %ub : %llub / %llub = %6.2f%%, time= %5.3fs\n", - blocksize, - (unsigned long long) totalin, - (unsigned long long) totalout, - 100.0 * ((double) totalin) / ((double) totalout), - time ); - - /* finalize everything */ - - inflateEnd( &z ); - fclose( fin ); - fclose( fout ); - - free( inbuf ); - free( outbuf ); - - return 0; -} - - -#else /* HAVE_ZLIB */ - - -int main ( int argc, const char** argv ) { - - - fprintf( stderr, "'zlib' not available, otfcompress de-activated\n" ); - - - return 1; -} - - -#endif /* HAVE_ZLIB */ - - diff --git a/externals/otf/tools/otfcompress/otfcompress_vs08.vcproj b/externals/otf/tools/otfcompress/otfcompress_vs08.vcproj deleted file mode 100644 index 70eb260f243b761fbc8678ae0b270a254d50c12d..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfcompress/otfcompress_vs08.vcproj +++ /dev/null @@ -1,372 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="otfcompress" - ProjectGUID="{B6BBC220-1492-4BEA-A299-9D062133ABAA}" - RootNamespace="otfcompress" - Keyword="Win32Proj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="../../debug" - IntermediateDirectory="tmp" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - CompileAs="1" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="zlib.lib" - LinkIncremental="2" - AdditionalLibraryDirectories="" - GenerateDebugInformation="true" - SubSystem="1" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_ZLIB" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - CompileAs="1" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - LinkIncremental="2" - AdditionalLibraryDirectories="" - GenerateDebugInformation="true" - SubSystem="1" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release Static|Win32" - OutputDirectory="../../release_static_32bit" - IntermediateDirectory="tmp_32bit" - ConfigurationType="1" - UseOfMFC="0" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="../../;../../otflib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="false" - DebugInformationFormat="0" - CompileAs="1" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="zlib.lib" - LinkIncremental="1" - AdditionalLibraryDirectories="../../release_static_32bit" - DelayLoadDLLs="$(NOINHERIT)" - GenerateDebugInformation="false" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release Static|x64" - OutputDirectory="../../release_static_64bit" - IntermediateDirectory="tmp_64bit" - ConfigurationType="1" - UseOfMFC="0" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="../../;../../otflib" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="false" - DebugInformationFormat="0" - CompileAs="1" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="zlib.lib" - LinkIncremental="1" - AdditionalLibraryDirectories="../../release" - DelayLoadDLLs="$(NOINHERIT)" - GenerateDebugInformation="false" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Quelldateien" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\otfcompress.c" - > - </File> - </Filter> - <Filter - Name="Headerdateien" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath=".\sys_time.h" - > - </File> - </Filter> - <Filter - Name="Ressourcendateien" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/externals/otf/tools/otfcompress/sys_time.h b/externals/otf/tools/otfcompress/sys_time.h deleted file mode 100644 index 0c284031b96ef966488692cd25b53ff4ff70117f..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfcompress/sys_time.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef CUSTOM_SYS_TIME_H -#define CUSTOM_SYS_TIME_H - - -#ifdef WIN32 - -#include "OTF_Platform.h" - -/* Based on timeval.h by Wu Yongwei */ - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#define EPOCHFILETIME (116444736000000000LL) - - -#include <time.h> -#include <windows.h> - - -typedef struct { - long tv_sec; - long tv_usec; -} timeval; - -struct timezone { - int tz_minuteswest; /* minutes W of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; - - -static int gettimeofday(struct timeval *tv, struct timezone *tz) -{ - FILETIME ft; - LARGE_INTEGER li; - __int64 t; - static int tzflag; - - if (tv) { - GetSystemTimeAsFileTime(&ft); - li.LowPart = ft.dwLowDateTime; - li.HighPart = ft.dwHighDateTime; - t = li.QuadPart; /* In 100-nanosecond intervals */ - t -= EPOCHFILETIME; /* Offset to the Epoch time */ - t /= 10; /* In microseconds */ - tv->tv_sec = (long)(t / 1000000); - tv->tv_usec = (long)(t % 1000000); - } - - if (tz) { - if (!tzflag) { - _tzset(); - tzflag++; - } - tz->tz_minuteswest = _timezone / 60; - tz->tz_dsttime = _daylight; - } - - return 0; -} - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* WIN32 */ - - -#endif /* CUSTOM_SYS_TIME_H */ diff --git a/externals/otf/tools/otfconfig/Makefile.am b/externals/otf/tools/otfconfig/Makefile.am deleted file mode 100644 index ea2b7b6a095efd5936f12b5dec261af13784dea3..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfconfig/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib - -if AMBUILDBINARIES -bin_PROGRAMS = \ - otfconfig -endif - -otfconfig_LDADD = $(top_builddir)/otflib/libotf.la -otfconfig_DEPENDENCIES = $(otfconfig_LDADD) -otfconfig_SOURCES = \ - otfconfig.c - -AM_CFLAGS = -DOTFCONFIG_INCLUDEDIR=\"$(includedir)\" -DOTFCONFIG_LIBDIR=\"$(libdir)\" diff --git a/externals/otf/tools/otfconfig/Makefile.in b/externals/otf/tools/otfconfig/Makefile.in deleted file mode 100644 index 9be49a0d3735194b384e6e25b199fa2d0314ff84..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfconfig/Makefile.in +++ /dev/null @@ -1,587 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@AMBUILDBINARIES_TRUE@bin_PROGRAMS = otfconfig$(EXEEXT) -subdir = tools/otfconfig -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_otfconfig_OBJECTS = otfconfig.$(OBJEXT) -otfconfig_OBJECTS = $(am_otfconfig_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(otfconfig_SOURCES) -DIST_SOURCES = $(otfconfig_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib -otfconfig_LDADD = $(top_builddir)/otflib/libotf.la -otfconfig_DEPENDENCIES = $(otfconfig_LDADD) -otfconfig_SOURCES = \ - otfconfig.c - -AM_CFLAGS = -DOTFCONFIG_INCLUDEDIR=\"$(includedir)\" -DOTFCONFIG_LIBDIR=\"$(libdir)\" -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/otfconfig/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/otfconfig/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -otfconfig$(EXEEXT): $(otfconfig_OBJECTS) $(otfconfig_DEPENDENCIES) - @rm -f otfconfig$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(otfconfig_OBJECTS) $(otfconfig_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfconfig.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS 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-binPROGRAMS - -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: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - 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-binPROGRAMS 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 \ - uninstall-binPROGRAMS - - -# 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/externals/otf/tools/otfconfig/otfconfig.c b/externals/otf/tools/otfconfig/otfconfig.c deleted file mode 100644 index 1567df89878424addc7f289bd9d37aeb0b0b9a73..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfconfig/otfconfig.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "OTF_inttypes.h" -#include "OTF_Platform.h" -#include "otf.h" - -#define SHOW_HELPTEXT { \ - int l = 0; while( Helptext[l] ) { printf( "%s", Helptext[l++] ); } } - -static const char* Helptext[] = { -" \n", -" otfconfig - shows parameters of the otf configuration. \n", -" \n", -" otfconfig [Options] \n", -" \n", -" options: \n", -" -h, --help show this help message \n", -" --version show the otf version \n", -" --have-zlib is zlib enabled \n", -" --includes path to the otf headers \n", -" --libs libline needed for linking otf \n", -" --sizes print size of integer types \n", -" \n", -" \n", NULL }; - -int main( int argc, char** argv ) { - - - int i; - char tmp[1024]; - - - if( argc == 1 ) { - - SHOW_HELPTEXT; - } - - - for( i= 1; i < argc; ++i ) { - - if( 0 == strcmp( argv[i], "-h" ) || 0 == strcmp( argv[i], "--help" )) { - - SHOW_HELPTEXT; - - } else if ( 0 == strcmp( argv[i], "--version" ) ) { - - printf( "%u.%u.%u %s\n", OTF_VERSION_MAJOR, OTF_VERSION_MINOR, OTF_VERSION_SUB, OTF_VERSION_STRING ); - - } else if ( 0 == strcmp( argv[i], "--have-zlib" ) ) { - -#ifdef HAVE_ZLIB - printf( "yes\n" ); -#else - printf( "no\n" ); -#endif - - } else if ( 0 == strcmp( argv[i], "--includes" ) ) { - - printf( "-I%s\n", OTFCONFIG_INCLUDEDIR ); - - } else if ( 0 == strcmp( argv[i], "--libs" ) ) { - -#ifdef HAVE_ZLIB - snprintf( tmp, sizeof(tmp) -1, "-L%s -lotf -lz\n", - OTFCONFIG_LIBDIR ); -#else /* HAVE_ZLIB */ - snprintf( tmp, sizeof(tmp) -1, "-L%s -lotf\n", - OTFCONFIG_LIBDIR ); -#endif /* HAVE_ZLIB */ - - printf( "%s", tmp ); - - } else if ( 0 == strcmp( argv[i], "--sizes" ) ) { - - /* print size of integer types */ - printf( " sizeof(%s)= %llu\n", " int8_t ", (long long unsigned) sizeof(int8_t) ); - printf( " sizeof(%s)= %llu\n", " int16_t ", (long long unsigned) sizeof(int16_t) ); - printf( " sizeof(%s)= %llu\n", " int32_t ", (long long unsigned) sizeof(int32_t) ); - printf( " sizeof(%s)= %llu\n", " int64_t ", (long long unsigned) sizeof(int64_t) ); - printf( " sizeof(%s)= %llu\n", " uint8_t ", (long long unsigned) sizeof(uint8_t) ); - printf( " sizeof(%s)= %llu\n", " uint16_t ", (long long unsigned) sizeof(uint16_t) ); - printf( " sizeof(%s)= %llu\n", " uint32_t ", (long long unsigned) sizeof(uint32_t) ); - printf( " sizeof(%s)= %llu\n", " uint64_t ", (long long unsigned) sizeof(uint64_t) ); - - } - } - - - return 0; -} diff --git a/externals/otf/tools/otfdump/Handler.cpp b/externals/otf/tools/otfdump/Handler.cpp deleted file mode 100644 index 6b954614a4539a0a0604f8b953c0bb0e6a5e0262..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfdump/Handler.cpp +++ /dev/null @@ -1,1483 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#include <cassert> - -#include "Handler.h" - -int printKeyValueList(Control* c, OTF_KeyValueList* list) { - - uint32_t key; - uint32_t type; - uint32_t i = 0; - uint8_t j = 0; - OTF_Value value; - - if( ! c->show_keyvalue || list->count <= 0 ) { - /* empty list */ - fprintf(c->outfile, "\n"); - - return 0; - } - - fprintf(c->outfile, ", KeyValue: "); - - while( ! OTF_KeyValueList_getKeyByIndex( list, i, &key) ) { - - type = OTF_KeyValueList_getTypeForKey( list, key ); - - switch( type ) { - case OTF_CHAR: - OTF_KeyValueList_getChar( list, key, &(value.otf_char) ); - fprintf(c->outfile, "%u:%c", key, value.otf_char); - - break; - case OTF_UINT8: - OTF_KeyValueList_getUint8( list, key, &(value.otf_uint8) ); - fprintf(c->outfile, "%u:%hu", key, value.otf_uint8); - - break; - - case OTF_INT8: - OTF_KeyValueList_getInt8( list, key, &(value.otf_int8) ); - fprintf(c->outfile, "%u:%hd", key, value.otf_int8); - - break; - - case OTF_UINT16: - OTF_KeyValueList_getUint16( list, key, &(value.otf_uint16) ); - fprintf(c->outfile, "%u:%hu", key, value.otf_uint16); - - break; - - case OTF_INT16: - OTF_KeyValueList_getInt16( list, key, &(value.otf_int16) ); - fprintf(c->outfile, "%u:%hd", key, value.otf_int16); - - break; - case OTF_UINT32: - OTF_KeyValueList_getUint32( list, key, &(value.otf_uint32) ); - fprintf(c->outfile, "%u:%u", key, value.otf_uint32); - - break; - - case OTF_INT32: - OTF_KeyValueList_getInt32( list, key, &(value.otf_int32) ); - fprintf(c->outfile, "%u:%d", key, value.otf_int32); - - break; - - case OTF_UINT64: - OTF_KeyValueList_getUint64( list, key, &(value.otf_uint64) ); - fprintf(c->outfile, "%u:%llu", key, - (unsigned long long int)value.otf_uint64); - - break; - - case OTF_INT64: - OTF_KeyValueList_getInt64( list, key, &(value.otf_int64) ); - fprintf(c->outfile, "%u:%lld", key, - (long long int)value.otf_int64); - - break; - - case OTF_FLOAT: - OTF_KeyValueList_getFloat( list, key, &(value.otf_float) ); - fprintf(c->outfile, "%u:%.3f", key, value.otf_float); - - break; - - case OTF_DOUBLE: - OTF_KeyValueList_getDouble( list, key, &(value.otf_double) ); - fprintf(c->outfile, "%u:%.3f", key, value.otf_double); - - break; - - case OTF_BYTE_ARRAY: - OTF_KeyValueList_getByteArray( list, key, value.otf_byte_array.array, &(value.otf_byte_array.len) ); - - fprintf(c->outfile, "%u:", key); - - for( j = 0; j < value.otf_byte_array.len; j++ ) { - - fprintf(c->outfile, "%02hX", value.otf_byte_array.array[j]); - - } - - break; - } - - i++; - - if( i < list->count ) { - fprintf(c->outfile, ", "); - } - } - - fprintf(c->outfile, "\n"); - - return 0; -} - -int handleDefinitionComment( void* userData, uint32_t stream, - const char* comment, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - if( c->records[OTF_DEFINITIONCOMMENT_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefComment: stream %u, comment \"%s\"", - (long long unsigned) c->num, stream, comment ); - - printKeyValueList(c, kvlist); - } - } - - return OTF_RETURN_OK; -} - - -int handleDefTimerResolution( void* userData, uint32_t stream, - uint64_t ticksPerSecond, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFTIMERRESOLUTION_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefTimerResolution: stream %u, TicksPerSecond %llu", - (long long unsigned) c->num, stream, - (long long unsigned) ticksPerSecond ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleDefProcess( void* userData, uint32_t stream, uint32_t process, - const char* name, uint32_t parent, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFPROCESS_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefProcess: stream %u, process %u, name \"%s\", parent %u", - (long long unsigned) c->num, stream, process, name, parent ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleDefProcessGroup( void* userData, uint32_t stream, - uint32_t group, const char* name, uint32_t numberOfProcs, - const uint32_t* procs, OTF_KeyValueList* kvlist ) { - - - uint32_t i; - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFPROCESSGROUP_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefProcessGroup: stream %u, group %u, name \"%s\", procs ", - (long long unsigned) c->num, stream, group, name ); - - for( i= 0; i < (numberOfProcs - 1); ++i ) { - fprintf( c->outfile, "%u, ", procs[i] ); - } - - fprintf( c->outfile, "%u", procs[i] ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - -int handleDefAttributeList( void* userData, uint32_t stream, - uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE* array, - OTF_KeyValueList* kvlist ) { - - - uint32_t i; - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFATTRLIST_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefAttributeList: stream %u, attr_token %u, attributes ", - (long long unsigned) c->num, stream, attr_token); - - for( i= 0; i < (num - 1); ++i ) { - fprintf( c->outfile, "%u, ", array[i] ); - } - - fprintf( c->outfile, "%u", array[i] ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - -int handleDefProcessOrGroupAttributes( void* userData, uint32_t stream, - uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFPROCESSORGROUPATTR_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefProcessOrGroupAttributes: stream %u, process %u, attr_token %u", - (long long unsigned) c->num, stream, proc_token, attr_token); - - printKeyValueList(c, kvlist); - } - } - - - - - return OTF_RETURN_OK; -} - -int handleDefFunction( void* userData, uint32_t stream, uint32_t func, - const char* name, uint32_t funcGroup, uint32_t source, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFFUNCTION_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefFunction: stream %u, function %u, name \"%s\", group %u, source %u", - (long long unsigned) c->num, stream, func, name, funcGroup, source ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleDefFunctionGroup( void* userData, uint32_t stream, - uint32_t funcGroup, const char* name, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFFUNCTIONGROUP_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefFunctionGroup: stream %u, group %u, name \"%s\"", - (long long unsigned) c->num, stream, funcGroup, name ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleDefCollectiveOperation( void* userData, uint32_t stream, - uint32_t collOp, const char* name, uint32_t type, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFCOLLOP_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefCollective: stream %u, collective %u, name \"%s\", type %u", - (long long unsigned) c->num, stream, collOp, name, type ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleDefCounter( void* userData, uint32_t stream, uint32_t counter, - const char* name, uint32_t properties, uint32_t counterGroup, - const char* unit, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFCOUNTER_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefCounter: stream %u, counter %u, name \"%s\", properties %u, group %u, unit \"%s\"", - (long long unsigned) c->num, stream, counter, name, properties, counterGroup, unit ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleDefCounterGroup( void* userData, uint32_t stream, - uint32_t counterGroup, const char* name, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFCOUNTERGROUP_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefCounterGroup: stream %u, group %u, name \"%s\"", - (long long unsigned) c->num, stream, counterGroup, name ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleDefScl( void* userData, uint32_t stream, uint32_t source, - uint32_t sourceFile, uint32_t line, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFSCL_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefScl: stream %u, source %u, file %u, line %u", - (long long unsigned) c->num, stream, source, sourceFile, line ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleDefSclFile( void* userData, uint32_t stream, - uint32_t sourceFile, const char* name, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFSCLFILE_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefSclFile: stream %u, file %u, name \"%s\"", - (long long unsigned) c->num, stream, sourceFile, name ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleDefCreator( void* userData, uint32_t stream, - const char* creator, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFCREATOR_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefCreator: stream %u, creator \"%s\"", - (long long unsigned) c->num, stream, creator ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleDefVersion( void* userData, uint32_t stream, uint8_t major, - uint8_t minor, uint8_t sub, const char* string ) { - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFVERSION_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefVersion: stream %u, version: %u.%u.%u \"%s\"\n", - (long long unsigned) c->num, stream, major, minor, sub, string ); - } - } - - - return OTF_RETURN_OK; -} - - -int handleDefFile( void* userData, uint32_t stream, - uint32_t token, const char *name, - uint32_t group, OTF_KeyValueList* kvlist ) -{ - Control* c= (Control*) userData; - - if( c->records[OTF_DEFFILE_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefFile: %s, stream %llu, " - "token %llu, group %llu", - (long long unsigned) c->num, name, (long long unsigned) stream, - (long long unsigned) token, (long long unsigned) group ); - - printKeyValueList(c, kvlist); - } - } - return OTF_RETURN_OK; -} - - -int handleDefFileGroup( void* userData, uint32_t stream, - uint32_t token, const char *name, OTF_KeyValueList* kvlist ) -{ - Control* c= (Control*) userData; - - if( c->records[OTF_DEFFILEGROUP_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefFileGroup: %s, token %llu, " - "stream %llu", - (long long unsigned) c->num, name, - (long long unsigned) token, (long long unsigned) stream); - - printKeyValueList(c, kvlist); - } - } - return OTF_RETURN_OK; -} - - -int handleDefKeyValue( void *userData, uint32_t streamid, uint32_t token, OTF_Type type, - const char *name, const char* desc, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_DEFKEYVALUE_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \tDefKeyValue: stream %u, token %u, type %u, name \"%s\", desc \"%s\"", - (long long unsigned) c->num, streamid, token, type, name, desc ); - - printKeyValueList(c, kvlist); - } - } - - return OTF_RETURN_OK; -} - - -int handleNoOp( void* userData, uint64_t time, uint32_t process, - OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_NOOP_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu NoOp: process %u", - (long long unsigned) c->num, (long long unsigned) time, - process ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - -int handleEnter( void* userData, uint64_t time, uint32_t function, - uint32_t process, uint32_t source, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_ENTER_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu Enter: function %u, process %u, source %u", - (long long unsigned) c->num, (long long unsigned) time, - function, process, source ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleLeave( void* userData, uint64_t time, uint32_t function, - uint32_t process, uint32_t source, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_LEAVE_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu Leave: function %u, process %u, source %u", - (long long unsigned) c->num, (long long unsigned) time, - function, process, source); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleSendMsg( void* userData, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t group, uint32_t type, uint32_t length, - uint32_t source, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_SEND_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu SendMessage: sender %u, receiver %u, group %u, type %u, length %u, source %u", - (long long unsigned) c->num, (long long unsigned) time, - sender, receiver, group, type, length, source ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleRecvMsg( void* userData, uint64_t time, uint32_t recvProc, - uint32_t sendProc, uint32_t group, uint32_t type, uint32_t length, - uint32_t source, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_RECEIVE_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu ReceiveMessage: receiver %u, sender %u, group %u, type %u, length %u, source %u", - (long long unsigned) c->num, (long long unsigned) time, - recvProc, sendProc, group, type, length, source ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleCounter( void* userData, uint64_t time, uint32_t process, - uint32_t counter, uint64_t value, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_COUNTER_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu Counter: process %u, counter %u, value %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, counter, (long long unsigned) value ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint32_t collective, uint32_t procGroup, - uint32_t rootProc, uint32_t sent, uint32_t received, uint64_t duration, - uint32_t source, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_COLLOP_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu Collective: process %u, collective %u, group %u, root %u, sent %u, received %u, duration %llu, source %u", - (long long unsigned) c->num, (long long unsigned) time, - process, collective, procGroup, rootProc, sent, received, - (long long unsigned) duration, source ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleBeginCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint32_t collOp, uint64_t matchingId, - uint32_t procGroup, uint32_t rootProc, uint64_t sent, - uint64_t received, uint32_t scltoken, OTF_KeyValueList* kvlist ) -{ - Control* c = (Control*) userData; - - if( c->records[OTF_BEGINCOLLOP_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu BeginCollective: " - "process %u, collective %u, " - "group %u, matchinId %llu, " - "root %u, sent %llu, " - "received %llu, source %u", - (long long unsigned) c->num, - (long long unsigned) time, process, - collOp, procGroup, - (long long unsigned) matchingId, - rootProc, - (long long unsigned) sent, - (long long unsigned) received, - scltoken ); - - printKeyValueList(c, kvlist); - } - } - - return OTF_RETURN_OK; -} - - -int handleEndCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint64_t matchingId, OTF_KeyValueList* kvlist ) -{ - Control* c = (Control*) userData; - - if( c->records[OTF_ENDCOLLOP_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu EndCollective: " - "process %u, matchingId %llu", - (long long unsigned) c->num, - (long long unsigned) time, process, - (long long unsigned) matchingId ); - - printKeyValueList(c, kvlist); - } - } - - return OTF_RETURN_OK; -} - - -int handleEventComment( void* userData, uint64_t time, uint32_t process, - const char* comment, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_EVENTCOMMENT_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu EventComment: process %u, comment \"%s\"", - (long long unsigned) c->num, (long long unsigned) time, - process, comment ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleBeginProcess( void* userData, uint64_t time, uint32_t process, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_BEGINPROCESS_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu BeginProcess: process %u", - (long long unsigned) c->num, (long long unsigned) time, - process ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleEndProcess( void* userData, uint64_t time, uint32_t process, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_ENDPROCESS_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu EndProcess: process %u", - (long long unsigned) c->num, (long long unsigned) time, - process ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleSnapshotComment( void* userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_SNAPSHOTCOMMENT_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu SnapComment: process %u, comment \"%s\"", - (long long unsigned) c->num, (long long unsigned) time, - process, comment ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleEnterSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t function, uint32_t process, - uint32_t source, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_ENTERSNAPSHOT_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu SnapEnter: otime %llu, process %u, function %u, source %u", - (long long unsigned) c->num, (long long unsigned) time, - (long long unsigned) originaltime, process, function, source ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleSendSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t tag, uint32_t length, uint32_t source, - OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_SENDSNAPSHOT_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu SnapSend: otime %llu, sender %u, receiver %u, group %u, tag %u, length %u, source %u", - (long long unsigned) c->num, (long long unsigned) time, - (long long unsigned) originaltime, sender, receiver, procGroup, - tag, length, source ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleOpenFileSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, - uint32_t source, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_OPENFILESNAPSHOT_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu SnapOpenFile: otime %llu, process %u, fileid %u," - " handle ID %llu, source %u", - (long long unsigned) c->num, (long long unsigned) time, - (long long unsigned) originaltime, process, fileid, - (long long unsigned) handleid, source ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleBeginCollopSnapshot( void *userData, uint64_t time, uint64_t originaltime, - uint32_t process, uint32_t collOp, uint64_t matchingId, uint32_t procGroup, - uint32_t rootProc, uint64_t sent, uint64_t received, uint32_t scltoken, - OTF_KeyValueList *kvlist) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_BEGINCOLLOPSNAPSHOT_RECORD ] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu SnapBeginCollop: otime %llu, process %u, collOp %u," - " matchingID %llu, group %u, root %u, sent %llu, received %llu, source %u", - (long long unsigned) c->num, (long long unsigned) time, - (long long unsigned) originaltime, process, collOp, - (long long unsigned) matchingId, procGroup, rootProc, - (long long unsigned) sent, (long long unsigned) received, scltoken ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleBeginFileOpSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, - uint32_t scltoken, OTF_KeyValueList *kvlist) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_BEGINFILEOPSNAPSHOT_RECORD ] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu SnapBeginFileOp: otime %llu, process %u," - " matchingID %llu, source %u", - (long long unsigned) c->num, (long long unsigned) time, - (long long unsigned) originaltime, process, - (long long unsigned) matchingId, scltoken ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleSummaryComment( void * userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_SUMMARYCOMMENT_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu StatComment: process %u, comment \"%s\"", - (long long unsigned) c->num, (long long unsigned) time, - process, comment ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleFunctionSummary( void* userData, uint64_t time, - uint32_t function, uint32_t process, uint64_t invocations, - uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_FUNCTIONSUMMARY_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu StatFunction: process %u, function %u, invocations %llu, excltime %llu, incltime %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, function, (long long unsigned) invocations, - (long long unsigned) exclTime, (long long unsigned) inclTime ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleFunctionGroupSummary( void* userData, uint64_t time, - uint32_t funcGroup, uint32_t process, uint64_t invocations, - uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_FUNCTIONGROUPSUMMARY_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu StatFunctionGroup: process %u, group %u, invocations %llu, excltime %llu, incltime %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, funcGroup, (long long unsigned) invocations, - (long long unsigned) exclTime, (long long unsigned) inclTime ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleMessageSummary( void* userData, uint64_t time, uint32_t process, - uint32_t peer, uint32_t comm, uint32_t type, uint64_t sentNumber, - uint64_t receivedNumber, uint64_t sentBytes, uint64_t receivedBytes, - OTF_KeyValueList* kvlist ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_MESSAGESUMMARY_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu StatMessage: process %u, " - "peer %u, group %u, type %u, numsent %llu, numreceived %llu, " - "bytessent %llu, bytesreceived %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, peer, comm, type, (long long unsigned) sentNumber, - (long long unsigned) receivedNumber, (long long unsigned) sentBytes, - (long long unsigned) receivedBytes ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleCollopSummary( void* userData, uint64_t time, uint32_t process, - uint32_t comm, uint32_t collective, uint64_t sentNumber, uint64_t receivedNumber, - uint64_t sentBytes, uint64_t receivedBytes, OTF_KeyValueList* kvlist) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_COLLOPSUMMARY_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu StatCollOp: process %u, group %u, " - "col %u, numsent %llu, numreceived %llu, " - "bytessent %llu, bytesreceived %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, comm, collective, (long long unsigned) sentNumber, - (long long unsigned) receivedNumber, (long long unsigned) sentBytes, - (long long unsigned) receivedBytes ); - - printKeyValueList(c, kvlist); - } - } - - - return OTF_RETURN_OK; -} - - -int handleFileOperation( void* userData, uint64_t time, - uint32_t fileid, uint32_t process, - uint64_t handleid, uint32_t operation, - uint64_t bytes, uint64_t duration, - uint32_t source, OTF_KeyValueList* kvlist ) -{ - Control* c= (Control*) userData; - - if( c->records[OTF_FILEOPERATION_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu FileOperation: file ID %llu, " - "process %llu, handle ID %llu, operation %llu, " - "bytes %llu, duration %llu, source %llu", - (long long unsigned) c->num, (long long unsigned) time, - (long long unsigned) fileid, (long long unsigned) process, - (long long unsigned) handleid, (long long unsigned) operation, - (long long unsigned) bytes, (long long unsigned) duration, - (long long unsigned) source); - - printKeyValueList(c, kvlist); - } - } - return OTF_RETURN_OK; -} - - -int handleBeginFileOperation( void* userData, uint64_t time, - uint32_t process, uint64_t matchingId, uint32_t scltoken, - OTF_KeyValueList* kvlist ) -{ - Control* c = (Control*) userData; - - if( c->records[OTF_BEGINFILEOP_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu BeginFileOperation: " - "process %llu, matching ID %llu, " - "source %llu", - (long long unsigned) c->num, - (long long unsigned) time, - (long long unsigned) process, - (long long unsigned) matchingId, - (long long unsigned) scltoken ); - - printKeyValueList(c, kvlist); - } - } - return OTF_RETURN_OK; -} - - -int handleEndFileOperation( void* userData, uint64_t time, - uint32_t process, uint32_t fileid, uint64_t matchingId, - uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList* kvlist ) -{ - Control* c = (Control*) userData; - - if( c->records[OTF_ENDFILEOP_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu EndFileOperation: " - "process %llu, file ID %llu, " - "matching ID %llu, handle ID %llu, operation %llu, " - "bytes %llu, source %llu", - (long long unsigned) c->num, - (long long unsigned) time, - (long long unsigned) process, - (long long unsigned) fileid, - (long long unsigned) matchingId, - (long long unsigned) handleId, - (long long unsigned) operation, - (long long unsigned) bytes, - (long long unsigned) scltoken ); - - printKeyValueList(c, kvlist); - } - } - return OTF_RETURN_OK; -} - - -int handleRMAPut( void* userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, - uint64_t bytes, uint32_t source, OTF_KeyValueList* kvlist ) -{ - Control* c= (Control*) userData; - - if( c->records[OTF_RMAPUT_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - if( origin != 0 ) { - /* transfer initiated from 3rd-party process */ - fprintf( c->outfile, "(#%llu) \t%llu RMAPut: initiator %u, " - "origin %u, target %u, communicator %u, " - "tag %u, bytes %llu, source %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, origin, target, - communicator, tag, (long long unsigned) bytes, - (long long unsigned) source); - } - else { - fprintf( c->outfile, "(#%llu) \t%llu RMAPut: " - "origin %u, target %u, communicator %u, " - "tag %u, bytes %llu, source %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, target, - communicator, tag, (long long unsigned) bytes, - (long long unsigned) source); - } - - printKeyValueList(c, kvlist); - } - } - return OTF_RETURN_OK; -} - - -int handleRMAPutRemoteEnd( void* userData, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source, OTF_KeyValueList* kvlist ) -{ - Control* c= (Control*) userData; - - if( c->records[OTF_RMAPUTRE_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - if( origin != 0 ) { - /* transfer initiated from 3rd-party process */ - fprintf( c->outfile, "(#%llu) \t%llu RMAPutRemoteEnd: initiator %u, " - "origin %u, target %u, communicator %u, " - "tag %u, bytes %llu, source %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, origin, target, - communicator, tag, (long long unsigned) bytes, - (long long unsigned) source); - } - else { - fprintf( c->outfile, "(#%llu) \t%llu RMAPutRemoteEnd: " - "origin %u, target %u, communicator %u, " - "tag %u, bytes %llu, source %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, target, - communicator, tag, (long long unsigned) bytes, - (long long unsigned) source); - } - - printKeyValueList(c, kvlist); - } - } - return OTF_RETURN_OK; -} - - -int handleRMAGet( void* userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, - uint64_t bytes, uint32_t source, OTF_KeyValueList* kvlist) -{ - Control* c= (Control*) userData; - - if( c->records[OTF_RMAGET_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - if( origin != 0 ) { - /* transfer initiated from 3rd-party process */ - fprintf( c->outfile, "(#%llu) \t%llu RMAGet: initiator %u, " - "origin %u, target %u, communicator %u, " - "tag %u, bytes %llu, source %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, origin, target, - communicator, tag, (long long unsigned) bytes, - (long long unsigned) source); - } - else { - fprintf( c->outfile, "(#%llu) \t%llu RMAGet: " - "origin %u, target %u, communicator %u, " - "tag %u, bytes %llu, source %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, target, - communicator, tag, (long long unsigned) bytes, - (long long unsigned) source); - } - - printKeyValueList(c, kvlist); - } - } - return OTF_RETURN_OK; -} - - -int handleRMAEnd( void* userData, uint64_t time, uint32_t process, - uint32_t remote, uint32_t communicator, uint32_t tag, - uint32_t source, OTF_KeyValueList* kvlist ) -{ - Control* c= (Control*) userData; - - if( c->records[OTF_RMAEND_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - if( remote != 0 ) { - /* transfer initiated from 3rd-party process */ - fprintf( c->outfile, "(#%llu) \t%llu RMAEnd: initiator %u, " - "remote %u, communicator %u, " - "tag %u, source %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, remote, - communicator, tag, - (long long unsigned) source); - } - else { - fprintf( c->outfile, "(#%llu) \t%llu RMAEnd: " - "process %u, communicator %u, " - "tag %u, source %llu", - (long long unsigned) c->num, (long long unsigned) time, - process, communicator, tag, - (long long unsigned) source); - } - - printKeyValueList(c, kvlist); - } - } - return OTF_RETURN_OK; -} - - -int handleUnknown( void* userData, uint64_t time, uint32_t process, - const char* record ) { - - - Control* c= (Control*) userData; - - - if( c->records[OTF_UNKNOWN_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu Unknown: process %u, record \"%s\"\n", - (long long unsigned) c->num, (long long unsigned) time, - process, record ); - } - } - - - return OTF_RETURN_OK; -} - - -int handleDefMarker( void *userData, uint32_t stream, uint32_t token, const char* name, - uint32_t type, OTF_KeyValueList* kvlist ) { - - Control* c= (Control*) userData; - - if( c->records[OTF_DEFMARKER_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) DefMarker: ID %u, name \"%s\", type %u", - (long long unsigned) c->num, token, name, type ); - - printKeyValueList(c, kvlist); - } - } - - return OTF_RETURN_OK; -} - - -int handleMarker( void *userData, uint64_t time, uint32_t process, - uint32_t token, const char* text, OTF_KeyValueList* kvlist ) { - - Control* c= (Control*) userData; - - if( c->records[OTF_MARKER_RECORD] ) { - - ++c->num; - if( c->num >= c->minNum && c->num <= c->maxNum && ! c->silent_mode ) { - - fprintf( c->outfile, "(#%llu) \t%llu Marker: ID %u, process %u, text \"%s\"", - (long long unsigned) c->num, (long long unsigned) time, token, process, text ); - - printKeyValueList(c, kvlist); - } - } - - return OTF_RETURN_OK; - -} - diff --git a/externals/otf/tools/otfdump/Handler.h b/externals/otf/tools/otfdump/Handler.h deleted file mode 100644 index 41023ad727d3ac148c9d0b880fb1e14abb770333..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfdump/Handler.h +++ /dev/null @@ -1,229 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef OTFTOVTF3_HANDLER_H -#define OTFTOVTF3_HANDLER_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "OTF_inttypes.h" - -#include "otf.h" - -typedef struct { - - - uint64_t num; - - uint64_t minNum; - uint64_t maxNum; - - bool show_keyvalue; - bool silent_mode; - - bool records[OTF_NRECORDS]; /* enabled record types */ - - FILE* outfile; - -} Control; - - -int printKeyValueList(Control* c, OTF_KeyValueList* list); - - -/* *** Definition handler *** ************************************* */ - -int handleDefinitionComment( void* userData, uint32_t stream, - const char* comment, OTF_KeyValueList* kvlist ); - -int handleDefTimerResolution( void* userData, uint32_t stream, - uint64_t ticksPerSecond, OTF_KeyValueList* kvlist ); - -int handleDefProcess( void* userData, uint32_t stream, uint32_t process, - const char* name, uint32_t parent, OTF_KeyValueList* kvlist ); - -int handleDefProcessGroup( void* userData, uint32_t stream, - uint32_t procGroup, const char* name, uint32_t numberOfProcs, - const uint32_t* procs, OTF_KeyValueList* kvlist ); - -int handleDefAttributeList( void* userData, uint32_t stream, - uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE* list, - OTF_KeyValueList* kvlist ); - -int handleDefProcessOrGroupAttributes( void* userData, uint32_t stream, - uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList* kvlist ); - -int handleDefFunction( void* userData, uint32_t stream, uint32_t func, - const char* name, uint32_t funcGroup, uint32_t source, OTF_KeyValueList* kvlist ); - -int handleDefFunctionGroup( void* userData, uint32_t stream, - uint32_t funcGroup, const char* name, OTF_KeyValueList* kvlist ); - -int handleDefCollectiveOperation( void* userData, uint32_t stream, - uint32_t collOp, const char* name, uint32_t type, OTF_KeyValueList* kvlist ); - -int handleDefCounter( void* userData, uint32_t stream, uint32_t counter, - const char* name, uint32_t properties, uint32_t counterGroup, - const char* unit, OTF_KeyValueList* kvlist ); - -int handleDefCounterGroup( void* userData, uint32_t stream, - uint32_t counterGroup, const char* name, OTF_KeyValueList* kvlist ); - -int handleDefScl( void* userData, uint32_t stream, uint32_t source, - uint32_t sourceFile, uint32_t line, OTF_KeyValueList* kvlist ); - -int handleDefSclFile( void* userData, uint32_t stream, - uint32_t sourceFile, const char* name, OTF_KeyValueList* kvlist ); - -int handleDefCreator( void* userData, uint32_t stream, - const char* creator, OTF_KeyValueList* kvlist ); - -int handleDefVersion( void* userData, uint32_t stream, uint8_t major, - uint8_t minor, uint8_t sub, const char* string ); - -int handleDefKeyValue( void *userData, uint32_t streamid, uint32_t token, - OTF_Type type, const char *name, const char *desc, OTF_KeyValueList* kvlist ); - - -int handleNoOp( void* userData, uint64_t time, uint32_t process, - OTF_KeyValueList* kvlist ); - -int handleEnter( void* userData, uint64_t time, uint32_t function, - uint32_t process, uint32_t source, OTF_KeyValueList* kvlist ); - -int handleLeave( void* userData, uint64_t time, uint32_t function, - uint32_t process, uint32_t source, OTF_KeyValueList* kvlist ); - -int handleSendMsg( void* userData, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t group, uint32_t type, uint32_t length, - uint32_t source, OTF_KeyValueList* kvlist ); - -int handleRecvMsg( void* userData, uint64_t time, uint32_t recvProc, - uint32_t sendProc, uint32_t group, uint32_t type, uint32_t length, - uint32_t source, OTF_KeyValueList* kvlist ); - -int handleCounter( void* userData, uint64_t time, uint32_t process, - uint32_t counter, uint64_t value, OTF_KeyValueList* kvlist ); - -int handleCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint32_t collective, uint32_t procGroup, - uint32_t rootProc, uint32_t sent, uint32_t received, uint64_t duration, - uint32_t source, OTF_KeyValueList* kvlist ); - -int handleBeginCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint32_t collOp, uint64_t matchingId, - uint32_t procGroup, uint32_t rootprocess, uint64_t sent, - uint64_t received, uint32_t scltoken, OTF_KeyValueList* kvlist ); - -int handleEndCollectiveOperation( void* userData, uint64_t time, - uint32_t process, uint64_t matchingId, OTF_KeyValueList* kvlist ); - -int handleEventComment( void* userData, uint64_t time, uint32_t process, - const char* comment, OTF_KeyValueList* kvlist ); - -int handleBeginProcess( void* userData, uint64_t time, uint32_t process, - OTF_KeyValueList* kvlist ); - -int handleEndProcess( void* userData, uint64_t time, uint32_t process, - OTF_KeyValueList* kvlist ); - - -int handleSnapshotComment( void* userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* kvlist ); - -int handleEnterSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t function, uint32_t process, - uint32_t source, OTF_KeyValueList* kvlist ); - -int handleSendSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t sender, uint32_t receiver, - uint32_t procGroup, uint32_t tag, uint32_t length, uint32_t source, - OTF_KeyValueList* kvlist ); - -int handleOpenFileSnapshot( void* userData, uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, uint64_t handleid, - uint32_t source, OTF_KeyValueList* kvlist ); - -int handleBeginCollopSnapshot( void *userData, uint64_t time, uint64_t originaltime, - uint32_t process, uint32_t collOp, uint64_t matchingId, uint32_t procGroup, - uint32_t rootProc, uint64_t sent, uint64_t received, uint32_t scltoken, - OTF_KeyValueList *list); - -int handleBeginFileOpSnapshot( void *userData, uint64_t time, uint64_t originaltime, - uint32_t process, uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *list); - - -int handleSummaryComment( void * userData, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList* kvlist ); - -int handleFunctionSummary( void* userData, uint64_t time, - uint32_t function, uint32_t process, uint64_t invocations, - uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList* kvlist ); - -int handleFunctionGroupSummary( void* userData, uint64_t time, - uint32_t funcGroup, uint32_t process, uint64_t invocations, - uint64_t exclTime, uint64_t inclTime, OTF_KeyValueList* kvlist ); - -int handleMessageSummary( void* userData, uint64_t time, uint32_t process, - uint32_t peer, uint32_t comm, uint32_t type, uint64_t sentNumber, - uint64_t receivedNumber, uint64_t sentBytes, uint64_t receivedBytes, - OTF_KeyValueList* kvlist ); - -int handleCollopSummary( void* userData, uint64_t time, uint32_t process, - uint32_t comm, uint32_t collective, uint64_t sentNumber, uint64_t receivedNumber, - uint64_t sentBytes, uint64_t receivedBytes, OTF_KeyValueList* kvlist); - -int handleDefFile( void* userData, uint32_t stream, - uint32_t token, const char *name, - uint32_t group, OTF_KeyValueList* kvlist ); - -int handleDefFileGroup( void* userData, uint32_t stream, - uint32_t token, const char *name, OTF_KeyValueList* kvlist ); - -int handleFileOperation( void* userData, uint64_t time, - uint32_t fileid, uint32_t process, - uint64_t handleid, uint32_t operation, - uint64_t bytes, uint64_t duration, - uint32_t source, OTF_KeyValueList* kvlist ); - -int handleBeginFileOperation( void* userData, uint64_t time, uint32_t process, - uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList* kvlist ); - -int handleEndFileOperation( void* userData, uint64_t time, uint32_t process, - uint32_t fileid, uint64_t matchingId, uint64_t handleId, uint32_t operation, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* kvlist ); - -int handleRMAPut( void* userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* kvlist ); - -int handleRMAPutRemoteEnd( void* userData, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList* kvlist ); - -int handleRMAGet( void* userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList* kvlist); - -int handleRMAEnd( void* userData, uint64_t time, uint32_t process, - uint32_t remote, uint32_t communicator, uint32_t tag, - uint32_t scltoken, OTF_KeyValueList* kvlist ); - -int handleUnknown( void* fcb, uint64_t time, uint32_t process, - const char* record ); - - -int handleDefMarker( void *userData, uint32_t stream, uint32_t token, const char* name, - uint32_t type, OTF_KeyValueList* kvlist ); - -int handleMarker( void *userData, uint64_t time, uint32_t process, - uint32_t token, const char* text, OTF_KeyValueList* kvlist ); - - -#endif /* OTFTOVTF3_HANDLER_H */ diff --git a/externals/otf/tools/otfdump/Makefile.am b/externals/otf/tools/otfdump/Makefile.am deleted file mode 100644 index 593d070fcc3a5b21e6db2eb2a8690a0d87832c9f..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfdump/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib - -if AMBUILDBINARIES -bin_PROGRAMS = \ - otfdump -endif - -otfdump_LDADD = $(top_builddir)/otflib/libotf.la -otfdump_DEPENDENCIES = $(otfdump_LDADD) -otfdump_SOURCES = \ - Makefile.am \ - Handler.h \ - Handler.cpp \ - otfdump.cpp - -EXTRA_DIST = \ - otfdump_vs08.vcproj - diff --git a/externals/otf/tools/otfdump/Makefile.in b/externals/otf/tools/otfdump/Makefile.in deleted file mode 100644 index 6dd099a372d153909a9756d61917f6d9e112c412..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfdump/Makefile.in +++ /dev/null @@ -1,609 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@AMBUILDBINARIES_TRUE@bin_PROGRAMS = otfdump$(EXEEXT) -subdir = tools/otfdump -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_otfdump_OBJECTS = Handler.$(OBJEXT) otfdump.$(OBJEXT) -otfdump_OBJECTS = $(am_otfdump_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) -am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CXXLD_0 = @echo " CXXLD " $@; -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(otfdump_SOURCES) -DIST_SOURCES = $(otfdump_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib -otfdump_LDADD = $(top_builddir)/otflib/libotf.la -otfdump_DEPENDENCIES = $(otfdump_LDADD) -otfdump_SOURCES = \ - Makefile.am \ - Handler.h \ - Handler.cpp \ - otfdump.cpp - -EXTRA_DIST = \ - otfdump_vs08.vcproj - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/otfdump/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/otfdump/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -otfdump$(EXEEXT): $(otfdump_OBJECTS) $(otfdump_DEPENDENCIES) - @rm -f otfdump$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(otfdump_OBJECTS) $(otfdump_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Handler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfdump.Po@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS 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-binPROGRAMS - -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: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - 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-binPROGRAMS 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 \ - uninstall-binPROGRAMS - - -# 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/externals/otf/tools/otfdump/otfdump.cpp b/externals/otf/tools/otfdump/otfdump.cpp deleted file mode 100644 index 276ec4226d3fc59e07c0cf5eced83927ffc23bea..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfdump/otfdump.cpp +++ /dev/null @@ -1,648 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - - -#include "Handler.h" - -#include <assert.h> -#include <stdlib.h> -#include <stdio.h> -#include <time.h> - -#include <vector> - -using namespace std; - -#if SIZEOF_LONG == 4 -# define ATOL8 atoll -#else -# define ATOL8 atol -#endif - -#define SHOW_HELPTEXT { \ - int l = 0; while( Helptext[l] ) { printf( "%s", Helptext[l++] ); } } - -static const char* Helptext[] = { -" \n", -" otfdump - convert otf traces or parts of it into a human readable, long \n", -" version \n", -" \n", -" Options: \n", -" -h, --help show this help message \n", -" -V show OTF version \n", -" -o <file> output file \n", -" if the ouput file is unspecified the stdout will be \n", -" used \n", -" \n", -" --num <a> <b> output only records no. [a,b] \n", -" --time <a> <b> output only records with time stamp in [a,b] \n", -" \n", -" --nodef omit definition records \n", -" --noevent omit event records \n", -" --nostat omit statistic records \n", -" --nosnap omit snapshot records \n", -" --nomarker omit marker records \n", -" \n", -" --nokeyvalue omit key-value pairs \n", -" \n", -" --procs <a> show only processes <a> \n", -" <a> is a space-seperated list of process-tokens \n", -" --records <a> show only records <a> \n", -" <a> is a space-seperated list of record-type-numbers \n", -" record-type-numbers can be found in OTF_Definitions.h \n", -" (OTF_*_RECORD) \n", -" \n", -" -s, --silent do not display anything except the time otfdump \n", -" needed to read the tracefile \n", -" \n", NULL }; - -int main ( int argc, const char** argv ) { - - - const char* infile= NULL; - int buffersize= 4*1024; - - OTF_FileManager* manager; - OTF_Reader* reader; - - OTF_HandlerArray* handlers; - - vector<uint32_t> enabledRecords; - - bool def= true; - bool event= true; - bool stat= true; - bool snap= true; - bool marker= true; - - uint64_t mintime= 0; - uint64_t maxtime= (uint64_t) -1; - uint64_t read; - - uint64_t start_t, end_t; - - Control fha; - fha.num= 0; - fha.minNum= 0; - fha.maxNum= (uint64_t) -1; - fha.outfile= stdout; - fha.show_keyvalue = true; - fha.silent_mode = false; - for( uint32_t i= 0; i < OTF_NRECORDS; ++i ) { - - fha.records[i]= true; - } - - - /* argument handling */ - - if ( 1 >= argc ) { - - SHOW_HELPTEXT; - exit(0); - } - - for ( int i = 1; i < argc; i++ ) { - - if ( ( 0 == strcmp( "-b", argv[i] ) ) && ( i+1 < argc ) ) { - - buffersize = atoi( argv[i+1] ); - ++i; - - } else if ( 0 == strcmp( "--help", argv[i] ) || 0 == strcmp( "-h", argv[i] ) ) { - - SHOW_HELPTEXT; - exit(0); - - } else if ( 0 == strcmp( "-V", argv[i] ) ) { - - printf( "%u.%u.%u \"%s\"\n", OTF_VERSION_MAJOR, OTF_VERSION_MINOR, - OTF_VERSION_SUB, OTF_VERSION_STRING); - exit( 0 ); - - } else if ( ( 0 == strcmp( "--num", argv[i] ) ) && ( i+2 < argc ) ) { - - fha.minNum= ATOL8( argv[i+1] ); - fha.maxNum= ATOL8( argv[i+2] ); - - i += 2; - - } else if ( ( 0 == strcmp( "--time", argv[i] ) ) && ( i+2 < argc ) ) { - - mintime= ATOL8( argv[i+1] ); - maxtime= ATOL8( argv[i+2] ); - - i += 2; - - }else if ( 0 == strcmp( "--nodef", argv[i] ) ) { - - def= false; - - } else if ( 0 == strcmp( "--noevent", argv[i] ) ) { - - event= false; - - } else if ( 0 == strcmp( "--nostat", argv[i] ) ) { - - stat= false; - - } else if ( 0 == strcmp( "--nosnap", argv[i] ) ) { - - snap= false; - - } else if ( 0 == strcmp( "--nomarker", argv[i] ) ) { - - marker= false; - - } else if ( 0 == strcmp( "--nokeyvalue", argv[i] ) ) { - - fha.show_keyvalue= false; - - } else if ( (0 == strcmp( "--procs", argv[i] )) && ( i+1 < argc ) ) { - - while( i+1 < argc && argv[i+1][0] >= '0' && argv[i+1][0] <= '9' ) { - - enabledRecords.push_back( atol(argv[i+1] ) ); - - ++i; - } - - } else if ( (0 == strcmp( "--records", argv[i] )) && ( i+1 < argc ) ) { - - bool error= false; - long a; - - for( a= 0; a < OTF_NRECORDS; ++a ) fha.records[a]= false; - - while( i+1 < argc && argv[i+1][0] >= '0' && argv[i+1][0] <= '9' ) { - - a= atol(argv[i+1]); - if ( a >= 0 && a < OTF_NRECORDS ) { - fha.records[a]= true; - i++; - } else { - fprintf( stderr, "ERROR: Unknown record-type-number '%li'.\n", a ); - error= true; - break; - } - } - - if ( error ) exit(1); - - } else if ( 0 == strcmp( "--silent", argv[i] ) || 0 == strcmp( "-s", argv[i] ) ) { - - fha.silent_mode = true; - - } else { - - if ( '-' != argv[i][0] ) { - - infile= argv[i]; - - } else { - - fprintf( stderr, "ERROR: Unknown argument '%s'.\n", argv[i] ); - exit(1); - } - } - } - - - if ( NULL == infile ) { - - printf( " no input file specified, abort\n" ); - exit(1); - } - - - /* open filemanager */ - manager= OTF_FileManager_open( 50 ); - assert( manager ); - - /* Open OTF Reader */ - reader= OTF_Reader_open( infile, manager ); - assert( reader ); - - OTF_Reader_setBufferSizes( reader, buffersize ); - - /* enable only the records needed */ - if( false == enabledRecords.empty() ) { - - OTF_Reader_setProcessStatusAll( reader, 0 ); - - for( uint32_t i= 0; i < enabledRecords.size(); ++i ) { - - OTF_Reader_setProcessStatus( reader, enabledRecords[i], 1 ); - } - } - - /* set timelimit */ - OTF_Reader_setTimeInterval( reader, mintime, maxtime ); - - - /* init handlers */ - handlers= OTF_HandlerArray_open(); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefinitionComment, - OTF_DEFINITIONCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFINITIONCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefTimerResolution, - OTF_DEFTIMERRESOLUTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFTIMERRESOLUTION_RECORD); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefProcess, - OTF_DEFPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefProcessGroup, - OTF_DEFPROCESSGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFPROCESSGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefAttributeList, - OTF_DEFATTRLIST_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFATTRLIST_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefProcessOrGroupAttributes, - OTF_DEFPROCESSORGROUPATTR_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFPROCESSORGROUPATTR_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFunction, - OTF_DEFFUNCTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFFUNCTION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFunctionGroup, - OTF_DEFFUNCTIONGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFFUNCTIONGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCounter, - OTF_DEFCOUNTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFCOUNTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCounterGroup, - OTF_DEFCOUNTERGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFCOUNTERGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefScl, - OTF_DEFSCL_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFSCL_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefSclFile, - OTF_DEFSCLFILE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFSCLFILE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCreator, - OTF_DEFCREATOR_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFCREATOR_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefVersion, - OTF_DEFVERSION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFVERSION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFile, - OTF_DEFFILE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFFILE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFileGroup, - OTF_DEFFILEGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFFILEGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCollectiveOperation, - OTF_DEFCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_DEFCOLLOP_RECORD ); - - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleNoOp, - OTF_NOOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_NOOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEventComment, - OTF_EVENTCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_EVENTCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleCounter, - OTF_COUNTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_COUNTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEnter, - OTF_ENTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_ENTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleCollectiveOperation, - OTF_COLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_COLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginCollectiveOperation, - OTF_BEGINCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_BEGINCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndCollectiveOperation, - OTF_ENDCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_ENDCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRecvMsg, - OTF_RECEIVE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_RECEIVE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleSendMsg, - OTF_SEND_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_SEND_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleLeave, - OTF_LEAVE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_LEAVE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginProcess, - OTF_BEGINPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_BEGINPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndProcess, - OTF_ENDPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_ENDPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFileOperation, - OTF_FILEOPERATION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_FILEOPERATION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginFileOperation, - OTF_BEGINFILEOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_BEGINFILEOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndFileOperation, - OTF_ENDFILEOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_ENDFILEOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRMAPut, - OTF_RMAPUT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_RMAPUT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRMAPutRemoteEnd, - OTF_RMAPUTRE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_RMAPUTRE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRMAGet, - OTF_RMAGET_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_RMAGET_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRMAEnd, - OTF_RMAEND_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_RMAEND_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefKeyValue, - OTF_DEFKEYVALUE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_DEFKEYVALUE_RECORD ); - - - /* snapshot records */ - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleSnapshotComment, - OTF_SNAPSHOTCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_SNAPSHOTCOMMENT_RECORD ); - - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEnterSnapshot, - OTF_ENTERSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_ENTERSNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleSendSnapshot, - OTF_SENDSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_SENDSNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleOpenFileSnapshot, - OTF_OPENFILESNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_OPENFILESNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginCollopSnapshot, - OTF_BEGINCOLLOPSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_BEGINCOLLOPSNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginFileOpSnapshot, - OTF_BEGINFILEOPSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, - OTF_BEGINFILEOPSNAPSHOT_RECORD ); - - - /* summary records */ - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFunctionSummary, - OTF_FUNCTIONSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_FUNCTIONSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFunctionGroupSummary, - OTF_FUNCTIONGROUPSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_FUNCTIONGROUPSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleMessageSummary, - OTF_MESSAGESUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_MESSAGESUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleCollopSummary, - OTF_COLLOPSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_COLLOPSUMMARY_RECORD ); - - - /* I/O records */ - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFileOperation, - OTF_FILEOPERATION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_FILEOPERATION_RECORD ); - - - /* marker records */ - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefMarker, OTF_DEFMARKER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_DEFMARKER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleMarker, OTF_MARKER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fha, OTF_MARKER_RECORD ); - - - /* misc records */ - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleUnknown, - OTF_UNKNOWN_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fha, OTF_UNKNOWN_RECORD ); - - - start_t = time(NULL); - - if ( def && fha.num <= fha.maxNum ) { - - if( !fha.silent_mode ) { - fprintf( stdout, "\ndefinitions:\n\n" ); - } - - read = OTF_Reader_readDefinitions( reader, handlers ); - if( read == OTF_READ_ERROR ) { - fprintf(stderr,"An error occurred while reading the tracefile. It seems to be damaged. Abort.\n"); - return 1; - } - } - - if ( event && fha.num <= fha.maxNum ) { - - if( !fha.silent_mode ) { - fprintf( stdout, "\nevents:\n\n" ); - } - - read = OTF_Reader_readEvents( reader, handlers ); - if( read == OTF_READ_ERROR ) { - fprintf(stderr,"An error occurred while reading the tracefile. It seems to be damaged. Abort.\n"); - return 1; - } - } - - if ( stat && fha.num <= fha.maxNum ) { - - if( !fha.silent_mode ) { - fprintf( stdout, "\nstatistics:\n\n" ); - } - - read = OTF_Reader_readStatistics( reader, handlers ); - if( read == OTF_READ_ERROR ) { - fprintf(stderr,"An error occurred while reading the tracefile. It seems to be damaged. Abort.\n"); - return 1; - } - } - - if ( snap && fha.num <= fha.maxNum ) { - - if( !fha.silent_mode ) { - fprintf( stdout, "\nsnapshots:\n\n" ); - } - read = OTF_Reader_readSnapshots( reader, handlers ); - if( read == OTF_READ_ERROR ) { - fprintf(stderr,"An error occurred while reading the tracefile. It seems to be damaged. Abort.\n"); - return 1; - } - } - - if ( marker && fha.num <= fha.maxNum ) { - - if( !fha.silent_mode ) { - fprintf( stdout, "\nmarkers:\n\n" ); - } - read = OTF_Reader_readMarkers( reader, handlers ); - if( read == OTF_READ_ERROR ) { - fprintf(stderr,"An error occurred while reading the tracefile. It seems to be damaged. Abort.\n"); - return 1; - } - } - - end_t = time(NULL); - - if( !fha.silent_mode ) { - fprintf( stdout, "\ndone\n" ); - } - - OTF_Reader_close( reader ); - OTF_HandlerArray_close( handlers ); - OTF_FileManager_close( manager ); - - if( fha.silent_mode ) { - fprintf( stdout, "done after %llu s\n", (unsigned long long int)(end_t - start_t) ); - } - - return 0; -} - - diff --git a/externals/otf/tools/otfdump/otfdump_vs08.vcproj b/externals/otf/tools/otfdump/otfdump_vs08.vcproj deleted file mode 100644 index d75eb861199298423ec7621bf313cec3739d28f3..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfdump/otfdump_vs08.vcproj +++ /dev/null @@ -1,371 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="otfdump" - ProjectGUID="{508A823C-8EAB-4C56-9DFE-4D85B0D24491}" - RootNamespace="otfdump" - Keyword="Win32Proj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="../../debug" - IntermediateDirectory="tmp" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="libotf.lib" - LinkIncremental="2" - AdditionalLibraryDirectories="../../debug" - GenerateDebugInformation="true" - SubSystem="1" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_ZLIB" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="1" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release Static|Win32" - OutputDirectory="../../release_static_32bit" - IntermediateDirectory="tmp_32bit" - ConfigurationType="1" - UseOfMFC="0" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="false" - DebugInformationFormat="0" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="libotf.lib" - LinkIncremental="1" - AdditionalLibraryDirectories="../../release_static_32bit" - DelayLoadDLLs="$(NOINHERIT)" - GenerateDebugInformation="false" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release Static|x64" - OutputDirectory="../../release_static_64bit" - IntermediateDirectory="tmp_64bit" - ConfigurationType="1" - UseOfMFC="0" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="false" - DebugInformationFormat="0" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="libotf.lib" - LinkIncremental="1" - AdditionalLibraryDirectories="../../release_static_64bit" - DelayLoadDLLs="$(NOINHERIT)" - GenerateDebugInformation="false" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Quelldateien" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\Handler.cpp" - > - </File> - <File - RelativePath=".\otfdump.cpp" - > - </File> - </Filter> - <Filter - Name="Headerdateien" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath=".\Handler.h" - > - </File> - </Filter> - <Filter - Name="Ressourcendateien" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/externals/otf/tools/otfinfo/Makefile.am b/externals/otf/tools/otfinfo/Makefile.am deleted file mode 100644 index cd4937a129df49aa8af4598d46cbf3d7938f56c7..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfinfo/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib - -if AMBUILDBINARIES -bin_PROGRAMS = \ - otfinfo -endif - -otfinfo_LDADD = $(top_builddir)/otflib/libotf.la -otfinfo_DEPENDENCIES = $(otfinfo_LDADD) -otfinfo_SOURCES = \ - handler.h \ - hash.h \ - otfinfo_error.h \ - handler.c \ - hash.c \ - otfinfo.c \ - otfinfo_error.c - diff --git a/externals/otf/tools/otfinfo/Makefile.in b/externals/otf/tools/otfinfo/Makefile.in deleted file mode 100644 index a5158c832ae1db9748a0c503bdee783b7679bc0c..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfinfo/Makefile.in +++ /dev/null @@ -1,596 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@AMBUILDBINARIES_TRUE@bin_PROGRAMS = otfinfo$(EXEEXT) -subdir = tools/otfinfo -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_otfinfo_OBJECTS = handler.$(OBJEXT) hash.$(OBJEXT) \ - otfinfo.$(OBJEXT) otfinfo_error.$(OBJEXT) -otfinfo_OBJECTS = $(am_otfinfo_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(otfinfo_SOURCES) -DIST_SOURCES = $(otfinfo_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib -otfinfo_LDADD = $(top_builddir)/otflib/libotf.la -otfinfo_DEPENDENCIES = $(otfinfo_LDADD) -otfinfo_SOURCES = \ - handler.h \ - hash.h \ - otfinfo_error.h \ - handler.c \ - hash.c \ - otfinfo.c \ - otfinfo_error.c - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/otfinfo/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/otfinfo/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -otfinfo$(EXEEXT): $(otfinfo_OBJECTS) $(otfinfo_DEPENDENCIES) - @rm -f otfinfo$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(otfinfo_OBJECTS) $(otfinfo_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/handler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfinfo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfinfo_error.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS 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-binPROGRAMS - -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: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - 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-binPROGRAMS 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 \ - uninstall-binPROGRAMS - - -# 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/externals/otf/tools/otfinfo/handler.c b/externals/otf/tools/otfinfo/handler.c deleted file mode 100644 index 2df98cd576c0a3ee448edb6c600763cf6bd7490c..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfinfo/handler.c +++ /dev/null @@ -1,434 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Michael Heyde -*/ - -#include "handler.h" -#include "otfinfo_error.h" - -#include "otf.h" - -#include <stdlib.h> -#include <string.h> - -#define MAXINFOLEVEL 4 - -/* Level 1/4 handles */ - -int handleUnknownRecord( void *userData, uint64_t time, uint32_t process, - const char *record ) -{ - otfinfo_assert(0); - return OTF_RETURN_ABORT; -} - -int handleDefCreator( void *userData, uint32_t stream, const char *creator ) -{ - ((definitionInfoT*)userData)->creatorName = strdup(creator); - return OTF_RETURN_OK; -} - -int handleDefVersion( void *userData, uint32_t stream, uint8_t major, - uint8_t minor, uint8_t sub, const char *string ) -{ - definitionInfoT *info = userData; - info->otfVersionMajor = major; - info->otfVersionMinor = minor; - info->otfVersionSub = sub; - - if( string != NULL ) { - info->otfVersionString = strdup(string); - } else { - info->otfVersionString = strdup(""); - } - - return OTF_RETURN_OK; -} - -int handleDefProcess( void *userData, uint32_t stream, uint32_t process, - const char *name, uint32_t parent ) -{ - /* in a low info level, increment the process counter */ - if( MAXINFOLEVEL > ((definitionInfoT*)userData)->infoLevel ) - { - ((definitionInfoT*)userData)->counterProcessDefinition++; - } - else - { - /* in the max info level, get the process names */ - int index=0; - definitionInfoT *info = (definitionInfoT*)userData; - while(info->processNames[index]) - index++; - (info->processNames)[index] = strdup(name); - } - return OTF_RETURN_OK; -} - -int handleDefTimerResolution( void *userData, uint32_t stream, - uint64_t ticksPerSecond ) -{ - ((definitionInfoT*)userData)->timerResolution = ticksPerSecond; - return OTF_RETURN_OK; -} - -int handleDefinitionComment( void *userData, uint32_t stream, - const char *comment ) -{ - definitionInfoT *info = (definitionInfoT*)userData; - uint32_t index = (info->counterDefinitionComment)++; - (info->definitionComments) = (char**)realloc(info->definitionComments,(index + 1) * sizeof(char**)); - (info->definitionComments)[index] = strdup(comment); - return OTF_RETURN_OK; -} - -/* Level 2 handles */ - -int handleDefFunction( void *userData, uint32_t stream, uint32_t func, - const char *name, uint32_t funcGroup, uint32_t source ) -{ - /*in a low info level, increment the function counter*/ - if( MAXINFOLEVEL > ((definitionInfoT*)userData)->infoLevel ) - { - ((definitionInfoT*)userData)->counterFunctionDefinition++; - } - else - { - /*in the max info level, get the function names*/ - int index = 0; - definitionInfoT *info = (definitionInfoT*)userData; - while(info->functionNames[index]) - index++; - (info->functionNames)[index] = strdup(name); - } - return OTF_RETURN_OK; -} - -int handleDefCounter( void *userData, uint32_t stream, uint32_t counter, - const char *name, uint32_t properties, - uint32_t counterGroup, const char *unit ) -{ - /*in a low info level, increment the counter counter*/ - if( 3 > ((definitionInfoT*)userData)->infoLevel) - { - ((definitionInfoT*)userData)->counterCounterDefinition++; - } - else - { - /*in the max info level, get the counter names*/ - definitionInfoT *info = (definitionInfoT*)userData; - uint64_t i = 0; - while( ((info->counters)[i].name) && (i < info->counterCounterDefinition) ) - i++; - (info->counters)[i].name = strdup(name); - (info->counters)[i].id = counter; - (info->counters)[i].properties = properties; - } - return OTF_RETURN_OK; -} - -int handleDefMarker( void *userData, uint32_t stream, uint32_t token, - const char *name, uint32_t type ) -{ - /*in a low info level, increment the marker counter*/ - if( MAXINFOLEVEL > ((definitionInfoT*)userData)->infoLevel ) - { - ((definitionInfoT*)userData)->counterDefinitionMarker++; - } - else - { - /*in the max info level, get the marker names*/ - uint32_t index = 0; - definitionInfoT *info = (definitionInfoT*)userData; - while(info->markerNames[index]) - index++; - (info->markerNames)[index] = strdup(name); - } - return OTF_RETURN_OK; -} - -int handleDefProcessGroup( void *userData, uint32_t stream, uint32_t procGroup, - const char *name, uint32_t numberOfProcs, const uint32_t *procs ) -{ - /*in a low info level, increment the process group counter*/ - if( MAXINFOLEVEL > ((definitionInfoT*)userData)->infoLevel ) - { - ((definitionInfoT*)userData)->counterProcessGroupDefinition++; - } - else - { - /*in the max info level, get the process group names*/ - int index = 0; - definitionInfoT *info = (definitionInfoT*)userData; - while( info->processGroupNames[index] ) - index++; - (info->processGroupNames)[index] = strdup(name); - } - return OTF_RETURN_OK; -} - -int handleDefFunctionGroup( void *userData, uint32_t stream, - uint32_t funcGroup, const char *name) -{ - /*in a low info level, increment the function group counter*/ - if( MAXINFOLEVEL > ((definitionInfoT*)userData)->infoLevel ) - { - ((definitionInfoT*)userData)->counterFunctionGroupDefinition++; - } - else - { - /*in the max info level, get the function group names*/ - int index = 0; - definitionInfoT *info = (definitionInfoT*)userData; - while(info->functionGroupNames[index]) - index++; - (info->functionGroupNames)[index] = strdup(name); - } - return OTF_RETURN_OK; -} - -int handleDefCounterGroup( void *userData, uint32_t stream, - uint32_t counterGroup, const char *name ) -{ - /*in a low info level, increment the counter group counter*/ - if( MAXINFOLEVEL > ((definitionInfoT*)userData)->infoLevel ) - { - ((definitionInfoT*)userData)->counterCounterGroupDefinition++; - } - else - { - /*in the max info level, get the counter group names*/ - int index = 0; - definitionInfoT *info = (definitionInfoT*)userData; - while(info->counterGroupNames[index]) - index++; - (info->counterGroupNames)[index] = strdup(name); - } - return OTF_RETURN_OK; -} - -int handleDefSclFile( void *userData, uint32_t stream, uint32_t sourceFile, - const char *name) -{ - definitionInfoT *info = (definitionInfoT*)userData; - uint32_t index = (info->counterSourceFileName)++; - (info->sourceFileNames) = (char**)realloc( info->sourceFileNames,(index + 1) - * sizeof(char**) ); - (info->sourceFileNames)[index] = strdup(name); - return OTF_RETURN_OK; -} - -/* Level 3 handles */ - -int handleEnter( void *userData, uint64_t time, uint32_t function, - uint32_t process, uint32_t source ) -{ - ((definitionInfoT*)userData)->counterEnter++; - return OTF_RETURN_OK; -} - -int handleLeave( void *userData, uint64_t time, uint32_t function, - uint32_t process, uint32_t source ) -{ - ((definitionInfoT*)userData)->counterLeave++; - return OTF_RETURN_OK; -} - -int handleSendMsg( void *userData, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t group, uint32_t type, - uint32_t length, uint32_t source ) -{ - ((definitionInfoT*)userData)->counterSend++; - return OTF_RETURN_OK; -} - -int handleRecvMsg( void *userData, uint64_t time, uint32_t recvProc, - uint32_t sendProc, uint32_t group, uint32_t type, - uint32_t length, uint32_t source ) -{ - ((definitionInfoT*)userData)->counterReceive++; - return OTF_RETURN_OK; -} - -int handleRMAPut( void *userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t source ) -{ - ((definitionInfoT*)userData)->counterRMAPut++; - return OTF_RETURN_OK; -} -int handleRMAPutRemoteEnd( void *userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source ) -{ - ((definitionInfoT*)userData)->counterRMAPutRemoteEnd++; - return OTF_RETURN_OK; -} -int handleRMAGet( void *userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t source ) -{ - ((definitionInfoT*)userData)->counterRMAGet++; - return OTF_RETURN_OK; -} -int handleRMAEnd( void *userData, uint64_t time, uint32_t process, - uint32_t remote, uint32_t communicator, uint32_t tag, - uint32_t source ) -{ - ((definitionInfoT*)userData)->counterRMAEnd++; - return OTF_RETURN_OK; -} - -int handleDefCollectiveOperation( void *userData, uint32_t stream, - uint32_t collOp, const char *name, - uint32_t type ) -{ - /*in a low info level, increment the collective counter*/ - ((definitionInfoT*)userData)->counterCollectiveOperation++; - if( MAXINFOLEVEL <= ((definitionInfoT*)userData)->infoLevel ) - { - /*in the max info level, get the collective operation names*/ - definitionInfoT *info = (definitionInfoT*)userData; - int index = ((definitionInfoT*)userData)->counterCollectiveOperation; - (info->collectiveOperationNames) = (char**)realloc( - info->collectiveOperationNames, - (index) * sizeof(char**) ); - (info->collectiveOperationNames)[index-1] = strdup(name); - } - return OTF_RETURN_OK; -} - -int handleFileOperation( void *userData, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t handleid, - uint32_t operation, uint64_t bytes, uint64_t duration, - uint32_t source ) -{ - ((definitionInfoT*)userData)->counterFileOperation++; - return OTF_RETURN_OK; -} - -int handleEndFileOperation( void *userData, uint64_t time, uint32_t process, - uint32_t fileid, uint64_t handleid, - uint32_t operation, uint64_t bytes, - uint32_t source ) -{ - ((definitionInfoT*)userData)->counterFileOperation++; - return OTF_RETURN_OK; -} - -int handleEnterSnapshot( void *userData, uint64_t time, uint64_t originaltime, - uint32_t function, uint32_t process, uint32_t source ) -{ - ((definitionInfoT*)userData)->counterSnapshot++; - return OTF_RETURN_OK; -} - -int handleCounter( void* userData, uint64_t time, uint32_t process, - uint32_t counter, uint64_t value ) -{ - uint64_t i = 0; - double valueDif = 0.0; - double timeDif = 0.0; - double rate = 0.0; - mapInfoProcessT *currentElement = NULL; - definitionInfoT *info = (definitionInfoT*)userData; - - while( (i < info->counterCounterDefinition) && - (info->counters[i].id != counter)) - { - i++; - } - if( i >= info->counterCounterDefinition ) - return OTF_RETURN_ABORT; - - /*for the counter type*/ - if( ((info->counters[i].properties) & OTF_COUNTER_TYPE_BITS) - == OTF_COUNTER_TYPE_ACC ) - { - if( (info->counters)[i].processMap == NULL ) - (info->counters)[i].processMap = hash_new(); - - /*calculate the current counter rate*/ - currentElement = hash_search( info->counters[i].processMap, process ); - - if( !currentElement ) - { - currentElement = hash_add( info->counters[i].processMap, process ); - } - else - { - valueDif = value - currentElement->lastValue; - timeDif = time - currentElement->lastTime; - - if( timeDif > 0 ) - { - rate = (valueDif / timeDif) * (double)(info->timerResolution); - } - if( rate > currentElement->highestRate ) - currentElement->highestRate = rate; - } - - currentElement->lastValue = value; - currentElement->lastTime = time; - } - - return OTF_RETURN_OK; -} - -uint64_t process_get_sum_time( mapInfoProcessT *set ) -{ - uint64_t sumTime = 0; - uint32_t i; - mapInfoProcessT *currentElement = NULL; - for( i = 0; i < HASH_SIZE; i++ ) - { - currentElement = &set[i]; - while( currentElement ) - { - if( (uint32_t)-1 != currentElement->process ) - sumTime += currentElement->lastTime; - currentElement = currentElement->next; - } - } - return sumTime; -} - -uint64_t process_get_sum_value( mapInfoProcessT *set ) -{ - uint64_t sumValue = 0; - uint32_t i; - mapInfoProcessT *currentElement = NULL; - for( i = 0; i < HASH_SIZE; i++ ) - { - currentElement = &set[i]; - while( currentElement ) - { - if( (uint32_t)-1 != currentElement->process ) - sumValue += currentElement->lastValue; - currentElement = currentElement->next; - } - } - return sumValue; -} - -double process_get_highest_rate( mapInfoProcessT *set ) -{ - double highestRate = 0; - uint32_t i; - mapInfoProcessT *currentElement = NULL; - for( i = 0; i < HASH_SIZE; i++ ) - { - currentElement = &set[i]; - while( currentElement ) - { - if( (uint32_t)-1 != currentElement->process ) - { - if( highestRate < currentElement->highestRate ) - highestRate = currentElement->highestRate; - } - currentElement = currentElement->next; - } - } - return highestRate; -} diff --git a/externals/otf/tools/otfinfo/handler.h b/externals/otf/tools/otfinfo/handler.h deleted file mode 100644 index 20fdcc6b8e848a719e8f5ce6611ceb8f7b0c5637..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfinfo/handler.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Michael Heyde -*/ - -#ifndef HANDLER_H -#define HANDLER_H - -#include "hash.h" - -#include "OTF_inttypes.h" - -typedef struct counterS -{ - char *name; - uint32_t id; - uint32_t properties; - mapInfoProcessT *processMap; - } counterT; - -typedef struct definitionInfoS -{ - char *filePrefix; - char *creatorName; - char **definitionComments; - char **sourceFileNames; - char **processNames; - char **processGroupNames; - char **functionNames; - char **functionGroupNames; - char **collectiveOperationNames; - counterT *counters; - char **counterGroupNames; - char **markerNames; - char *otfVersionString; - int infoLevel; - uint8_t otfVersionMajor; - uint8_t otfVersionMinor; - uint8_t otfVersionSub; - uint64_t traceFileSize; - uint64_t counterCollectiveOperation; - uint64_t counterDefinitionComment; - uint64_t counterSourceFileName; - uint64_t counterFunctionGroupDefinition; - uint64_t counterFunctionDefinition; - uint64_t counterProcessGroupDefinition; - uint64_t counterProcessDefinition; - uint64_t counterCounterDefinition; - uint64_t counterCounterGroupDefinition; - uint64_t counterLeave; - uint64_t counterEnter; - uint64_t counterSend; - uint64_t counterReceive; - uint64_t counterDefinitionMarker; - uint64_t timerResolution; - uint64_t counterRMAPut; - uint64_t counterRMAPutRemoteEnd; - uint64_t counterRMAGet; - uint64_t counterRMAEnd; - uint64_t counterFileOperation; - uint64_t counterSnapshot; -} definitionInfoT; - -/* Level 1/4 handles */ - -int handleUnknownRecord( void *userData, uint64_t time, uint32_t process, - const char *record ); - -int handleDefCreator( void *userData, uint32_t stream, const char *creator ); - -int handleDefVersion( void *userData, uint32_t stream, uint8_t major, - uint8_t minor, uint8_t sub, const char *string ); - -int handleDefProcess( void *userData, uint32_t stream, uint32_t process, - const char *name, uint32_t parent ); - -int handleDefTimerResolution( void *userData, uint32_t stream, - uint64_t ticksPerSecond ); - -int handleDefinitionComment( void *userData, uint32_t stream, - const char *comment ); - -/* Level 2 handles */ - -int handleDefFunction( void *userData, uint32_t stream, uint32_t func, - const char *name, uint32_t funcGroup, uint32_t source ); - -int handleDefCounter( void *userData, uint32_t stream, uint32_t counter, - const char *name, uint32_t properties, - uint32_t counterGroup, const char *unit ); - -int handleDefMarker( void *userData, uint32_t stream, uint32_t token, - const char *name, uint32_t type ); - -int handleDefProcessGroup( void *userData, uint32_t stream, uint32_t procGroup, - const char *name, uint32_t numberOfProcs, - const uint32_t *procs ); - -int handleDefFunctionGroup( void *userData, uint32_t stream, - uint32_t funcGroup, const char *name ); - -int handleDefCounterGroup( void *userData, uint32_t stream, - uint32_t counterGroup, const char *name ); - -int handleDefSclFile( void *userData, uint32_t stream, uint32_t sourceFile, - const char *name ); - -/* Level 3 handles */ - -int handleEnter( void *userData, uint64_t time, uint32_t function, - uint32_t process, uint32_t source ); - -int handleLeave( void *userData, uint64_t time, uint32_t function, - uint32_t process, uint32_t source ); - -int handleSendMsg( void *userData, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t group, uint32_t type, - uint32_t length, uint32_t source ); - -int handleRecvMsg( void *userData, uint64_t time, uint32_t recvProc, - uint32_t sendProc, uint32_t group, uint32_t type, - uint32_t length, uint32_t source ); - -int handleRMAPut( void *userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t source ); - -int handleRMAPutRemoteEnd( void *userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source ); - -int handleRMAGet( void *userData, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, - uint32_t tag, uint64_t bytes, uint32_t source ); - -int handleRMAEnd( void *userData, uint64_t time, uint32_t process, - uint32_t remote, uint32_t communicator, uint32_t tag, - uint32_t source ); - -int handleDefCollectiveOperation( void *userData, uint32_t stream, - uint32_t collOp, const char *name, - uint32_t type ); - -int handleFileOperation( void *userData, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t handleid, - uint32_t operation, uint64_t bytes, uint64_t duration, - uint32_t source ); - -int handleEndFileOperation( void *userData, uint64_t time, uint32_t process, - uint32_t fileid, uint64_t handleid, - uint32_t operation, uint64_t bytes, - uint32_t source ); - -int handleEnterSnapshot( void *userData, uint64_t time, uint64_t originaltime, - uint32_t function, uint32_t process, - uint32_t source ); - -int handleCounter( void* userData, uint64_t time, uint32_t process, - uint32_t counter, uint64_t value ); - - -uint64_t process_get_sum_time( mapInfoProcessT *set ); - -uint64_t process_get_sum_value( mapInfoProcessT *set ); - -double process_get_highest_rate(mapInfoProcessT *set ); - -#endif /* HANDLER_H */ diff --git a/externals/otf/tools/otfinfo/hash.c b/externals/otf/tools/otfinfo/hash.c deleted file mode 100644 index f81b3549df42644b6ff1a948c1c54f22526422a2..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfinfo/hash.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Michael Heyde -*/ - -#include "hash.h" - -#include <stdlib.h> - -static mapInfoProcessT *add_inner( mapInfoProcessT **current, uint32_t process ) -{ - if( NULL != *current ) - { - return add_inner( &((mapInfoProcessT*)(*current))->next, process ); - } - else - { - *current = (mapInfoProcessT*)calloc( 1, sizeof(mapInfoProcessT) ); - (*current)->process = process; - return *current; - } -} - -static mapInfoProcessT *search_inner( mapInfoProcessT *current, uint32_t process ) -{ - if( current ) - { - if( current->process == process ) - return current; - return search_inner( current->next, process ); - } - return NULL; -} - -mapInfoProcessT *hash_new( ) -{ - mapInfoProcessT *ret; - int i; - - ret = (mapInfoProcessT*)calloc( HASH_SIZE, sizeof(mapInfoProcessT) ); - for( i = 0; i < HASH_SIZE; i++) - { - ret[i].process = (uint32_t)-1; - } - - return ret; -} - -mapInfoProcessT *hash_add( mapInfoProcessT *hash, uint32_t process) -{ - uint32_t hashkey = process; - - HASH_GET_KEY( hashkey ); - - if( hash[hashkey].process == (uint32_t)-1 ) - { - hash[hashkey].process = process; - return &(hash[hashkey]); - } - else - { - return add_inner( &(hash[hashkey].next), process ); - } -} - -mapInfoProcessT *hash_search( mapInfoProcessT *hash, uint32_t process) -{ - uint32_t hashkey = process; - - HASH_GET_KEY( hashkey ); - - if( hash[hashkey].process == process ) - { - return &(hash[hashkey]); - } - else - { - return search_inner( hash[hashkey].next, process ); - } -} - -void hash_delete( mapInfoProcessT *hash ) -{ - int i; - - for( i = 0; i < HASH_SIZE; i++ ) - { - mapInfoProcessT *currentElement = hash[i].next; - while( NULL != currentElement ) - { - mapInfoProcessT *tmpElement = currentElement; - currentElement = currentElement->next; - free( tmpElement ); - } - } - - free( hash ); -} diff --git a/externals/otf/tools/otfinfo/hash.h b/externals/otf/tools/otfinfo/hash.h deleted file mode 100644 index 07b2b1ee38f88553307cc030078d2707665e24cb..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfinfo/hash.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Michael Heyde -*/ - -#ifndef HASH_H -#define HASH_H - -#include "OTF_inttypes.h" - -/* 0x1000 = 4096 */ -#define HASH_SIZE 0X1000 -#define HASH_GET_KEY(key) \ -{ \ - key += ~(key << 15); \ - key ^= (key >> 10); \ - key += (key << 3); \ - key ^= (key >> 6); \ - key += ~(key << 11); \ - key ^= (key >> 16); \ - key &= HASH_SIZE - 1; \ -} - -typedef struct mapInfoProcessS -{ - uint32_t process; - uint64_t lastValue; - uint64_t lastTime; - double highestRate; - struct mapInfoProcessS *next; -} mapInfoProcessT; - -/* initialize the hash */ -mapInfoProcessT* hash_new( void ); - -/* add an entry to the hash */ -mapInfoProcessT* hash_add( mapInfoProcessT *hash, uint32_t process ); - -/* search an entry in the hash */ -mapInfoProcessT* hash_search( mapInfoProcessT *hash, uint32_t process ); - -/* free all mem of the hash */ -void hash_delete( mapInfoProcessT *hash ); - -#endif /* HASH_H */ diff --git a/externals/otf/tools/otfinfo/otfinfo.c b/externals/otf/tools/otfinfo/otfinfo.c deleted file mode 100644 index 568b3ac22309e25b68e1b828cf5057c0748b88f3..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfinfo/otfinfo.c +++ /dev/null @@ -1,917 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Michael Heyde -*/ - -#include "handler.h" -#include "otfinfo_error.h" - -#include "otf.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <sys/stat.h> -#include <sys/types.h> - -#define PROGRESSBARLEN 20 - -static void set_handles_level_1( OTF_HandlerArray *handles, - definitionInfoT *info ); -static void set_handles_level_2( OTF_HandlerArray *handles, - definitionInfoT *info ); -static void set_handles_level_3( OTF_HandlerArray *handles, - definitionInfoT *info ); -static void set_handles_level_4( OTF_HandlerArray *handles, - definitionInfoT *info ); - -static void show_info_level_1( definitionInfoT *info ); -static void show_info_level_2( definitionInfoT *info ); -static void show_info_level_3( definitionInfoT *info ); -static void show_info_level_4( definitionInfoT *info ); - -static void free_data_level_1( definitionInfoT *info ); -static void free_data_level_2( definitionInfoT *info ); -static void free_data_level_3( definitionInfoT *info ); -static void free_data_level_4( definitionInfoT *info ); - -int main(int argc, char **argv) -{ - definitionInfoT info; /*structur where the trace information are stored*/ - int i = 0; - uint32_t numFileHandles = 1; /*number of filehandles */ - uint64_t checkVal = 0; /*value used for asserts*/ - uint64_t size = 0; /*size of the event files*/ - uint64_t minRead = 0; /*variable for progress*/ - uint64_t currRead = 0; /*count of current read bytes*/ - uint32_t numStreams = 0; - char* parameter = NULL; /*reference to the parameters*/ - char* fileLocation = NULL; /*path to the tracefiles*/ - OTF_FileManager *manager = NULL; - OTF_Reader *reader = NULL; - OTF_MasterControl* master = NULL; - OTF_HandlerArray *handles = NULL; - int showProgress = 0; - int infoLevel = 1; /*level for the output of information (local)*/ - - static const char* Helptext[] = { - " \n", - " otfinfo - program to get basic information of a trace. \n", - " \n", - " otfinfo [Options] <input file name> \n", - " \n", - " options: \n", - " -h, --help show this help message \n", - " -V show OTF version \n", - " -f <n> set max number of filehandles available \n", - " -l <ilevel> set the information level for the output \n", - " (0 - 4) the default level is 1 \n", - " -a set the information level to 4 \n", - " -p show progress bar for reading event files \n", - " \n", - " \n", NULL }; - - info.infoLevel = 1; /*level of information for the handles*/ - - /*if no parameter was given printing the helptext*/ - if( 1 >= argc ) - { - int l = 0; - while( Helptext[l] ) - { - printf( "%s",Helptext[l++] ); - } - return 0; - } - - /*checking for additional parameters*/ - for( i = 1 ; i < argc; i++ ) - { - parameter = argv[i]; - if( (strcmp(parameter,"-f") == 0) && (i+1 < argc) ) - { - i++; - numFileHandles = atoi(argv[i]); - } - else if( (strcmp(parameter,"-l") == 0) && (i+1 < argc) ) - { - i++; - infoLevel = atoi(argv[i]); - } - else if( strcmp(parameter,"-a") == 0 ) - { - infoLevel = 4; - } - else if( strcmp(parameter,"-p") == 0 ) - { - showProgress = 1; - } - else if( strcmp(parameter,"-V") == 0 ) - { - printf( "%u.%u.%u \"%s\"\n", OTF_VERSION_MAJOR, OTF_VERSION_MINOR, - OTF_VERSION_SUB, OTF_VERSION_STRING ); - return 0; - } - else if( (strcmp(parameter,"-h") == 0) || - (strcmp(parameter,"--help") == 0) ) - { - int l=0; - while(Helptext[l]) - { - printf( "%s",Helptext[l++] ); - } - return 0; - } - else if( '-' != parameter[0] ) - { - char* p; - fileLocation = parameter; - p = strrchr( parameter, '.' ); - if( p && strlen(p) >= 4 && strcmp(p, ".otf") == 0 ) - *p = '\0'; - } - else - { - fprintf(stderr,"ERROR: Unknown option: '%s'\n",argv[i]); - exit(1); - } - } - if( numFileHandles < 1 ) - { - fprintf( stderr, "ERROR: less than 1 filehandle is not permitted\n" ); - exit(1); - } - if( NULL == fileLocation ) - { - fprintf( stderr, "ERROR: no trace file was specified\n" ); - exit(1); - } - - info.filePrefix = OTF_getFilename( fileLocation, 0, OTF_FILETYPE_MASTER, - 0, NULL ); - - /*preparing the reader*/ - manager = OTF_FileManager_open( numFileHandles ); - otfinfo_assert( manager ); - reader = OTF_Reader_open( fileLocation, manager ); - otfinfo_assert( reader ); - handles = OTF_HandlerArray_open(); - otfinfo_assert( handles ); - if( 0 < infoLevel ) - { - info.infoLevel = 1; - set_handles_level_1( handles, &info ); - if( 1 < infoLevel ) - { - info.infoLevel = 2; - set_handles_level_2( handles,&info ); - } - } - - /*read definition file*/ - checkVal = OTF_Reader_readDefinitions( reader, handles ); - otfinfo_assert( checkVal != OTF_READ_ERROR ); - checkVal = OTF_Reader_readMarkers( reader, handles ); - otfinfo_assert( checkVal != OTF_READ_ERROR ); - - /*getting the size of the event files*/ - master = OTF_Reader_getMasterControl( reader ); - otfinfo_assert( master ); - - numStreams = OTF_MasterControl_getCount( master ); - otfinfo_assert( numStreams > 0 ); - - info.traceFileSize = 0; - for( i = 0; i < (int)numStreams; i++ ) - { - static char filename[1024]; - static uint32_t filecomp = OTF_FILECOMPRESSION_COMPRESSED; - static struct stat filestat; - - /*get event file name of stream*/ - OTF_getFilename( fileLocation, i+1, OTF_FILETYPE_EVENT | filecomp, - sizeof(filename), filename ); - - /*if stat succeeds, compute total file size*/ - if( stat( filename, &filestat ) == 0 ) - { - info.traceFileSize += (uint64_t)filestat.st_size; - } - /*otherwise, re-try with uncompressed file*/ - else - { - if( filecomp == OTF_FILECOMPRESSION_COMPRESSED ) - { - filecomp = OTF_FILECOMPRESSION_UNCOMPRESSED; - i--; continue; - } - } - - filecomp = OTF_FILECOMPRESSION_COMPRESSED; - } - - /*printing the results and cleanup*/ - if( 0 < infoLevel ) - { - show_info_level_1( &info ); - free_data_level_1( &info ); - if( 1 < infoLevel ) - { - show_info_level_2( &info ); - free_data_level_2( &info ); - } - } - checkVal = OTF_HandlerArray_close( handles ); - otfinfo_assert( checkVal ); - checkVal = OTF_Reader_close( reader ); - otfinfo_assert( checkVal ); - OTF_FileManager_close( manager ); - - /*if the info level is higher than two, we have to read again the files*/ - if( 2 < infoLevel ) - { - /*prepare for reading*/ - manager = OTF_FileManager_open( numFileHandles ); - otfinfo_assert( manager ); - reader = OTF_Reader_open( fileLocation, manager ); - otfinfo_assert( reader ); - handles = OTF_HandlerArray_open(); - otfinfo_assert( handles ); - - info.infoLevel = 3; - set_handles_level_3( handles, &info ); - if( 3 < infoLevel ) - { - info.infoLevel = 4; - set_handles_level_4( handles, &info ); - } - - /*read definitions*/ - checkVal = OTF_Reader_readDefinitions( reader, handles ); - otfinfo_assert( checkVal != OTF_READ_ERROR ); - - if( info.counterDefinitionMarker != 0 ) - { - /*read markers*/ - checkVal = OTF_Reader_readMarkers( reader, handles ); - otfinfo_assert( checkVal != OTF_READ_ERROR ); - } - - if( 1 == showProgress ) - { - /*printing a kind of progress bar*/ - OTF_Reader_setRecordLimit( reader, 10000 ); - size = 1; - currRead = 0; - printf( "\n\n" ); - printf( "reading events:\n" ); - for( i = 0; i < PROGRESSBARLEN + 3; i++ ) - printf( " " ); - printf( "|100%%\r" ); - printf( "0%%|" ); fflush( stdout ); - i = 0; - while( (checkVal = OTF_Reader_readEvents( reader, handles )) == 10000 ) - { - int current; - otfinfo_assert( checkVal != OTF_READ_ERROR ) - OTF_Reader_eventBytesProgress( reader, &minRead, &currRead, &size ); - current = ( PROGRESSBARLEN * currRead ) / size; - for( ; i < current; i++ ) - printf( "#" ); fflush( stdout ); - } - otfinfo_assert( checkVal != OTF_READ_ERROR ) - for( ; i < PROGRESSBARLEN; i++ ) - printf( "#" ); - printf( "\n\n" ); - } - else - { - checkVal = OTF_Reader_readEvents( reader, handles ); - otfinfo_assert( checkVal != OTF_READ_ERROR ); - } - /*printing the results and cleanup*/ - show_info_level_3( &info ); - free_data_level_3( &info ); - if( 3 < infoLevel ) - { - show_info_level_4( &info ); - free_data_level_4( &info ); - } - checkVal = OTF_HandlerArray_close( handles ); - otfinfo_assert( checkVal ); - checkVal = OTF_Reader_close( reader ); - otfinfo_assert( checkVal ); - OTF_FileManager_close( manager ); - } - - free( info.filePrefix ); - - return 0; -} - -static void set_handles_level_1( OTF_HandlerArray *handles, - definitionInfoT *info ) -{ - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleUnknownRecord, - OTF_UNKNOWN_RECORD ); - - /*handler and inits for getting the creator name*/ - info->creatorName = NULL; - OTF_HandlerArray_setHandler( handles, (OTF_FunctionPointer*)handleDefCreator, - OTF_DEFCREATOR_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFCREATOR_RECORD ); - - /*handler and inits for getting the otf version*/ - info->otfVersionString = NULL; - info->otfVersionMajor = 0; - info->otfVersionMinor = 0; - info->otfVersionSub = 0; - OTF_HandlerArray_setHandler( handles, (OTF_FunctionPointer*)handleDefVersion, - OTF_DEFVERSION_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFVERSION_RECORD ); - - /*handler and inits for getting the count of process definitions*/ - info->counterProcessDefinition = 0; - OTF_HandlerArray_setHandler( handles, (OTF_FunctionPointer*)handleDefProcess, - OTF_DEFPROCESS_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFPROCESS_RECORD ); - - /*handler and inits for getting the timer resolution*/ - info->timerResolution = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefTimerResolution, - OTF_DEFTIMERRESOLUTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFTIMERRESOLUTION_RECORD ); - - /*handler and inits for getting comments*/ - info->definitionComments = NULL; - info->counterDefinitionComment = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefinitionComment, - OTF_DEFINITIONCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFINITIONCOMMENT_RECORD ); -} - -static void show_info_level_1( definitionInfoT *info ) -{ - uint32_t i = 0, index = 0; - double resolution = info->timerResolution; - double fileSize = info->traceFileSize; - char* unitTimer; - char* unitFileSize; - - /*formating the timerresolution*/ - while( (resolution / 1000 >= 1.0) && (i < 4) ) - { - resolution /= 1000; - i++; - } - switch( i ) - { - case 0: unitTimer = "Hz";break; - case 1: unitTimer = "KHz";break; - case 2: unitTimer = "MHz";break; - default: unitTimer = "GHz";break; - } - - /*formating the size of the event files*/ - i = 0; - while( (fileSize / 1024 >= 1.0) && (i < 5) ) - { - fileSize /= 1024; - i++; - } - switch( i ) - { - case 0: unitFileSize = "Bytes"; break; - case 1: unitFileSize = "KB"; break; - case 2: unitFileSize = "MB"; break; - case 3: unitFileSize = "GB"; break; - default: unitFileSize = "TB";break; - } - - printf( "\n##############" ); - printf( "\n#info level 1#" ); - printf( "\n##############\n" ); - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "| general information \n" ); - printf( "+----------------------+--------------------------------------------------------\n" ); - printf( "| tracefile name | %s\n", info->filePrefix ); - printf( "| creator of the trace | %s\n", info->creatorName ); - printf( "| used OTF version | %i.%i.%i %s\n", info->otfVersionMajor, - info->otfVersionMinor, info->otfVersionSub, info->otfVersionString ); - printf( "| event files size | %.2f %s\n", fileSize,unitFileSize ); - printf( "| process definitions | %llu\n", - (unsigned long long)info->counterProcessDefinition ); - printf( "| timer resolution | %.2f %s\n",resolution,unitTimer ); - printf( "+----------------------+--------------------------------------------------------\n" ); - index = info->counterDefinitionComment; - printf( "| definition comments\n" ); - printf( "+-------------------------------------------------------------------------------\n" ); - for( i = 0; i < index; i++ ) - { - printf( "| %s\n", info->definitionComments[i] ); - } - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "\n" ); -} - -static void free_data_level_1( definitionInfoT *info ) -{ - uint32_t i, index; - free( info->creatorName ); - - index = info->counterDefinitionComment; - for( i = 0; i < index; i++ ) - { - free( info->definitionComments[i] ); - } - free( info->definitionComments ); - free( info->otfVersionString ); -} - -static void set_handles_level_2( OTF_HandlerArray *handles, definitionInfoT *info ) -{ - /*handler and inits for getting the count of function definitions*/ - info->counterFunctionDefinition = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefFunction, - OTF_DEFFUNCTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFFUNCTION_RECORD ); - - /*handler and inits for getting the count of counter definitions*/ - info->counterCounterDefinition = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefCounter, - OTF_DEFCOUNTER_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFCOUNTER_RECORD ); - - /*handler and inits for getting the count of marker definitions*/ - info->counterDefinitionMarker = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefMarker, - OTF_DEFMARKER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFMARKER_RECORD ); - - /*handler and inits for getting the count of process group definitions*/ - info->counterProcessGroupDefinition = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefProcessGroup, - OTF_DEFPROCESSGROUP_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFPROCESSGROUP_RECORD ); - - /*handler and inits for getting the count of function group definitions*/ - info->counterFunctionGroupDefinition = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefFunctionGroup, - OTF_DEFFUNCTIONGROUP_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFFUNCTIONGROUP_RECORD ); - - /*handler and inits for getting the count of counter group definitions*/ - info->counterCounterGroupDefinition = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefCounterGroup, - OTF_DEFCOUNTERGROUP_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFCOUNTERGROUP_RECORD ); - - /*handler and inits for getting the source files*/ - info->sourceFileNames = NULL; - info->counterSourceFileName = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefSclFile, - OTF_DEFSCLFILE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFSCLFILE_RECORD ); -} - -static void show_info_level_2( definitionInfoT *info ) -{ - int index,i; - - printf( "\n##############" ); - printf( "\n#info level 2#" ); - printf( "\n##############\n" ); - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "| trace content\n" ); - printf( "+----------------------------+--------------------------------------------------\n" ); - printf( "| function definitions | %llu\n", - (unsigned long long)info->counterFunctionDefinition ); - printf( "| counter definitions | %llu\n", - (unsigned long long)info->counterCounterDefinition ); - printf( "| marker definitions | %llu\n", - (unsigned long long)info->counterDefinitionMarker ); - printf( "| |\n" ); - printf( "| process group definitions | %llu\n", - (unsigned long long)info->counterProcessGroupDefinition ); - printf( "| function group definitions | %llu\n", - (unsigned long long)info->counterFunctionGroupDefinition ); - printf( "| counter group definitions | %llu\n", - (unsigned long long)info->counterCounterGroupDefinition ); - printf( "+----------------------------+--------------------------------------------------\n" ); - - index = info->counterSourceFileName; - printf( "| source file names\n" ); - printf( "+-------------------------------------------------------------------------------\n" ); - for( i = 0; i < index; i++) - { - printf( "| %s\n", info->sourceFileNames[i] ); - } - printf( "+-------------------------------------------------------------------------------\n" ); -} - -static void free_data_level_2( definitionInfoT *info ) -{ - int i, index; - - index = info->counterSourceFileName; - - for( i = 0; i < index; i++ ) - { - free( (info->sourceFileNames)[i] ); - } - free( info->sourceFileNames ); -} - -static void set_handles_level_3( OTF_HandlerArray *handles, - definitionInfoT *info ) -{ - uint64_t i = 0; - - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleUnknownRecord, - OTF_UNKNOWN_RECORD ); - - /*handler and inits for getting the count of enters*/ - info->counterEnter = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleEnter, - OTF_ENTER_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_ENTER_RECORD ); - - /*handler and inits for getting the count of leaves*/ - info->counterLeave = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleLeave, - OTF_LEAVE_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_LEAVE_RECORD ); - - /*handler and inits for getting the count of sends*/ - info->counterSend = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleSendMsg, - OTF_SEND_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_SEND_RECORD ); - - /*handler and inits for getting the count of receives*/ - info->counterReceive = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleRecvMsg, - OTF_RECEIVE_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_RECEIVE_RECORD ); - - /*handler and inits for getting the count of RMA puts*/ - info->counterRMAPut = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleRMAPut, - OTF_RMAPUT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_RMAPUT_RECORD ); - - /*handler and inits for getting the count RAM put remote end*/ - info->counterRMAPutRemoteEnd = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleRMAPutRemoteEnd, - OTF_RMAPUTRE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_RMAPUTRE_RECORD ); - - /*handler and inits for getting the count of RMA get*/ - info->counterRMAGet = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleRMAGet, - OTF_RMAGET_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_RMAGET_RECORD ); - - /*handler and inits for getting the count of RMA end*/ - info->counterRMAEnd = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleRMAEnd, - OTF_RMAEND_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_RMAEND_RECORD ); - - /*handler and inits for getting the count of collective operations*/ - info->counterCollectiveOperation = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefCollectiveOperation, - OTF_DEFCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFCOLLOP_RECORD ); - - /*handler and inits for getting the count of file operations*/ - info->counterFileOperation = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleFileOperation, - OTF_FILEOPERATION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_FILEOPERATION_RECORD ); - - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleEndFileOperation, - OTF_ENDFILEOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_ENDFILEOP_RECORD ); - - /*handler and inits for getting the count of snapshots*/ - info->counterSnapshot = 0; - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleEnterSnapshot, - OTF_ENTERSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_ENTERSNAPSHOT_RECORD ); - - (info->counters) = (counterT*)malloc( info->counterCounterDefinition * - sizeof(counterT) ); - for( i = 0; i < info->counterCounterDefinition; i++ ) - { - (info->counters)[i].name = NULL; - (info->counters)[i].id = 0; - (info->counters)[i].properties = 3; - (info->counters)[i].processMap = NULL; - } - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefCounter, - OTF_DEFCOUNTER_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFCOUNTER_RECORD ); - - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleCounter, - OTF_COUNTER_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_COUNTER_RECORD ); - -} - -static void show_info_level_3( definitionInfoT *info ) -{ - uint64_t i; - - printf( "\n##############" ); - printf( "\n#info level 3#" ); - printf( "\n##############\n" ); - printf( "+-----------------------+-------------------------------------------------------\n" ); - printf( "| enters | %llu\n", - (unsigned long long)info->counterEnter ); - printf( "| leaves | %llu\n", - (unsigned long long)info->counterLeave ); - printf( "| sends | %llu\n", - (unsigned long long)info->counterSend ); - printf( "| receives | %llu\n", - (unsigned long long)info->counterReceive ); - printf( "| RMA Put | %llu\n", - (unsigned long long)info->counterRMAPut ); - printf( "| RMA Put remote end | %llu\n", - (unsigned long long)info->counterRMAPutRemoteEnd ); - printf( "| RMA Get | %llu\n", - (unsigned long long)info->counterRMAGet ); - printf( "| RMA End | %llu\n", - (unsigned long long)info->counterRMAEnd ); - printf( "| collective operations | %llu\n", - (unsigned long long)info->counterCollectiveOperation ); - printf( "| file operations | %llu\n", - (unsigned long long)info->counterFileOperation ); - printf( "| snapshots | %llu\n", - (unsigned long long)info->counterSnapshot ); - printf( "+-----------------------+-------------------------------------------------------\n" ); - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "| counters[%llu]\n", - (unsigned long long)info->counterCounterDefinition ); - printf( "+---------------+---------------------------------------------------------------\n" ); - for( i = 0; i < info->counterCounterDefinition; i++ ) - { - printf( "| name | %s\n", info->counters[i].name ); - if( ((info->counters[i].properties) & OTF_COUNTER_TYPE_BITS) == - OTF_COUNTER_TYPE_ACC ) - { - uint64_t lastValue = - process_get_sum_value( info->counters[i].processMap ); - uint64_t lastTime = - process_get_sum_time( info->counters[i].processMap ); - double average = - ((double)(lastValue)) * ((double)(info->timerResolution)) / - ((double)(lastTime)); - double highestRate = - process_get_highest_rate(info->counters[i].processMap); - - printf( "| last value | %llu\n", (unsigned long long)lastValue ); - printf( "| average rate | %7.4E per sec\n", average ); - printf( "| highest rate | %7.4E per sec\n", highestRate ); - } - printf( "| |\n" ); - } - printf( "+---------------+---------------------------------------------------------------\n" ); - printf( "\n" ); -} - -static void free_data_level_3( definitionInfoT *info ) -{ - uint64_t i; - - for( i = 0; i < info->counterCounterDefinition; i++ ) - { - free( (info->counters)[i].name ); - if( NULL != (info->counters)[i].processMap ) - hash_delete( (info->counters)[i].processMap ); - } - free( info->counters ); -} - -static void set_handles_level_4( OTF_HandlerArray *handles, - definitionInfoT *info ) -{ - /*handler and inits for getting the names of processes*/ - info->processNames = NULL; - info->processNames = (char**)calloc( info->counterProcessDefinition, - sizeof(char*) ); - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefProcess, - OTF_DEFPROCESS_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFPROCESS_RECORD ); - - /*handler and inits for getting the names of functions*/ - info->functionNames = NULL; - info->functionNames = (char**)calloc( info->counterFunctionDefinition, - sizeof(char*) ); - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefFunction, - OTF_DEFFUNCTION_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFFUNCTION_RECORD ); - - /*handler and inits for getting the names of markers*/ - info->markerNames = NULL; - info->markerNames = (char**)calloc( info->counterDefinitionMarker, - sizeof(char*) ); - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefMarker, - OTF_DEFMARKER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFMARKER_RECORD ); - - /*handler and inits for getting the names of processe groups*/ - info->processGroupNames = NULL; - info->processGroupNames = (char**)calloc( info->counterProcessGroupDefinition, - sizeof(char*) ); - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefProcessGroup, - OTF_DEFPROCESSGROUP_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFPROCESSGROUP_RECORD ); - - info->collectiveOperationNames = NULL; - - /*handler and inits for getting the names of function groups*/ - info->functionGroupNames = NULL; - info->functionGroupNames = (char**)calloc( info->counterFunctionGroupDefinition, - sizeof(char*) ); - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefFunctionGroup, - OTF_DEFFUNCTIONGROUP_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFFUNCTIONGROUP_RECORD ); - - /*handler and inits for getting the names of counter groupss*/ - info->counterGroupNames = NULL; - info->counterGroupNames = (char**)calloc( info->counterCounterGroupDefinition, - sizeof(char*) ); - OTF_HandlerArray_setHandler( handles, - (OTF_FunctionPointer*)handleDefCounterGroup, - OTF_DEFCOUNTERGROUP_RECORD); - OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFCOUNTERGROUP_RECORD ); -} - -static void show_info_level_4( definitionInfoT *info ) -{ - uint64_t i; - - printf( "\n##############" ); - printf( "\n#info level 4#" ); - printf( "\n##############\n" ); - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "| process definitions[%llu]\n", - (unsigned long long)info->counterProcessDefinition ); - printf( "+-------------------------------------------------------------------------------\n" ); - for( i = 0; i < info->counterProcessDefinition; i++ ) - { - printf( "| %s\n", info->processNames[i] ); - } - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "\n" ); - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "| function definitions[%llu]\n", - (unsigned long long)info->counterFunctionDefinition ); - printf( "+-------------------------------------------------------------------------------\n" ); - for(i = 0; i < info->counterFunctionDefinition; i++ ) - { - printf( "| %s\n",info->functionNames[i] ); - } - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "\n" ); - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "| marker definitions[%llu]\n", - (unsigned long long)info->counterDefinitionMarker ); - printf( "+-------------------------------------------------------------------------------\n" ); - for( i = 0; i < info->counterDefinitionMarker; i++ ) - { - printf( "| %s\n", info->markerNames[i] ); - } - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "\n" ); - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "| collective operation definitions[%llu]\n", - (unsigned long long)info->counterCollectiveOperation ); - printf( "+-------------------------------------------------------------------------------\n" ); - for( i = 0; i < info->counterCollectiveOperation; i++ ) - { - printf( "| %s\n", info->collectiveOperationNames[i] ); - } - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "\n" ); - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "| process group definitions[%llu]\n", - (unsigned long long)info->counterProcessGroupDefinition ); - printf( "+-------------------------------------------------------------------------------\n" ); - for( i = 0; i < info->counterProcessGroupDefinition; i++ ) - { - printf( "| %s\n", info->processGroupNames[i] ); - } - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "\n" ); - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "| function group definitions[%llu]\n", - (unsigned long long)info->counterFunctionGroupDefinition ); - printf( "+-------------------------------------------------------------------------------\n" ); - for( i = 0; i < info->counterFunctionGroupDefinition; i++ ) - { - printf( "| %s\n", info->functionGroupNames[i] ); - } - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "\n" ); - printf( "+-------------------------------------------------------------------------------\n" ); - printf( "| counter group definitions[%llu]\n", - (unsigned long long)info->counterCounterGroupDefinition ); - printf( "+-------------------------------------------------------------------------------\n" ); - for( i = 0; i < info->counterCounterGroupDefinition; i++ ) - { - printf( "| %s\n", info->counterGroupNames[i] ); - } - printf( "+-------------------------------------------------------------------------------\n" ); -} - -static void free_data_level_4( definitionInfoT *info ) -{ - uint64_t i; - - if( info->processNames != NULL ) - { - for( i = 0; i < info->counterProcessDefinition; i++ ) - { - free( (info->processNames)[i] ); - } - free( info->processNames ); - } - - if( info->processGroupNames != NULL ) - { - for( i = 0; i < info->counterProcessGroupDefinition; i++ ) - { - free( (info->processGroupNames)[i] ); - } - free( info->processGroupNames ); - } - - if( info->functionNames != NULL ) - { - for( i = 0; i < info->counterFunctionDefinition; i++ ) - { - free( (info->functionNames)[i] ); - } - free( info->functionNames ); - } - - if( info->functionGroupNames != NULL ) - { - for( i = 0; i < info->counterFunctionGroupDefinition; i++ ) - { - free( (info->functionGroupNames)[i] ); - } - free( info->functionGroupNames ); - } - - for(i = 0; i < info->counterCollectiveOperation; i++ ) - { - free( (info->collectiveOperationNames)[i] ); - } - free( info->collectiveOperationNames ); - - for(i = 0; i < info->counterCounterGroupDefinition; i++ ) - { - free( (info->counterGroupNames)[i] ); - } - free( info->counterGroupNames ); - - for( i = 0; i < info->counterDefinitionMarker; i++ ) - { - free( (info->markerNames)[i] ); - } - free( info->markerNames ); -} diff --git a/externals/otf/tools/otfinfo/otfinfo_error.c b/externals/otf/tools/otfinfo/otfinfo_error.c deleted file mode 100644 index f0794f04d39cf6e1223067503847633ff3c6eab7..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfinfo/otfinfo_error.c +++ /dev/null @@ -1,15 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Michael Heyde -*/ - -#include "otfinfo_error.h" - -#include <stdio.h> -#include <stdlib.h> - -void otfinfo_assert_impl(const char* file, int line, const char* expr) -{ - fprintf(stderr, "FATAL: %s:%d: Assertion `%s' failed\n",file, line, expr); - exit(1); -} diff --git a/externals/otf/tools/otfinfo/otfinfo_error.h b/externals/otf/tools/otfinfo/otfinfo_error.h deleted file mode 100644 index 2379d299b4a9d9a90be0d399c7df414c721ab377..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfinfo/otfinfo_error.h +++ /dev/null @@ -1,12 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Michael Heyde -*/ - -#ifndef OTFINFO_ERROR_H -#define OTFINFO_ERROR_H - -#define otfinfo_assert(expr) if(!(expr)) otfinfo_assert_impl(__FILE__, __LINE__, #expr); -void otfinfo_assert_impl(const char* f, int l, const char* expr); - -#endif /* OTFINFO_ERROR_H */ diff --git a/externals/otf/tools/otfmerge-mpi/Makefile.am b/externals/otf/tools/otfmerge-mpi/Makefile.am deleted file mode 100644 index 8fb60737e0b128ebc72e5133a09a678664ce7714..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge-mpi/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib $(MPI_INCLUDE_LINE) - -if AMBUILDBINARIES -bin_PROGRAMS = \ - otfmerge-mpi -endif - -CC = $(MPICC) - -otfmerge_mpi_LDADD = $(top_builddir)/otflib/libotf.la $(MPI_LIB_LINE) -otfmerge_mpi_DEPENDENCIES = $(top_builddir)/otflib/libotf.la -otfmerge_mpi_SOURCES = \ - handler.h \ - otfmerge-mpi.c \ - handler.c - diff --git a/externals/otf/tools/otfmerge-mpi/Makefile.in b/externals/otf/tools/otfmerge-mpi/Makefile.in deleted file mode 100644 index 14ad8cd7fafc81f612c4d1d9b55ced7e19df054a..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge-mpi/Makefile.in +++ /dev/null @@ -1,590 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@AMBUILDBINARIES_TRUE@bin_PROGRAMS = otfmerge-mpi$(EXEEXT) -subdir = tools/otfmerge-mpi -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_otfmerge_mpi_OBJECTS = otfmerge-mpi.$(OBJEXT) handler.$(OBJEXT) -otfmerge_mpi_OBJECTS = $(am_otfmerge_mpi_OBJECTS) -am__DEPENDENCIES_1 = -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(otfmerge_mpi_SOURCES) -DIST_SOURCES = $(otfmerge_mpi_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = $(MPICC) -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib $(MPI_INCLUDE_LINE) -otfmerge_mpi_LDADD = $(top_builddir)/otflib/libotf.la $(MPI_LIB_LINE) -otfmerge_mpi_DEPENDENCIES = $(top_builddir)/otflib/libotf.la -otfmerge_mpi_SOURCES = \ - handler.h \ - otfmerge-mpi.c \ - handler.c - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/otfmerge-mpi/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/otfmerge-mpi/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -otfmerge-mpi$(EXEEXT): $(otfmerge_mpi_OBJECTS) $(otfmerge_mpi_DEPENDENCIES) - @rm -f otfmerge-mpi$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(otfmerge_mpi_OBJECTS) $(otfmerge_mpi_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/handler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfmerge-mpi.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS 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-binPROGRAMS - -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: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - 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-binPROGRAMS 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 \ - uninstall-binPROGRAMS - - -# 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/externals/otf/tools/otfmerge-mpi/handler.c b/externals/otf/tools/otfmerge-mpi/handler.c deleted file mode 100644 index 762fd41392581612889819e22cb670298e691781..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge-mpi/handler.c +++ /dev/null @@ -1,1068 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Johannes Spazier -*/ - -#include "handler.h" - -/* definitions */ -int handleDefinitionComment (void *userData, uint32_t stream, const char *comment, - OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefinitionCommentKV( wstream, comment, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefTimerResolution (void *userData, uint32_t stream, uint64_t ticksPerSecond, - OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefTimerResolutionKV( wstream, ticksPerSecond, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefProcess (void *userData, uint32_t stream, uint32_t process, const char *name, - uint32_t parent, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefProcessKV( wstream, process, name, - parent, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefProcessGroup (void *userData, uint32_t stream, uint32_t procGroup, const char *name, - uint32_t numberOfProcs, const uint32_t *procs, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefProcessGroupKV( wstream, procGroup, name, - numberOfProcs, procs, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefAttributeList (void *userData, uint32_t stream, uint32_t attr_token, uint32_t num, - OTF_ATTR_TYPE *array, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefAttributeListKV( wstream, attr_token, - num, array, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefProcessOrGroupAttributes(void *userData, uint32_t stream, uint32_t proc_token, - uint32_t attr_token, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefProcessOrGroupAttributesKV( wstream, proc_token, - attr_token, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefFunction (void *userData, uint32_t stream, uint32_t func, const char *name, - uint32_t funcGroup, uint32_t source, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefFunctionKV( wstream, func, name, funcGroup, - source, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefFunctionGroup (void *userData, uint32_t stream, uint32_t funcGroup, - const char *name, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefFunctionGroupKV( wstream, funcGroup, - name, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefCollectiveOperation (void *userData, uint32_t stream, uint32_t collOp, - const char *name, uint32_t type, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefCollectiveOperationKV( wstream, collOp, - name, type, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefCounter (void *userData, uint32_t stream, uint32_t counter, const char *name, - uint32_t properties, uint32_t counterGroup, const char *unit, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefCounterKV( wstream, counter, name, - properties, counterGroup, unit, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefCounterGroup (void *userData, uint32_t stream, uint32_t counterGroup, const char *name, - OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefCounterGroupKV( wstream, counterGroup, - name, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefScl (void *userData, uint32_t stream, uint32_t source, uint32_t sourceFile, - uint32_t line, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefSclKV( wstream, source, sourceFile, - line, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefSclFile (void *userData, uint32_t stream, uint32_t sourceFile, const char *name, - OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefSclFileKV( wstream, sourceFile, - name, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefCreator (void *userData, uint32_t stream, const char *creator, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefCreatorKV( wstream, creator, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefVersion (void *userData, uint32_t stream, uint8_t major, uint8_t minor, - uint8_t sub, const char *string) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeOtfVersion( wstream ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefFile (void *userData, uint32_t stream, uint32_t token, const char *name, - uint32_t group, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefFileKV( wstream, token, name, - group, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefFileGroup (void *userData, uint32_t stream, uint32_t token, const char *name, - OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefFileGroupKV( wstream, token, name, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -int handleDefKeyValue (void *userData, uint32_t stream, uint32_t token, OTF_Type type, - const char *name, const char *desc, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - if( 0 != stream ) { - - fprintf( stderr, "Error: cannot merge traces with local definitions. Aborting.\n" ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_WStream_writeDefKeyValueKV( wstream, token, type, - name, desc, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - -/* events */ -int handleNoOp (void *userData, uint64_t time, uint32_t process, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeNoOpKV( wstream, time, process, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - -} - -int handleEnter( void *userData, uint64_t time, uint32_t function, uint32_t process, - uint32_t source, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeEnterKV( wstream, time, function, - process, source, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - -} - -int handleLeave( void *userData, uint64_t time, uint32_t function, uint32_t process, - uint32_t source, OTF_KeyValueList *list ) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeLeaveKV( wstream, time, function, - process, source, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleSendMsg( void *userData, uint64_t time, uint32_t sender, uint32_t receiver, - uint32_t group, uint32_t type, uint32_t length, uint32_t source, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeSendMsgKV( wstream, time, sender, receiver, group, - type, length, source, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleRecvMsg( void *userData, uint64_t time, uint32_t recvProc, uint32_t sendProc, - uint32_t group, uint32_t type, uint32_t length, uint32_t source, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeRecvMsgKV( wstream, time, recvProc, sendProc, - group, type, length, source, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleCounter( void *userData, uint64_t time, uint32_t process, uint32_t counter, - uint64_t value, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeCounterKV( wstream, time, process, counter, - value, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleCollectiveOperation( void *userData, uint64_t time, uint32_t process, uint32_t collective, - uint32_t procGroup, uint32_t rootProc, uint32_t sent, uint32_t received, uint64_t duration, - uint32_t source, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeCollectiveOperationKV( wstream, time, process, - collective, procGroup, rootProc, sent, received, duration, source, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleBeginCollectiveOperation( void *userData, uint64_t time, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received, - uint32_t scltoken, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeBeginCollectiveOperationKV( wstream, time, process, - collOp, matchingId, procGroup, rootProc, sent, received, scltoken, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleEndCollectiveOperation( void *userData, uint64_t time, uint32_t process, - uint64_t matchingId, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeEndCollectiveOperationKV( wstream, time, process, - matchingId, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleEventComment( void *userData, uint64_t time, uint32_t process, const char *comment, - OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeEventCommentKV( wstream, time, process, comment, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleBeginProcess( void *userData, uint64_t time, uint32_t process, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeBeginProcessKV( wstream, time, process, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleEndProcess( void *userData, uint64_t time, uint32_t process, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeEndProcessKV( wstream, time, process, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleFileOperation( void *userData, uint64_t time, uint32_t fileid, uint32_t process, - uint64_t handleid, uint32_t operation, uint64_t bytes, uint64_t duration, uint32_t source, - OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeFileOperationKV( wstream, time, fileid, - process, handleid, operation, bytes, duration, source, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleBeginFileOperation( void *userData, uint64_t time, uint32_t process, - uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeBeginFileOperationKV( wstream, time, process, - matchingId, scltoken, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleEndFileOperation( void *userData, uint64_t time, uint32_t process, - uint32_t fileid, uint64_t matchingId, uint64_t handleId, uint32_t operation, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeEndFileOperationKV( wstream, time, process, - fileid, matchingId, handleId, operation, bytes, scltoken, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleRMAPut( void *userData, uint64_t time, uint32_t process, uint32_t origin, - uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeRMAPutKV( wstream, time, process, origin, - target, communicator, tag, bytes, source, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleRMAPutRemoteEnd( void *userData, uint64_t time, uint32_t process, uint32_t origin, - uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, uint32_t source, - OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeRMAPutRemoteEndKV( wstream, time, process, origin, - target, communicator, tag, bytes, source, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleRMAGet( void *userData, uint64_t time, uint32_t process, uint32_t origin, - uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeRMAGetKV( wstream, time, process, origin, - target, communicator, tag, bytes, source, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleRMAEnd( void *userData, uint64_t time, uint32_t process, uint32_t remote, - uint32_t communicator, uint32_t tag, uint32_t source, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeRMAEndKV( wstream, time, process, remote, - communicator, tag, source, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -/* snapshots */ -int handleSnapshotComment(void *userData, uint64_t time, uint32_t process, const char *comment, - OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeSnapshotCommentKV( wstream, time, process, - comment, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleEnterSnapshot(void *userData, uint64_t time, uint64_t originaltime, uint32_t function, - uint32_t process, uint32_t source, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeEnterSnapshotKV( wstream, time, originaltime, function, - process, source, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - -} - -int handleSendSnapshot(void *userData, uint64_t time, uint64_t originaltime, - uint32_t sender, uint32_t receiver, uint32_t procGroup, uint32_t tag, - uint32_t length, uint32_t source, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeSendSnapshotKV( wstream, time, originaltime, sender, - receiver, procGroup, tag, length, source, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleOpenFileSnapshot(void *userData, uint64_t time, uint64_t originaltime, uint32_t fileid, - uint32_t process, uint64_t handleid, uint32_t source, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeOpenFileSnapshotKV( wstream, time, originaltime, fileid, - process, handleid, source, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - -} - -int handleBeginCollopSnapshot(void *userData, uint64_t time, uint64_t originaltime, uint32_t process, - uint32_t collOp, uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, uint64_t sent, - uint64_t received, uint32_t scltoken, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeBeginCollopSnapshotKV( wstream, time, originaltime, process, - collOp, matchingId, procGroup, rootProc, sent, received, scltoken, list) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleBeginFileOpSnapshot(void *userData, uint64_t time, uint64_t originaltime, uint32_t process, - uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeBeginFileOpSnapshotKV( wstream, time, originaltime, process, - matchingId, scltoken, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -/* statistics */ -int handleSummaryComment(void *userData, uint64_t time, uint32_t process, - const char *comment, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeSummaryCommentKV( wstream, time, process, comment, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleFunctionSummary(void *userData, uint64_t time, uint32_t function, - uint32_t process, uint64_t invocations, uint64_t exclTime, uint64_t inclTime, - OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeFunctionSummaryKV( wstream, time, function, process, - invocations, exclTime, inclTime, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleFunctionGroupSummary(void *userData, uint64_t time, uint32_t funcGroup, - uint32_t process, uint64_t invocations, uint64_t exclTime, uint64_t inclTime, - OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeFunctionGroupSummaryKV( wstream, time, funcGroup, - process, invocations, exclTime, inclTime, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleMessageSummary(void *userData, uint64_t time, uint32_t process, uint32_t peer, - uint32_t comm, uint32_t type, uint64_t sentNumber, uint64_t receivedNumber, - uint64_t sentBytes, uint64_t receivedBytes, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeMessageSummaryKV( wstream, time, process, - peer, comm, type, sentNumber, receivedNumber, sentBytes, receivedBytes, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleCollopSummary(void *userData, uint64_t time, uint32_t process, uint32_t comm, - uint32_t collective, uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes, - uint64_t receivedBytes, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeCollopSummaryKV( wstream, time, process, - comm, collective, sentNumber, receivedNumber, sentBytes, - receivedBytes, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleFileOperationSummary(void *userData, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t nopen, uint64_t nclose, uint64_t nread, uint64_t nwrite, - uint64_t nseek, uint64_t bytesread, uint64_t byteswrite, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeFileOperationSummaryKV( wstream, time, - fileid, process, nopen, nclose, nread, nwrite, nseek, bytesread, - byteswrite, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleFileGroupOperationSummary(void *userData, uint64_t time, uint32_t groupid, - uint32_t process, uint64_t nopen, uint64_t nclose, uint64_t nread, uint64_t nwrite, - uint64_t nseek, uint64_t bytesread, uint64_t byteswrite, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeFileGroupOperationSummaryKV( wstream, time, - groupid, process, nopen, nclose, nread, nwrite, nseek, bytesread, - byteswrite, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -/* marker */ -int handleDefMarker( void *userData, uint32_t stream, uint32_t token, const char *name, - uint32_t type, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeDefMarkerKV( wstream, token, name, type, - list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleMarker( void *userData, uint64_t time, uint32_t process, uint32_t token, - const char *text, OTF_KeyValueList *list) { - - - OTF_WStream* wstream = (OTF_WStream*) userData; - - return ( 0 == OTF_WStream_writeMarkerKV( wstream, time, process, token, - text, list) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -/* unknown */ -int handleUnknownRecord (void *userData, uint64_t time, uint32_t process, const char *record) { - - - fprintf( stderr, "Error: unknown record >%s< at process 0x%x\n", record, process ); - - return OTF_RETURN_ABORT; -} - - -void setDefinitionHandlerArray( OTF_HandlerArray* handlers, OTF_WStream* wstream) { - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefinitionComment, - OTF_DEFINITIONCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFINITIONCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefTimerResolution, - OTF_DEFTIMERRESOLUTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFTIMERRESOLUTION_RECORD); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefProcess, - OTF_DEFPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefProcessGroup, - OTF_DEFPROCESSGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFPROCESSGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefAttributeList, - OTF_DEFATTRLIST_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFATTRLIST_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefProcessOrGroupAttributes, - OTF_DEFPROCESSORGROUPATTR_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFPROCESSORGROUPATTR_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFunction, - OTF_DEFFUNCTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFFUNCTION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFunctionGroup, - OTF_DEFFUNCTIONGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFFUNCTIONGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCollectiveOperation, - OTF_DEFCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCounter, - OTF_DEFCOUNTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFCOUNTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCounterGroup, - OTF_DEFCOUNTERGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFCOUNTERGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefScl, - OTF_DEFSCL_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFSCL_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefSclFile, - OTF_DEFSCLFILE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFSCLFILE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefVersion, - OTF_DEFVERSION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFVERSION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCreator, - OTF_DEFCREATOR_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFCREATOR_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFile, - OTF_DEFFILE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFFILE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFileGroup, - OTF_DEFFILEGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFFILEGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefKeyValue, - OTF_DEFKEYVALUE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFKEYVALUE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefMarker, - OTF_DEFMARKER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_DEFMARKER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleUnknownRecord, - OTF_UNKNOWN_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_UNKNOWN_RECORD ); -} - -void setEventHandlerArray( OTF_HandlerArray* handlers, OTF_WStream* wstream) { - - /* events */ - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEventComment, - OTF_EVENTCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_EVENTCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleCounter, - OTF_COUNTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_COUNTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleNoOp, - OTF_NOOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_NOOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEnter, - OTF_ENTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_ENTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleCollectiveOperation, - OTF_COLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_COLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginCollectiveOperation, - OTF_BEGINCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_BEGINCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndCollectiveOperation, - OTF_ENDCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_ENDCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRecvMsg, - OTF_RECEIVE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_RECEIVE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleSendMsg, - OTF_SEND_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_SEND_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleLeave, - OTF_LEAVE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_LEAVE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginProcess, - OTF_BEGINPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_BEGINPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndProcess, - OTF_ENDPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_ENDPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFileOperation, - OTF_FILEOPERATION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_FILEOPERATION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginFileOperation, - OTF_BEGINFILEOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_BEGINFILEOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndFileOperation, - OTF_ENDFILEOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_ENDFILEOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRMAPut, - OTF_RMAPUT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_RMAPUT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRMAPutRemoteEnd, - OTF_RMAPUTRE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_RMAPUTRE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRMAGet, - OTF_RMAGET_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_RMAGET_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRMAEnd, - OTF_RMAEND_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_RMAEND_RECORD ); - - /* snapshots */ - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleSnapshotComment, - OTF_SNAPSHOTCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_SNAPSHOTCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEnterSnapshot, - OTF_ENTERSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_ENTERSNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleSendSnapshot, - OTF_SENDSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_SENDSNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleOpenFileSnapshot, - OTF_OPENFILESNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_OPENFILESNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginCollopSnapshot, - OTF_BEGINCOLLOPSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_BEGINCOLLOPSNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginFileOpSnapshot, - OTF_BEGINFILEOPSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_BEGINFILEOPSNAPSHOT_RECORD ); - - /* statistics */ - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleSummaryComment, - OTF_SUMMARYCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_SUMMARYCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFunctionSummary, - OTF_FUNCTIONSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_FUNCTIONSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFunctionGroupSummary, - OTF_FUNCTIONGROUPSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_FUNCTIONGROUPSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleMessageSummary, - OTF_MESSAGESUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_MESSAGESUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleCollopSummary, - OTF_COLLOPSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_COLLOPSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFileOperationSummary, - OTF_FILEOPERATIONSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_FILEOPERATIONSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFileGroupOperationSummary, - OTF_FILEGROUPOPERATIONSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_FILEGROUPOPERATIONSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleMarker, - OTF_MARKER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_MARKER_RECORD ); - - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleUnknownRecord, - OTF_UNKNOWN_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - (void*) wstream, OTF_UNKNOWN_RECORD ); - -} diff --git a/externals/otf/tools/otfmerge-mpi/handler.h b/externals/otf/tools/otfmerge-mpi/handler.h deleted file mode 100644 index 248aa88cc2471ade138d8c081614747008162f7c..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge-mpi/handler.h +++ /dev/null @@ -1,244 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Johannes Spazier -*/ - -#ifndef HANDLER_H -#define HANDLER_H - -#include <mpi.h> -#include <stdlib.h> -#include <stdio.h> - -#include "otf.h" - -/* data structures */ - -typedef struct { - int id; - int num_cpus; - int *cpus; -} OutStream; - -typedef struct { - int num_ostreams; - OutStream *ostreams; -} RankData; - -typedef struct { - double progress; - uint8_t is_alive; -} ProgressBuf; - -typedef struct { - MPI_Request request; - ProgressBuf value; - ProgressBuf buf; - int num_cpus; - double percent; -} ProgressInfo; - -typedef struct { - int my_rank; - int num_ranks; - int ranks_alive; - double tmp_progress; - MPI_Datatype buftype; -} GlobalData; - -/* function declarations */ - -double update_progress( ProgressInfo* info, GlobalData* data, int cur_ostream, int num_ostreams); - -int finish_everything( char *infile, char* outfile, ProgressInfo* info, - RankData* rank_data, int ret ); - -void setDefinitionHandlerArray( OTF_HandlerArray* handlers, OTF_WStream* wstream); - -void setEventHandlerArray( OTF_HandlerArray* handlers, OTF_WStream* wstream); - - -/* handlers */ - -/* definitions */ - -int handleDefinitionComment (void *userData, uint32_t stream, const char *comment, - OTF_KeyValueList *list); - -int handleDefTimerResolution (void *userData, uint32_t stream, uint64_t ticksPerSecond, - OTF_KeyValueList *list); - -int handleDefProcess (void *userData, uint32_t stream, uint32_t process, const char *name, - uint32_t parent, OTF_KeyValueList *list); - -int handleDefProcessGroup (void *userData, uint32_t stream, uint32_t procGroup, const char *name, - uint32_t numberOfProcs, const uint32_t *procs, OTF_KeyValueList *list); - -int handleDefAttributeList (void *userData, uint32_t stream, uint32_t attr_token, uint32_t num, - OTF_ATTR_TYPE *array, OTF_KeyValueList *list); - -int handleDefProcessOrGroupAttributes(void *userData, uint32_t stream, uint32_t proc_token, - uint32_t attr_token, OTF_KeyValueList *list); - -int handleDefFunction (void *userData, uint32_t stream, uint32_t func, const char *name, - uint32_t funcGroup, uint32_t source, OTF_KeyValueList *list); - -int handleDefFunctionGroup (void *userData, uint32_t stream, uint32_t funcGroup, - const char *name, OTF_KeyValueList *list); - -int handleDefCollectiveOperation (void *userData, uint32_t stream, uint32_t collOp, - const char *name, uint32_t type, OTF_KeyValueList *list); - -int handleDefCounter (void *userData, uint32_t stream, uint32_t counter, const char *name, - uint32_t properties, uint32_t counterGroup, const char *unit, OTF_KeyValueList *list); - -int handleDefCounterGroup (void *userData, uint32_t stream, uint32_t counterGroup, const char *name, - OTF_KeyValueList *list); - -int handleDefScl (void *userData, uint32_t stream, uint32_t source, uint32_t sourceFile, - uint32_t line, OTF_KeyValueList *list); - -int handleDefSclFile (void *userData, uint32_t stream, uint32_t sourceFile, const char *name, - OTF_KeyValueList *list); - -int handleDefCreator (void *userData, uint32_t stream, const char *creator, OTF_KeyValueList *list); - -int handleDefVersion (void *userData, uint32_t stream, uint8_t major, uint8_t minor, - uint8_t sub, const char *string); - -int handleDefFile (void *userData, uint32_t stream, uint32_t token, const char *name, - uint32_t group, OTF_KeyValueList *list); - -int handleDefFileGroup (void *userData, uint32_t stream, uint32_t token, const char *name, - OTF_KeyValueList *list); - -int handleDefKeyValue (void *userData, uint32_t stream, uint32_t token, OTF_Type type, - const char *name, const char *desc, OTF_KeyValueList *list); - -/* events */ - -int handleNoOp (void *userData, uint64_t time, uint32_t process, OTF_KeyValueList *list); - -int handleEnter (void *userData, uint64_t time, uint32_t function, uint32_t process, - uint32_t source, OTF_KeyValueList *list); - -int handleLeave( void *userData, uint64_t time, uint32_t function, uint32_t process, - uint32_t source, OTF_KeyValueList *list ); - -int handleSendMsg( void *userData, uint64_t time, uint32_t sender, uint32_t receiver, - uint32_t group, uint32_t type, uint32_t length, uint32_t source, OTF_KeyValueList *list); - -int handleRecvMsg( void *userData, uint64_t time, uint32_t recvProc, uint32_t sendProc, - uint32_t group, uint32_t type, uint32_t length, uint32_t source, OTF_KeyValueList *list); - -int handleCounter( void *userData, uint64_t time, uint32_t process, uint32_t counter, - uint64_t value, OTF_KeyValueList *list); - -int handleCollectiveOperation( void *userData, uint64_t time, uint32_t process, uint32_t collective, - uint32_t procGroup, uint32_t rootProc, uint32_t sent, uint32_t received, uint64_t duration, - uint32_t source, OTF_KeyValueList *list); - -int handleBeginCollectiveOperation( void *userData, uint64_t time, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, uint64_t sent, uint64_t received, - uint32_t scltoken, OTF_KeyValueList *list); - -int handleEndCollectiveOperation( void *userData, uint64_t time, uint32_t process, - uint64_t matchingId, OTF_KeyValueList *list); - -int handleEventComment( void *userData, uint64_t time, uint32_t process, const char *comment, - OTF_KeyValueList *list); - -int handleBeginProcess( void *userData, uint64_t time, uint32_t process, OTF_KeyValueList *list); - -int handleEndProcess( void *userData, uint64_t time, uint32_t process, OTF_KeyValueList *list); - -int handleFileOperation( void *userData, uint64_t time, uint32_t fileid, uint32_t process, - uint64_t handleid, uint32_t operation, uint64_t bytes, uint64_t duration, uint32_t source, - OTF_KeyValueList *list); - -int handleBeginFileOperation( void *userData, uint64_t time, uint32_t process, - uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *list); - -int handleEndFileOperation( void *userData, uint64_t time, uint32_t process, - uint32_t fileid, uint64_t matchingId, uint64_t handleId, uint32_t operation, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList *list); - -int handleRMAPut( void *userData, uint64_t time, uint32_t process, uint32_t origin, - uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source, OTF_KeyValueList *list); - -int handleRMAPutRemoteEnd( void *userData, uint64_t time, uint32_t process, uint32_t origin, - uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, uint32_t source, - OTF_KeyValueList *list); - -int handleRMAGet( void *userData, uint64_t time, uint32_t process, uint32_t origin, - uint32_t target, uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t source, OTF_KeyValueList *list); - -int handleRMAEnd( void *userData, uint64_t time, uint32_t process, uint32_t remote, - uint32_t communicator, uint32_t tag, uint32_t source, OTF_KeyValueList *list); - -/* snapshots */ - -int handleSnapshotComment (void *userData, uint64_t time, uint32_t process, const char *comment, - OTF_KeyValueList *list); - -int handleEnterSnapshot (void *userData, uint64_t time, uint64_t originaltime, uint32_t function, - uint32_t process, uint32_t source, OTF_KeyValueList *list); - -int handleSendSnapshot (void *userData, uint64_t time, uint64_t originaltime, - uint32_t sender, uint32_t receiver, uint32_t procGroup, uint32_t tag, - uint32_t length, uint32_t source, OTF_KeyValueList *list); - -int handleOpenFileSnapshot (void *userData, uint64_t time, uint64_t originaltime, uint32_t fileid, - uint32_t process, uint64_t handleid, uint32_t source, OTF_KeyValueList *list); - -int handleBeginCollopSnapshot(void *userData, uint64_t time, uint64_t originaltime, uint32_t process, - uint32_t collOp, uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, uint64_t sent, - uint64_t received, uint32_t scltoken, OTF_KeyValueList *list); - -int handleBeginFileOpSnapshot(void *userData, uint64_t time, uint64_t originaltime, uint32_t process, - uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *list); - -/* statistics */ - -int handleSummaryComment (void *userData, uint64_t time, uint32_t process, - const char *comment, OTF_KeyValueList *list); - -int handleFunctionSummary (void *userData, uint64_t time, uint32_t function, - uint32_t process, uint64_t invocations, uint64_t exclTime, uint64_t inclTime, - OTF_KeyValueList *list); - -int handleFunctionGroupSummary (void *userData, uint64_t time, uint32_t funcGroup, - uint32_t process, uint64_t invocations, uint64_t exclTime, uint64_t inclTime, - OTF_KeyValueList *list); - -int handleMessageSummary (void *userData, uint64_t time, uint32_t process, uint32_t peer, - uint32_t comm, uint32_t type, uint64_t sentNumber, uint64_t receivedNumber, - uint64_t sentBytes, uint64_t receivedBytes, OTF_KeyValueList *list); - -int handleCollopSummary (void *userData, uint64_t time, uint32_t process, uint32_t comm, - uint32_t collective, uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes, - uint64_t receivedBytes, OTF_KeyValueList *list); - -int handleFileOperationSummary (void *userData, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t nopen, uint64_t nclose, uint64_t nread, uint64_t nwrite, - uint64_t nseek, uint64_t bytesread, uint64_t byteswrite, OTF_KeyValueList *list); - -int handleFileGroupOperationSummary (void *userData, uint64_t time, uint32_t groupid, - uint32_t process, uint64_t nopen, uint64_t nclose, uint64_t nread, uint64_t nwrite, - uint64_t nseek, uint64_t bytesread, uint64_t byteswrite, OTF_KeyValueList *list); - -/* marker */ - -int handleDefMarker( void *userData, uint32_t stream, uint32_t token, const char *name, - uint32_t type, OTF_KeyValueList *list); - -int handleMarker( void *userData, uint64_t time, uint32_t process, uint32_t token, - const char *text, OTF_KeyValueList *list); - -/* unknown */ - -int handleUnknownRecord (void *userData, uint64_t time, uint32_t process, const char *record); - -#endif /* HANDLER_H */ diff --git a/externals/otf/tools/otfmerge-mpi/otfmerge-mpi.c b/externals/otf/tools/otfmerge-mpi/otfmerge-mpi.c deleted file mode 100644 index 0274b99dc16d1c4999c2f015db6435fff94cbf3b..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge-mpi/otfmerge-mpi.c +++ /dev/null @@ -1,988 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Johannes Spazier -*/ - -#include "handler.h" - -#define fprintf_root if(my_rank == 0) fprintf - -#define FINISH_EVERYTHING(ret) finish_everything( infile, outfile, info, &rank_data, ret ) - -#define SHOW_HELPTEXT if(my_rank == 0) { \ - int l = 0; while( helptext[l] ) { fprintf( stdout, "%s", helptext[l++] ); } } - -static const char* helptext[] = { -" otfmerge-mpi - an MPI implementation of otfmerge \n", -" \n", -" otfmerge-mpi [options] <input file name> \n", -" \n", -" options: \n", -" -h, --help show this help message \n", -" -V show OTF version \n", -" -n <n> set number of streams for output \n", -" set this to 0 for using one stream per process \n", -" default is 1 \n", -" -f <n> set max number of filehandles available per rank \n", -" -o <name> namestub of the output file (default 'out') \n", -" -rb <size> set buffersize of the reader (for each rank) \n", -" -wb <size> set buffersize of the writer (for each rank) \n", -" -stats cover statistics too \n", -" -snaps cover snapshots too \n", -" -z <zlevel> write compressed output \n", -" zlevel reaches from 0 to 9 where 0 is no \n", -" compression and 9 is the highest level \n", -" -l write long OTF format \n", -" -p show progress \n", -" \n", NULL }; - -int main(int argc, char **argv) { - - /* for all processes */ - int i, j; - int my_rank; - int num_ranks; - uint64_t ret_read; - int show_progress = 0; - int max_fhandles = 100; - char *outfile = NULL; - char *infile = NULL; - int rbufsize = 1024 * 1024; - int wbufsize = 1024 * 1024; - int format = OTF_WSTREAM_FORMAT_SHORT; - int read_stats = 0; - int read_snaps = 0; - OTF_FileCompression compression= 0; - RankData rank_data = { 0 ,NULL }; - ProgressInfo *info = NULL; - GlobalData global_data; - - /* only for root process (0) */ - int num_cpus; /* number of cpus in input otf-file */ - int *cpus; /* global array that contains all cpu-ids */ - int offset; - int *p; - int num_ostreams = 1; - char *outfile_otf = NULL; - FILE *master_file = NULL; - OutStream *ostreams = NULL; - - - /* progress related */ - uint64_t total_bytes = 0; - uint64_t cur_bytes = 0; - uint64_t cur_bytes_ges = 0; - uint64_t min, max, cur; - struct timeval tv; - - /* OTF related */ - OTF_Reader* reader = NULL; - OTF_WStream* wstream = NULL; - OTF_HandlerArray* handlers = NULL; - OTF_MasterControl* master = NULL; - OTF_FileManager* manager = NULL; - OTF_MapEntry* entry = NULL; - - MPI_Status status; - - int array_of_blocklengths[2]; - MPI_Aint array_of_displacements[2]; - MPI_Datatype array_of_types[2]; - - MPI_Aint first_var_address; - MPI_Aint second_var_address; - - - MPI_Init(&argc, &argv); - - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &num_ranks); - - /* store some important things in a global structure */ - global_data.my_rank = my_rank; - global_data.num_ranks = num_ranks; - global_data.ranks_alive = num_ranks - 1; - - /* argument handling */ - if ( 1 >= argc ) { - - SHOW_HELPTEXT - - MPI_Finalize(); - - return 0; - } - - for ( i = 1; i < argc; i++ ) { - - if ( ( 0 == strcmp( "-o", argv[i] ) ) && ( i+1 < argc ) ) { - - /* must be free'd at the end */ - outfile = OTF_stripFilename( argv[i+1] ); - ++i; - - } else if ( ( 0 == strcmp( "-n", argv[i] ) ) && ( i+1 < argc ) ) { - - num_ostreams = atoi( argv[i+1] ); - ++i; - - } else if ( 0 == strcmp( "-h", argv[i] ) || 0 == strcmp( "--help", argv[i] ) ) { - - SHOW_HELPTEXT - - return FINISH_EVERYTHING(0); - - } else if ( 0 == strcmp( "-V", argv[i] ) ) { - - fprintf_root( stdout, "%u.%u.%u \"%s\"\n", OTF_VERSION_MAJOR, OTF_VERSION_MINOR, - OTF_VERSION_SUB, OTF_VERSION_STRING ); - - return FINISH_EVERYTHING(0); - - } else if ( 0 == strcmp( "-p", argv[i] ) ) { - - show_progress = 1; - - } else if ( ( 0 == strcmp( "-f", argv[i] ) ) && ( i+1 < argc ) ) { - - max_fhandles = atoi( argv[i+1] ); - ++i; - - } else if ( ( 0 == strcmp( "-rb", argv[i] ) ) && ( i+1 < argc ) ) { - - rbufsize = atoi( argv[i+1] ); - ++i; - - } else if ( ( 0 == strcmp( "-wb", argv[i] ) ) && ( i+1 < argc ) ) { - - wbufsize = atoi( argv[i+1] ); - ++i; - - } else if ( ( 0 == strcmp( "-z", argv[i] ) ) && ( i+1 < argc ) ) { - - compression = atoi( argv[i+1] ); - ++i; - - } else if ( 0 == strcmp( "-l", argv[i] ) ) { - - format = OTF_WSTREAM_FORMAT_LONG; - - } else if ( 0 == strcmp( "-snaps", argv[i] ) ) { - - read_snaps = 1; - - } else if ( 0 == strcmp( "-stats", argv[i] ) ) { - - read_stats = 1; - - } else { - - if ( '-' != argv[i][0] ) { - - /* must be free'd at the end */ - infile = OTF_stripFilename( argv[i] ); - - } else { - - fprintf_root( stderr, "Error: unknown option: '%s'\n", argv[i] ); - - return FINISH_EVERYTHING(1); - - } - - } - - } - - if( ! outfile ) { - - outfile = strdup("out"); - - } else if( outfile[ strlen(outfile) -1 ] == '/' ) { - - strncat( outfile, "out", 3 ); - - } - - /* must be free'd at the end */ - outfile_otf = OTF_getFilename( outfile, 0, OTF_FILETYPE_MASTER, 0, NULL); - - /* check for neccessary options */ - if( infile == NULL ) { - - fprintf_root( stderr, "Error: no input file given.\n"); - - return FINISH_EVERYTHING(1); - - } - - if ( max_fhandles < 1 ) { - - fprintf_root( stderr, "Error: less than 1 filehandle is not permitted.\n" ); - - return FINISH_EVERYTHING(1); - - } - - if ( num_ostreams < 0 ) { - - fprintf_root( stderr, "Error: the number of streams must not be negative.\n" ); - - return FINISH_EVERYTHING(1); - - } - - if ( wbufsize < 0 || rbufsize < 0 ) { - - fprintf_root( stderr, "Error: buffersize must be greater or equal 0.\n" ); - - return FINISH_EVERYTHING(1); - - } - - if ( my_rank == 0 ) { - - /* read master of input file */ - manager = OTF_FileManager_open( max_fhandles ); - - if( NULL == manager ) { - fprintf( stderr, "Error: unable to initialize file manager.\n" ); - - return FINISH_EVERYTHING(1); - } - - master = OTF_MasterControl_new( manager ); - OTF_MasterControl_read( master, infile ); - - /* get the total number of processes in the otf master file */ - num_cpus = OTF_MasterControl_getrCount( master ); - - /* set one stream per process */ - if ( num_ostreams == 0 || num_ostreams > num_cpus ) { - num_ostreams = num_cpus; - } - - /* allocate memory */ - ostreams = (OutStream*) malloc( num_ostreams * sizeof(OutStream) ); - cpus = (int*) malloc( num_cpus * sizeof(int) ); - p = cpus; - - /* allocate memory for the info array */ - info = (ProgressInfo*) malloc( num_ranks * sizeof(ProgressInfo) ); - - /* fill the global cpus-array */ - i = 0; - while( 1 ) { - - entry = OTF_MasterControl_getEntryByIndex( master, i ); - - if( entry == NULL) { - break; - } - - for( j=0; (uint32_t)j < entry->n; j++) { - *p++ = entry->values[j]; - } - - i++; - - } - - /* open new master file for output */ - master_file = fopen( outfile_otf, "w"); - - if( NULL == master_file ) { - - fprintf( stderr, "Error: unable to open file \"%s\".\n", outfile_otf); - - free(cpus); - free( ostreams ); - - OTF_MasterControl_close( master ); - OTF_FileManager_close( manager ); - - return FINISH_EVERYTHING(1); - - } - - /* fill all ostreams with data and write the new master file */ - offset = 0; - for( i = 0; i < num_ostreams; i++ ) { - - ostreams[i].id = i + 1; - ostreams[i].num_cpus = ( num_cpus / num_ostreams) + - ( i < ( num_cpus % num_ostreams) ? 1 : 0 ); - - ostreams[i].cpus = (int*) malloc( ostreams[i].num_cpus * sizeof(int) ); - - /* append stream-id to new otf master file */ - fprintf( master_file, "%x:", ostreams[i].id); - - for(j = 0; j < ostreams[i].num_cpus; j++) { - - ostreams[i].cpus[j] = cpus[offset + j]; - - /* append cpu-id to master file */ - fprintf( master_file, "%x", ostreams[i].cpus[j]); - - if ( (j + 1) < ostreams[i].num_cpus) { - fprintf( master_file, ","); - } - - } - - fprintf( master_file, "\n"); - offset += ostreams[i].num_cpus; - - } - - /* close new master file */ - fclose(master_file); - - /* free global cpus-array, because it is not needed anymore */ - if( cpus ) { - free(cpus); - cpus = NULL; - } - - offset = 0; - /* send needed data to all ranks */ - for( i = (num_ranks - 1); i >= 0; i-- ) { - - /* get number of output-streams, rank i has to handle */ - rank_data.num_ostreams = ( num_ostreams / num_ranks) + - ( i < ( num_ostreams % num_ranks) ? 1 : 0 ); - - if( i > 0) { - - /* send number of output-streams to rank i */ - MPI_Ssend( &(rank_data.num_ostreams), 1, MPI_INT, i, 0, MPI_COMM_WORLD); - - } else { - - /* save number of output-streams for rank 0 in rank_data */ - rank_data.ostreams = (OutStream*) malloc( rank_data.num_ostreams * sizeof(OutStream) ); - - } - - info[i].num_cpus = 0; - /* go through all output-streams of rank i */ - for(j = 0; j < rank_data.num_ostreams; j++) { - - if( i > 0 ) { - - /* send data to rank */ - MPI_Ssend( &(ostreams[offset + j].id), 1, MPI_INT, i, 0, MPI_COMM_WORLD); - MPI_Ssend( &(ostreams[offset + j].num_cpus), 1, MPI_INT, i, 0, MPI_COMM_WORLD); - MPI_Ssend( ostreams[offset + j].cpus, ostreams[offset + j].num_cpus, MPI_INT, i, 0, MPI_COMM_WORLD); - - } else { - - /* save data for rank 0 */ - rank_data.ostreams[j].id = ostreams[offset + j].id; - rank_data.ostreams[j].num_cpus = ostreams[offset + j].num_cpus; - rank_data.ostreams[j].cpus = (int*) malloc(rank_data.ostreams[j].num_cpus * sizeof(int)); - memcpy(rank_data.ostreams[j].cpus, ostreams[offset + j].cpus, - rank_data.ostreams[j].num_cpus * (sizeof(int))); - - } - - info[i].num_cpus += ostreams[offset + j].num_cpus; - - } - - offset += rank_data.num_ostreams; - - } - - /* can be free'd here because all MPI_Ssends are finished --> they are synchron */ - for( i = 0; i < num_ostreams; i++ ) { - - if( ostreams[i].cpus ) { - free( ostreams[i].cpus ); - ostreams[i].cpus = NULL; - } - - } - - if( ostreams ) { - free( ostreams ); - ostreams = NULL; - } - - /* initialize the info array */ - for( i = 0; i < num_ranks; i++ ) { - - info[i].percent = (double) info[i].num_cpus / (double) num_cpus; - info[i].request = MPI_REQUEST_NULL; - info[i].value.progress = 0.0; - info[i].value.is_alive = 1; - - } - - /* close master */ - OTF_MasterControl_close( master ); - OTF_FileManager_close( manager ); - - } else { - - info = (ProgressInfo*) malloc( 1 * sizeof(ProgressInfo) ); - - info[0].request = MPI_REQUEST_NULL; - info[0].value.progress = 0.0; - info[0].value.is_alive = 1; - - /* receive number of output-streams for this rank */ - MPI_Recv( &(rank_data.num_ostreams), 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &status); - - /* allocate memory for output-streams */ - rank_data.ostreams = (OutStream*) malloc( rank_data.num_ostreams * sizeof(OutStream) ); - - /* go through all output streams */ - for( i = 0; i < rank_data.num_ostreams; i++ ) { - - /* receive id of output-stream and number of cpus in this stream */ - MPI_Recv( &(rank_data.ostreams[i].id), 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &status); - MPI_Recv( &(rank_data.ostreams[i].num_cpus), 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &status); - - /* allocate memory for cpus in stream */ - rank_data.ostreams[i].cpus = (int*) malloc( rank_data.ostreams[i].num_cpus * sizeof(int) ); - - /* receive all cpu-ids */ - MPI_Recv( rank_data.ostreams[i].cpus, rank_data.ostreams[i].num_cpus, MPI_INT, 0, 0, MPI_COMM_WORLD, &status ); - - } - - } - - if( show_progress ) { - - /* create new mpi datatype to transfer the progress */ - /* struct { - double progress; - uint8_t is_alive; - }; - */ - - array_of_blocklengths[0] = 1; - array_of_blocklengths[1] = 1; - - MPI_Address( &(info[0].value.progress), &first_var_address ); - MPI_Address( &(info[0].value.is_alive), &second_var_address); - - array_of_displacements[0] = (MPI_Aint) 0; - array_of_displacements[1] = second_var_address - first_var_address; - - array_of_types[0] = MPI_DOUBLE; - array_of_types[1] = MPI_BYTE; - - MPI_Type_struct( 2, array_of_blocklengths, array_of_displacements, - array_of_types, &(global_data.buftype) ); - - MPI_Type_commit( &(global_data.buftype) ); - - } - - - manager = OTF_FileManager_open( max_fhandles ); - if( NULL == manager ) { - - fprintf( stderr, "Error: unable to initialize file manager.\n" ); - - return FINISH_EVERYTHING(1); - - } - - /* the root process should read the definitions now */ - if( my_rank == 0 ) { - - wstream = OTF_WStream_open( outfile, 0, manager ); - - OTF_WStream_setBufferSizes( wstream, wbufsize ); - OTF_WStream_setCompression( wstream, compression ); - OTF_WStream_setFormat( wstream, format ); - - handlers = OTF_HandlerArray_open(); - - setDefinitionHandlerArray( handlers, wstream ); - - reader = OTF_Reader_open( infile, manager); - - if( reader == NULL) { - - fprintf( stderr, "Error: unable to open file %s.\n", infile ); - - OTF_HandlerArray_close( handlers ); - OTF_WStream_close( wstream ); - OTF_FileManager_close( manager ); - - return FINISH_EVERYTHING(1); - } - - OTF_Reader_setBufferSizes( reader, rbufsize ); - - if( OTF_READ_ERROR == OTF_Reader_readDefinitions( reader, handlers ) ) { - - fprintf( stderr, "Error: while reading definitions from file %s\n", infile ); - - OTF_Reader_close( reader ); - OTF_HandlerArray_close( handlers ); - OTF_WStream_close( wstream ); - OTF_FileManager_close( manager ); - - return FINISH_EVERYTHING(1); - } - - if( OTF_READ_ERROR == OTF_Reader_readMarkers( reader, handlers ) ) { - - fprintf( stderr, "Error: while reading markers from file %s\n", infile ); - - OTF_Reader_close( reader ); - OTF_HandlerArray_close( handlers ); - OTF_WStream_close( wstream ); - OTF_FileManager_close( manager ); - - return FINISH_EVERYTHING(1); - } - - /* close everything */ - OTF_HandlerArray_close( handlers ); - OTF_Reader_close( reader ); - OTF_WStream_close( wstream ); - - } - - /*MPI_Barrier(MPI_COMM_WORLD);*/ - - for( i = 0; i < rank_data.num_ostreams; i++ ) { - - total_bytes = 0; - cur_bytes = 0; - cur_bytes_ges = 0; - - wstream = OTF_WStream_open( outfile, rank_data.ostreams[i].id, manager ); - - OTF_WStream_setBufferSizes( wstream, wbufsize ); - OTF_WStream_setCompression( wstream, compression ); - OTF_WStream_setFormat( wstream, format ); - - handlers = OTF_HandlerArray_open(); - - setEventHandlerArray( handlers, wstream ); - - reader = OTF_Reader_open( infile, manager); - if( reader == NULL) { - - fprintf_root( stderr, "Error: unable to open file %s.\n", infile ); - - OTF_HandlerArray_close( handlers ); - OTF_WStream_close( wstream ); - OTF_FileManager_close( manager ); - - return FINISH_EVERYTHING(1); - } - - OTF_Reader_setBufferSizes( reader, rbufsize ); - - OTF_Reader_setProcessStatusAll ( reader, 0 ); - - for( j = 0; j < rank_data.ostreams[i].num_cpus; j++ ) { - - OTF_Reader_setProcessStatus( reader, rank_data.ostreams[i].cpus[j], 1 ); - - } - - if( show_progress ) { - - OTF_Reader_setRecordLimit( reader, 0 ); - - if( OTF_READ_ERROR == OTF_Reader_readEvents( reader, handlers ) ) { - - fprintf( stderr, "Error: while reading events from file %s\n", infile ); - - OTF_Reader_close( reader ); - OTF_HandlerArray_close( handlers ); - OTF_WStream_close( wstream ); - OTF_FileManager_close( manager ); - - return FINISH_EVERYTHING(1); - - } - - if( read_snaps ) { - - if( OTF_READ_ERROR == OTF_Reader_readSnapshots( reader, handlers ) ) { - - fprintf( stderr, "Error: while reading snaphots from file %s\n", infile ); - - OTF_Reader_close( reader ); - OTF_HandlerArray_close( handlers ); - OTF_WStream_close( wstream ); - OTF_FileManager_close( manager ); - - return FINISH_EVERYTHING(1); - - } - - } - - if( read_stats ) { - - if( OTF_READ_ERROR == OTF_Reader_readStatistics( reader, handlers ) ) { - - fprintf( stderr, "Error: while reading statistics from file %s\n", infile ); - - OTF_Reader_close( reader ); - OTF_HandlerArray_close( handlers ); - OTF_WStream_close( wstream ); - OTF_FileManager_close( manager ); - - return FINISH_EVERYTHING(1); - - } - - } - - OTF_Reader_eventBytesProgress( reader, &min, &cur, &max ); - /* (min - max) is erroneous because with small traces min == max --> division by zero */ - total_bytes += max; /* max - min */ - - if( read_snaps ) { - - OTF_Reader_snapshotBytesProgress( reader, &min, &cur, &max ); - total_bytes += max; /* max - min */ - - } - - if( read_stats ) { - - OTF_Reader_statisticBytesProgress( reader, &min, &cur, &max ); - total_bytes += max; /* max - min */ - - } - - OTF_Reader_setRecordLimit( reader, 100000 ); - - } - - while( 0 != ( ret_read = OTF_Reader_readEvents( reader, handlers ) ) ) { - - if( ret_read == OTF_READ_ERROR) { - - fprintf( stderr, "Error: while reading events from file %s\n", infile ); - - OTF_Reader_close( reader ); - OTF_HandlerArray_close( handlers ); - OTF_WStream_close( wstream ); - OTF_FileManager_close( manager ); - - return FINISH_EVERYTHING(1); - - } - - if( show_progress ) { - - OTF_Reader_eventBytesProgress( reader, &min, &cur, &max ); - - cur_bytes = cur; /* cur - min */ - - /* calculate rank specific progress for the current stream */ - global_data.tmp_progress = (double) ( (double) cur_bytes / (double) total_bytes ); - - update_progress( info, &global_data, i, rank_data.num_ostreams ); - - } - - } - - cur_bytes_ges = cur_bytes; - - /* read snapshots */ - if( read_snaps ) { - - while( 0 != ( ret_read = OTF_Reader_readSnapshots( reader, handlers ) ) ) { - - if( ret_read == OTF_READ_ERROR) { - - fprintf( stderr, "Error: while reading snapshots from file %s\n", infile ); - - OTF_Reader_close( reader ); - OTF_HandlerArray_close( handlers ); - OTF_WStream_close( wstream ); - OTF_FileManager_close( manager ); - - return FINISH_EVERYTHING(1); - - } - - if( show_progress ) { - - OTF_Reader_snapshotBytesProgress( reader, &min, &cur, &max ); - - cur_bytes = cur; /* cur - min */ - - /* calculate rank specific progress for the current stream */ - global_data.tmp_progress = (double) ( (double) (cur_bytes + cur_bytes_ges) / (double) total_bytes ); - - update_progress( info, &global_data, i, rank_data.num_ostreams ); - } - - } - - } - - cur_bytes_ges += cur_bytes; - - /* read statistics */ - if( read_stats ) { - - while( 0 != ( ret_read = OTF_Reader_readStatistics( reader, handlers ) ) ) { - - if( ret_read == OTF_READ_ERROR) { - - fprintf( stderr, "Error: while reading statistics from file %s\n", infile ); - - OTF_Reader_close( reader ); - OTF_HandlerArray_close( handlers ); - OTF_WStream_close( wstream ); - OTF_FileManager_close( manager ); - - return FINISH_EVERYTHING(1); - - } - - if( show_progress ) { - - OTF_Reader_statisticBytesProgress( reader, &min, &cur, &max ); - - cur_bytes = cur; /* cur - min */ - - /* calculate rank specific progress for the current stream */ - global_data.tmp_progress = (double) ( (double) (cur_bytes + cur_bytes_ges) / (double) total_bytes ); - - update_progress( info, &global_data, i, rank_data.num_ostreams ); - } - - } - - } - - /* read markers */ - while( 0 != ( ret_read = OTF_Reader_readMarkers( reader, handlers ) ) ) { - - if( ret_read == OTF_READ_ERROR) { - - fprintf( stderr, "Error: while reading markers from file %s\n", infile ); - - OTF_Reader_close( reader ); - OTF_HandlerArray_close( handlers ); - OTF_WStream_close( wstream ); - OTF_FileManager_close( manager ); - - return FINISH_EVERYTHING(1); - - } - - } - - /* close everything */ - OTF_HandlerArray_close( handlers ); - OTF_Reader_close( reader ); - OTF_WStream_close( wstream ); - - } - - /* wait for other processes to finish */ - if( show_progress ) { - - if( my_rank == 0 ) { - - /* set own progress to 100 % */ - global_data.tmp_progress = 1.0; - - /* check every 0.2 sec for new progress until all ranks have finished */ - while( 1 ) { - - /* update_progress() returns 0 if all ranks finished */ - if( ! update_progress( info, &global_data, 0, 1) ) { - break; - } - - /* sleep 0.2 s --> select is used because of portability */ - tv.tv_sec = 0; - tv.tv_usec = 200000; - select(0, NULL, NULL, NULL, &tv); - - } - - printf("%7.2f %% done\n", 100.0); - fflush( stdout ); - - /* clear all open requests in info array */ - for( i = 1; i < num_ranks; i++ ) { - - if( info[i].request != MPI_REQUEST_NULL ) { - - MPI_Cancel( &(info[i].request) ); - - } - - } - - } else { - - /* rank != 0 has finished and sends a last message to ranks 0 */ - - /* first wait until the previous msg was received by rank 0 */ - MPI_Wait( &(info[0].request), &status ); - /* fill buffer with valid values */ - info[0].value.progress = 100.0; - info[0].value.is_alive = 0; - /* send message and wait until the buffer is free for reuse */ - MPI_Isend( &(info[0].value.progress), 1, global_data.buftype, 0, 0, MPI_COMM_WORLD, &(info[0].request)); - MPI_Wait( &(info[0].request), &status ); - } - - } - - OTF_FileManager_close( manager ); - - /* clear everything and exit */ - return FINISH_EVERYTHING(0); -} - -double update_progress( ProgressInfo* info, GlobalData *data, int cur_ostream, int num_ostreams) { - - /* progress is a sum of all progresses sent by other ranks (proportionable) */ - static double progress = 0.0; - static int tmp = 0; - MPI_Status status; - int flag = 0; - int j; - char signs[2] = {' ','.'}; - - if( data->my_rank != 0 ) { - - /* check if previous msg was received by rank 0 already - --> if not, do nothing in this function; - else calculate new progress and send the result to root later on */ - MPI_Test( &(info[0].request), &flag, &status ); - - } - - /* calculate progress if necessary */ - if( data->my_rank == 0 || flag ) { - - info[0].value.progress = data->tmp_progress / (double)num_ostreams - + (double)cur_ostream * ( 1.0 / (double)num_ostreams ); - info[0].value.progress *= 100.0; - - } - - /* show progress */ - if( data->my_rank == 0) { - - /* set the roots progress as the global progress first (in the rigth proportion) */ - progress = info[0].value.progress * info[0].percent; - - /* listen to all ranks for new messages */ - for( j = 1; j < data->num_ranks; j++ ) { - - /* check if a new MPI_Irecv is necessary/if the previous msg was received */ - if ( MPI_REQUEST_NULL == info[j].request ) { - - /* irecv with derived datatype --> double progress, uint8_t is_alive */ - MPI_Irecv( &(info[j].buf.progress), 1, data->buftype, j, 0, MPI_COMM_WORLD, &(info[j].request) ); - - } - - /* test if current msg was received */ - MPI_Test( &(info[j].request), &flag, &status ); - - if( flag ) { - - /* got new values */ - - /* MPI_REQUEST_NULL indicates that a new MPI_Irecv is necessary */ - info[j].request = MPI_REQUEST_NULL; - /* the receive-buffer must be copied because its value is needed later on - and the buffer itself is locked by MPI_Irecv */ - info[j].value.progress = info[j].buf.progress; - - /* check if it was the last msg from rank j - --> the second field of the buffer (is_alive) would be 0 */ - if( ! info[j].buf.is_alive ) { - - /* decrease the number of still living ranks */ - data->ranks_alive--; - - } - - } - - /* add the progress of rank j proportionally to the global progress */ - progress += info[j].value.progress * info[j].percent; - - } - - /* print progress */ - printf("%7.2f %% %c\r", progress, signs[tmp]); - fflush(stdout); - - tmp ^= 1; - - } else { - - /* flag is only set if the send-buffer can be used again and a msg is necessary therefore */ - if( flag ) { - - /* send in synchronous mode --> this is because with MPI_Test we want to know if the root has - started a matching receive operation already and not only if we can reuse the send-buffer */ - MPI_Issend( &(info[0].value.progress), 1, data->buftype, 0, 0, MPI_COMM_WORLD, &(info[0].request)); - - } - - } - - /* returns 0 if all ranks have finished */ - return data->ranks_alive; -} - -int finish_everything( char *infile, char* outfile, ProgressInfo* info, RankData* data, int ret ) { - - int i; - - if( infile ) - free( infile ); - - if( outfile ) - free( outfile ); - - if( info ) - free( info ); - - if ( data->ostreams ) { - - for( i = 0; i < data->num_ostreams; i++ ) { - - if( data->ostreams[i].cpus ) - free( data->ostreams[i].cpus ); - - } - - free( data->ostreams ); - - } - - if( ret == 0 ) { - - MPI_Finalize(); - - } else { - - MPI_Abort( MPI_COMM_WORLD, ret ); - - } - - return ret; -} diff --git a/externals/otf/tools/otfmerge/Makefile.am b/externals/otf/tools/otfmerge/Makefile.am deleted file mode 100644 index 7414e79adff218d2ef4560dfbb6aedd04ba407a3..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib - -if AMBUILDBINARIES -bin_PROGRAMS = \ - otfmerge -endif - -otfmerge_LDADD = $(top_builddir)/otflib/libotf.la -otfmerge_DEPENDENCIES = $(otfmerge_LDADD) -otfmerge_SOURCES = \ - handler.h \ - hash.h \ - otfmerge.c \ - handler.c \ - hash.c - -EXTRA_DIST = \ - otfmerge_vs08.vcproj - diff --git a/externals/otf/tools/otfmerge/Makefile.in b/externals/otf/tools/otfmerge/Makefile.in deleted file mode 100644 index 90280b82889fa747207ea903ec22c75b16f8d24a..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge/Makefile.in +++ /dev/null @@ -1,596 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@AMBUILDBINARIES_TRUE@bin_PROGRAMS = otfmerge$(EXEEXT) -subdir = tools/otfmerge -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_otfmerge_OBJECTS = otfmerge.$(OBJEXT) handler.$(OBJEXT) \ - hash.$(OBJEXT) -otfmerge_OBJECTS = $(am_otfmerge_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(otfmerge_SOURCES) -DIST_SOURCES = $(otfmerge_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib -otfmerge_LDADD = $(top_builddir)/otflib/libotf.la -otfmerge_DEPENDENCIES = $(otfmerge_LDADD) -otfmerge_SOURCES = \ - handler.h \ - hash.h \ - otfmerge.c \ - handler.c \ - hash.c - -EXTRA_DIST = \ - otfmerge_vs08.vcproj - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/otfmerge/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/otfmerge/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -otfmerge$(EXEEXT): $(otfmerge_OBJECTS) $(otfmerge_DEPENDENCIES) - @rm -f otfmerge$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(otfmerge_OBJECTS) $(otfmerge_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/handler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfmerge.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS 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-binPROGRAMS - -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: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - 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-binPROGRAMS 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 \ - uninstall-binPROGRAMS - - -# 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/externals/otf/tools/otfmerge/handler.c b/externals/otf/tools/otfmerge/handler.c deleted file mode 100644 index 8bfd7c4f2801e2c154598a706fcb315b2791ae29..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge/handler.c +++ /dev/null @@ -1,808 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#include <assert.h> - -#include "OTF_Platform.h" -#include "OTF_Writer.h" - -#include "handler.h" -#include "hash.h" - -/* *** Definition handler *** ************************************* */ - -int handleDefinitionComment( void* fcbx, uint32_t streamid, - const char* comment, OTF_KeyValueList *list ) { - - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefinitionCommentKV( ((fcbT*) fcbx)->writer, streamid, - comment, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - -int handleDefTimerResolution( void* fcbx, - uint32_t streamid, uint64_t ticksPerSecond, OTF_KeyValueList *list ) { - - - fcbT *fcb; - streaminfoT* si; - - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - - fcb = ((fcbT*) fcbx); - si = hash_search( fcb->hash, streamid ); - - si->ticksPerSecond = ticksPerSecond; - - return ( 0 == OTF_Writer_writeDefTimerResolutionKV( fcb->writer, streamid, - ticksPerSecond, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - - -int handleDefProcess( void* fcbx, uint32_t streamid, uint32_t deftoken, - const char* name, uint32_t parent, OTF_KeyValueList *list ) { - - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefProcessKV( ((fcbT*) fcbx)->writer, streamid, - deftoken, name, parent, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - - -int handleDefProcessGroup( void* fcbx, uint32_t streamid, uint32_t deftoken, - const char* name, uint32_t n, uint32_t* array, OTF_KeyValueList *list ) { - - - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefProcessGroupKV( ((fcbT*) fcbx)->writer, streamid, deftoken, - name, n, array, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - -int handleDefAttributeList( void* fcbx, uint32_t stream, - uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE* array, OTF_KeyValueList* list ) { - - - if( 0 != stream ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefAttributeListKV( ((fcbT*) fcbx)->writer, stream, attr_token, - num, array, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - -int handleDefProcessOrGroupAttributes( void* fcbx, uint32_t stream, - uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList* list ) { - - - if( 0 != stream ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefProcessOrGroupAttributesKV( ((fcbT*) fcbx)->writer, stream, proc_token, - attr_token, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - - -int handleDefFunction( void* fcbx, uint32_t streamid, - uint32_t deftoken, const char* name, - uint32_t group, uint32_t scltoken, OTF_KeyValueList *list ) { - - - fcbT *fcb; - streaminfoT* si; - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - fcb = ((fcbT*) fcbx); - si = hash_search( fcb->hash, streamid ); - - - /* allocate new memory if necessary */ - if ( si->nfunctions >= si->sfunctions ) - { - si->sfunctions = ( si->sfunctions > 0 ) ? ( 2* si->sfunctions ) : 20; - si->functions = (functionT*) realloc( si->functions, - si->sfunctions * sizeof(functionT) ); - - assert( NULL != si->functions ); - } - - /* insert all data about the function */ - si->functions[si->nfunctions].deftoken = deftoken; - si->functions[si->nfunctions].name = strdup( name ); - si->functions[si->nfunctions].group = group; - si->functions[si->nfunctions].scltoken = scltoken; - - ++(si->nfunctions); - - return ( 0 == OTF_Writer_writeDefFunctionKV( fcb->writer, streamid, deftoken, - name, group, scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - - -int handleDefFunctionGroup( void* fcbx, uint32_t streamid, - uint32_t deftoken, const char* name, OTF_KeyValueList *list ) { - - - fcbT *fcb; - streaminfoT* si; - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - fcb = ((fcbT*) fcbx); - si = hash_search( fcb->hash, streamid ); - - /* allocate new memory if necessary */ - if ( si->nfunctiongroups >= si->sfunctiongroups ) - { - si->sfunctiongroups = ( si->sfunctiongroups > 0 ) - ? ( 2* si->sfunctiongroups ) : 10; - si->functiongroups = (functiongroupT*) realloc( si->functiongroups, - si->sfunctiongroups * sizeof(functiongroupT) ); - - assert( NULL != si->functiongroups ); - } - - /* insert all data about the function */ - si->functiongroups[si->nfunctiongroups].deftoken = deftoken; - si->functiongroups[si->nfunctiongroups].name = strdup( name ); - - ++(si->nfunctiongroups); - - return ( 0 == OTF_Writer_writeDefFunctionGroupKV( fcb->writer, streamid, - deftoken, name, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - - -int handleDefCollectiveOperation( void* fcbx, uint32_t streamid, - uint32_t collOp, const char* name, uint32_t type, OTF_KeyValueList *list ) { - - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefCollectiveOperationKV( ((fcbT*) fcbx)->writer, streamid, - collOp, name, type, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - } -} - - -int handleDefCounter( void* fcbx, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t properties, - uint32_t countergroup, const char* unit, OTF_KeyValueList *list ) { - - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefCounterKV( ((fcbT*) fcbx)->writer, streamid, - deftoken, name, properties, countergroup, unit, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - - -int handleDefCounterGroup( void* fcbx, uint32_t streamid, - uint32_t deftoken, const char* name, OTF_KeyValueList *list ) { - - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefCounterGroupKV( ((fcbT*) fcbx)->writer, streamid, - deftoken, name, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - - -int handleDefScl( void* fcbx, uint32_t streamid, - uint32_t deftoken, uint32_t sclfile, uint32_t sclline, OTF_KeyValueList *list ) { - - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefSclKV( ((fcbT*) fcbx)->writer, streamid, deftoken, - sclfile, sclline, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - - -int handleDefSclFile( void* fcbx, uint32_t streamid, - uint32_t deftoken, const char* filename, OTF_KeyValueList *list ) { - - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefSclFileKV( ((fcbT*) fcbx)->writer, streamid, - deftoken, filename, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - - -int handleDefCreator( void* fcbx, uint32_t streamid, - const char* creator, OTF_KeyValueList *list ) { - - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefCreatorKV( ((fcbT*) fcbx)->writer, streamid, - creator, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - - -int handleDefFile( void* fcbx, uint32_t streamid, uint32_t token, - const char* name, uint32_t group, OTF_KeyValueList *list ) { - - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefFileKV( ((fcbT*) fcbx)->writer, - streamid, token, name, group, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - - -int handleDefFileGroup( void* fcbx, uint32_t streamid, - uint32_t token, const char* name, OTF_KeyValueList *list ) { - - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefFileGroupKV( ((fcbT*) fcbx)->writer, - streamid, token, name, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - -int handleDefKeyValue( void *fcbx, uint32_t streamid, uint32_t token, - OTF_Type type, const char *name, const char *desc, OTF_KeyValueList *list) { - - if( 0 != streamid ) { - - fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" ); - - assert( 0 ); - - return OTF_RETURN_ABORT; - - } else { - - return ( 0 == OTF_Writer_writeDefKeyValueKV( ((fcbT*) fcbx)->writer, - streamid, token, type, name, desc, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - } -} - -/* *** Event handler *** ****************************************** */ - - -int handleNoOp( void* fcb, uint64_t time, - uint32_t process, OTF_KeyValueList *list ) { - - return ( 0 == OTF_Writer_writeNoOpKV( ((fcbT*) fcb)->writer, time, process, - list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleEventComment( void* fcb, uint64_t time, uint32_t process, - const char* comment, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeEventCommentKV( ((fcbT*) fcb)->writer, time, process, - comment, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleCounter( void* fcb, uint64_t time, uint32_t process, - uint32_t counter_token, uint64_t value, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeCounterKV( ((fcbT*) fcb)->writer, time, - process, counter_token, value, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleEnter( void* fcb, uint64_t time, uint32_t statetoken, - uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeEnterKV( ((fcbT*) fcb)->writer, time, - statetoken, cpuid, scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleCollectiveOperation( void* fcb, uint64_t time, - uint32_t process, uint32_t functionToken, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeCollectiveOperationKV( ((fcbT*) fcb)->writer, time, - process, functionToken, communicator, rootprocess, - sent, received, duration, scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleBeginCollectiveOperation( void* fcb, uint64_t time, uint32_t process, - uint32_t collOp, uint64_t matchingId, uint32_t procGroup, - uint32_t rootprocess, uint64_t sent, uint64_t received, - uint32_t scltoken, OTF_KeyValueList *list ) -{ - - return (0 == OTF_Writer_writeBeginCollectiveOperationKV( - ((fcbT*) fcb)->writer, time, process, collOp, - matchingId, procGroup, rootprocess, sent, received, - scltoken, list )) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleEndCollectiveOperation( void* fcb, uint64_t time, uint32_t process, - uint64_t matchingId, OTF_KeyValueList *list ) -{ - return (0 == OTF_Writer_writeEndCollectiveOperationKV( - ((fcbT*) fcb)->writer, time, process, matchingId, list)) ? - OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleRecvMsg( void* fcb, uint64_t time, - uint32_t receiver, uint32_t sender, uint32_t communicator, - uint32_t msgtype, uint32_t msglength, uint32_t scltoken, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeRecvMsgKV( ((fcbT*) fcb)->writer, time, receiver, - sender, communicator, msgtype, msglength, scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleSendMsg( void* fcb, uint64_t time, - uint32_t sender, uint32_t receiver, uint32_t communicator, - uint32_t msgtype, uint32_t msglength, uint32_t scltoken, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeSendMsgKV( ((fcbT*) fcb)->writer, time, sender, - receiver, communicator, msgtype, msglength, scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleLeave( void* fcb, uint64_t time, uint32_t statetoken, - uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeLeaveKV( ((fcbT*) fcb)->writer, time, statetoken, - cpuid, scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleBeginProcess( void* fcb, uint64_t time, - uint32_t cpuid, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeBeginProcessKV( ((fcbT*) fcb)->writer, time, cpuid, list ) ); -} -int handleEndProcess( void* fcb, uint64_t time, - uint32_t cpuid, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeEndProcessKV( ((fcbT*) fcb)->writer, time, cpuid, list ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleFileOperation( void* fcb, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t handleid, uint32_t operation, uint64_t bytes, - uint64_t duration, uint32_t source, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeFileOperationKV( ((fcbT*) fcb)->writer, time, fileid, - process, handleid, operation, bytes, duration, source, list ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleBeginFileOperation( void* fcb, uint64_t time, uint32_t process, - uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *list ) -{ - return (0 == OTF_Writer_writeBeginFileOperationKV( ((fcbT*) fcb)->writer, - time, process, matchingId, scltoken, list )) ? OTF_RETURN_ABORT - : OTF_RETURN_OK; -} - - -int handleEndFileOperation( void* fcb, uint64_t time, - uint32_t process, uint32_t fileid, uint64_t matchingId, uint64_t handleId, - uint32_t operation, uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list ) -{ - return (0 == OTF_Writer_writeEndFileOperationKV( ((fcbT*) fcb)->writer, - time, process, fileid, matchingId, handleId, operation, bytes, - scltoken, list )) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleRMAPut( void* fcb, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeRMAPutKV( ((fcbT*) fcb)->writer, time, - process, origin, target, communicator, tag, bytes, scltoken, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleRMAPutRemoteEnd( void* fcb, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeRMAPutRemoteEndKV( ((fcbT*) fcb)->writer, - time, process, origin, target, communicator, tag, bytes, scltoken, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleRMAGet( void* fcb, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list) { - - - return ( 0 == OTF_Writer_writeRMAGetKV( ((fcbT*) fcb)->writer, time, - process, origin, target, communicator, tag, bytes, scltoken, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleRMAEnd( void* fcb, uint64_t time, uint32_t process, uint32_t remote, - uint32_t communicator, uint32_t tag, uint32_t scltoken, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeRMAEndKV( ((fcbT*) fcb)->writer, time, - process, remote, communicator, tag, scltoken, list ) - ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -/* *** snapshot handlers ********************************************** */ - - -int handleSnapshotComment( void *fcb, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeSnapshotCommentKV( ((fcbT*) fcb)->writer, time, - process, comment, list ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleEnterSnapshot( void *fcb, uint64_t time, - uint64_t originaltime, uint32_t function, uint32_t process, - uint32_t source, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeEnterSnapshotKV( ((fcbT*) fcb)->writer, - time, originaltime, function, process, source, list ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleSendSnapshot( void *fcb, uint64_t time, uint64_t originaltime, - uint32_t sender, uint32_t receiver, uint32_t procGroup, uint32_t tag, - uint32_t length, uint32_t source, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeSendSnapshotKV( ((fcbT*) fcb)->writer, - time, originaltime, sender, receiver, procGroup, tag, length, source, list ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleOpenFileSnapshot( void* fcb, uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, - uint64_t handleid, uint32_t source, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeOpenFileSnapshotKV( ((fcbT*) fcb)->writer, time, - originaltime, fileid, process, handleid, source, list ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleBeginCollopSnapshot( void *fcb, uint64_t time, - uint64_t originaltime, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken, OTF_KeyValueList *list) { - - - return ( 0 == OTF_Writer_writeBeginCollopSnapshotKV( ((fcbT*) fcb)->writer, time, - originaltime, process, collOp, matchingId, procGroup, rootProc, sent, received, - scltoken, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - -} - -int handleBeginFileOpSnapshot( void *fcb, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, - uint32_t scltoken, OTF_KeyValueList *list) { - - - return ( 0 == OTF_Writer_writeBeginFileOpSnapshotKV( ((fcbT*) fcb)->writer, time, - originaltime, process, matchingId, scltoken, list ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; - -} - - -/* *** Summary handlers *** ****************************************** */ - - -int handleSummaryComment( void* fcb, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeSummaryCommentKV( ((fcbT*) fcb)->writer, time, - process, comment, list ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK;; -} - - -int handleFunctionSummary( void* fcb, - uint64_t time, uint32_t function, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeFunctionSummaryKV( ((fcbT*) fcb)->writer, - time, function, process, count, excltime, incltime, list ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleFunctionGroupSummary( void* fcb, - uint64_t time, uint32_t functiongroup, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeFunctionGroupSummaryKV( ((fcbT*) fcb)->writer, - time, functiongroup, process, count, excltime, incltime, list ) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleMessageSummary( void* fcb, - uint64_t time, uint32_t process, uint32_t peer, - uint32_t comm, uint32_t tag, uint64_t number_sent, - uint64_t number_recvd, uint64_t bytes_sent, uint64_t bytes_recved, - OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeMessageSummaryKV( ((fcbT*) fcb)->writer, - time, process, peer, comm, tag, number_sent, number_recvd, bytes_sent, - bytes_recved, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleCollopSummary( void* fcb, - uint64_t time, uint32_t process, uint32_t comm, - uint32_t collective, uint64_t number_sent, uint64_t number_recvd, - uint64_t bytes_sent, uint64_t bytes_recved, OTF_KeyValueList *list ) { - - return ( 0 == OTF_Writer_writeCollopSummaryKV( ((fcbT*) fcb)->writer, - time, process, comm, collective, number_sent, number_recvd, bytes_sent, - bytes_recved, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleFileOperationSummary( void* fcb, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t nopen, uint64_t nclose, uint64_t nread, - uint64_t nwrite, uint64_t nseek, uint64_t bytesread, uint64_t byteswrite, - OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeFileOperationSummaryKV( ((fcbT*) fcb)->writer, - time, fileid, process, nopen, nclose, nread, nwrite, nseek, - bytesread, byteswrite, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleFileGroupOperationSummary( void* fcb, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeFileGroupOperationSummaryKV( ((fcbT*) fcb)->writer, - time, groupid, process, nopen, nclose, nread, nwrite, nseek, - bytesread, byteswrite, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleDefMarker( void *fcb, uint32_t stream, uint32_t token, - const char* name, uint32_t type, OTF_KeyValueList *list ) { - - /* even if marker definitions could be read from many streams, they are - written to stream 0 forcedly, because this is where all markers belong. */ - stream= 0; - - return ( 0 == OTF_Writer_writeDefMarkerKV( ((fcbT*) fcb)->writer, - stream, token, name, type, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK;; -} - - -int handleMarker( void *fcb, uint64_t time, uint32_t process, - uint32_t token, const char* text, OTF_KeyValueList *list ) { - - - return ( 0 == OTF_Writer_writeMarkerKV( ((fcbT*) fcb)->writer, - time, process, token, text, list ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - - -int handleUnknown( void* fcb, uint64_t time, uint32_t process, const char* record ) { - -#ifdef OTF_VERBOSE - - if ( (uint64_t) -1 != time ) { - - printf( " unknown record >%s< at process 0x%x time 0x%llu\n", - record, process, (unsigned long long) time ); - - } else { - - printf( " unknown record >%s< at stream 0x%x\n", - record, process ); - } - -#endif /* OTF_VERBOSE */ - - return OTF_RETURN_ABORT; -} - diff --git a/externals/otf/tools/otfmerge/handler.h b/externals/otf/tools/otfmerge/handler.h deleted file mode 100644 index df4c5dd1fadb7b5f9ce50be9fe8c82d7825756c3..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge/handler.h +++ /dev/null @@ -1,268 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef HANDLER_H -#define HANDLER_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "OTF_inttypes.h" -#include "OTF_Writer.h" - - -typedef struct { - - uint32_t deftoken; - char *name; - uint32_t group; - uint32_t scltoken; -}functionT; - -typedef struct { - - uint32_t deftoken; - char* name; -}functiongroupT; - -typedef struct { - - uint32_t streamid; - - uint64_t ticksPerSecond; - - functionT *functions; - int nfunctions; /* number of functions in the functioninfo-array */ - int sfunctions; /* size of the functioninfo-array */ - functiongroupT *functiongroups; - int nfunctiongroups; /* number of groups in the functiongroup-array */ - int sfunctiongroups; /* size of the functiongroups-array */ - -}streaminfoT; - -typedef struct hashtabS -{ - streaminfoT entry; - - int entryvecsize; - streaminfoT *p_entryvec; -}hashtabT; - -typedef struct { - - OTF_Writer *writer; - hashtabT *hash; - int nstreaminfos; /* number of streams in the streaminfos-array */ - - int error; - -}fcbT; - -/* *** Definition handler *** ************************************* */ - -int handleDefinitionComment( void* firsthandlerarg, uint32_t streamid, - const char* comment, OTF_KeyValueList *list ); - -int handleDefTimerResolution( void* firsthandlerarg, - uint32_t streamid, uint64_t ticksPerSecond, OTF_KeyValueList *list ); - -int handleDefProcess( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t paren, OTF_KeyValueList *list ); - -int handleDefProcessGroup( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t n, uint32_t* array, OTF_KeyValueList *list ); - -int handleDefAttributeList( void* userData, uint32_t stream, - uint32_t attr_token, uint32_t num, OTF_ATTR_TYPE* array, OTF_KeyValueList* list ); - -int handleDefProcessOrGroupAttributes( void* userData, uint32_t stream, - uint32_t proc_token, uint32_t attr_token, OTF_KeyValueList* list ); - -int handleDefFunction( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t group, uint32_t scltoken, OTF_KeyValueList *list ); - -int handleDefFunctionGroup( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, OTF_KeyValueList *list ); - -int handleDefCollectiveOperation( void* firsthandlerarg, uint32_t streamid, - uint32_t collOp, const char* name, uint32_t type, OTF_KeyValueList *list ); - -int handleDefCounter( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, uint32_t properties, - uint32_t countergroup, const char* unit, OTF_KeyValueList *list ); - -int handleDefCounterGroup( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* name, OTF_KeyValueList *list ); - -int handleDefScl( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, uint32_t sclfile, uint32_t sclline, OTF_KeyValueList *list ); - -int handleDefSclFile( void* firsthandlerarg, uint32_t streamid, - uint32_t deftoken, const char* filename, OTF_KeyValueList *list ); - -int handleDefCreator( void* firsthandlerarg, uint32_t streamid, - const char* creator, OTF_KeyValueList *list ); - -int handleDefFile( void* firsthandlerarg, uint32_t stream, uint32_t token, - const char* name, uint32_t group, OTF_KeyValueList *list ); - -int handleDefFileGroup( void* firsthandlerarg, uint32_t stream, - uint32_t token, const char* name, OTF_KeyValueList *list ); - -int handleDefKeyValue( void *fcbx, uint32_t streamid, uint32_t token, - OTF_Type type, const char *name, const char *desc, OTF_KeyValueList *list); - -/* *** Event handler *** ****************************************** */ - -int handleNoOp( void* firsthandlerarg, uint64_t time, - uint32_t process, OTF_KeyValueList *list ); - -int handleEventComment( void* firsthandlerarg, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ); - -int handleCounter( void* firsthandlerarg, uint64_t time, - uint32_t process, uint32_t counter_token, uint64_t value, OTF_KeyValueList *list ); - -int handleEnter( void* firsthandlerarg, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList *list ); - -int handleCollectiveOperation( void* firsthandlerarg, uint64_t time, - uint32_t process, uint32_t functionToken, uint32_t communicator, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken, OTF_KeyValueList *list ); - -int handleBeginCollectiveOperation( void* fcb, uint64_t time, uint32_t process, - uint32_t collOp, uint64_t matchingId, uint32_t procGroup, - uint32_t rootprocess, uint64_t sent, uint64_t received, - uint32_t scltoken, OTF_KeyValueList *list ); - -int handleEndCollectiveOperation( void* fcb, uint64_t time, uint32_t process, - uint64_t matchingId, OTF_KeyValueList *list ); - -int handleRecvMsg( void* firsthandlerarg, uint64_t time, - uint32_t receiver, uint32_t sender, uint32_t communicator, - uint32_t msgtype, uint32_t msglength, - uint32_t scltoken, OTF_KeyValueList *list ); - -int handleSendMsg( void* firsthandlerarg, uint64_t time, - uint32_t sender, uint32_t receiver, uint32_t communicator, - uint32_t msgtype, uint32_t msglength, uint32_t scltoken, OTF_KeyValueList *list ); - -int handleLeave( void* firsthandlerarg, uint64_t time, - uint32_t statetoken, uint32_t cpuid, uint32_t scltoken, OTF_KeyValueList *list ); - -int handleBeginProcess( void* firsthandlerarg, uint64_t time, - uint32_t process, OTF_KeyValueList *list ); - -int handleEndProcess( void* firsthandlerarg, uint64_t time, - uint32_t process, OTF_KeyValueList *list ); - -int handleFileOperation( void* firsthandlerarg, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t handleid, uint32_t operation, uint64_t bytes, - uint64_t duration, uint32_t source, OTF_KeyValueList *list ); - -int handleBeginFileOperation( void* fcb, uint64_t time, uint32_t process, - uint64_t matchingId, uint32_t scltoken, OTF_KeyValueList *list ); - -int handleEndFileOperation( void* fcb, uint64_t time, uint32_t process, - uint32_t fileid, uint64_t matchingId, uint64_t handleId, uint32_t operation, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list ); - -int handleRMAPut( void* firsthandlerarg, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list ); - -int handleRMAPutRemoteEnd( void* firsthandlerarg, uint64_t time, - uint32_t process, uint32_t origin, uint32_t target, - uint32_t communicator, uint32_t tag, uint64_t bytes, - uint32_t scltoken, OTF_KeyValueList *list ); - -int handleRMAGet( void* firsthandlerarg, uint64_t time, uint32_t process, - uint32_t origin, uint32_t target, uint32_t communicator, uint32_t tag, - uint64_t bytes, uint32_t scltoken, OTF_KeyValueList *list); - -int handleRMAEnd( void* firsthandlerarg, uint64_t time, uint32_t process, - uint32_t remote, uint32_t communicator, uint32_t tag, uint32_t scltoken, OTF_KeyValueList *list ); - - -/* *** Handlers for OTF snapshot records ****************************** */ - - -int handleSnapshotComment( void *firsthandlerarg, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ); - -int handleEnterSnapshot( void *firsthandlerarg, uint64_t time, - uint64_t originaltime, uint32_t function, uint32_t process, - uint32_t source, OTF_KeyValueList *list ); - -int handleSendSnapshot( void *firsthandlerarg, uint64_t time, uint64_t originaltime, - uint32_t sender, uint32_t receiver, uint32_t procGroup, uint32_t tag, - uint32_t length, uint32_t source, OTF_KeyValueList *list ); - -int handleOpenFileSnapshot( void* firsthandlerarg, uint64_t time, - uint64_t originaltime, uint32_t fileid, uint32_t process, - uint64_t handleid, uint32_t source, OTF_KeyValueList *list ); - -int handleBeginCollopSnapshot( void *fcb, uint64_t time, - uint64_t originaltime, uint32_t process, uint32_t collOp, - uint64_t matchingId, uint32_t procGroup, uint32_t rootProc, - uint64_t sent, uint64_t received, uint32_t scltoken, OTF_KeyValueList *list); - -int handleBeginFileOpSnapshot( void *userData, uint64_t time, - uint64_t originaltime, uint32_t process, uint64_t matchingId, - uint32_t scltoken, OTF_KeyValueList *list); - -/* *** Summary handler *** ****************************************** */ - -int handleSummaryComment( void* firsthandlerarg, uint64_t time, - uint32_t process, const char* comment, OTF_KeyValueList *list ); - -int handleFunctionSummary( void* firsthandlerarg, - uint64_t time, uint32_t function, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, OTF_KeyValueList *list ); - -int handleFunctionGroupSummary( void* firsthandlerarg, - uint64_t time, uint32_t functiongroup, uint32_t process, - uint64_t count, uint64_t excltime, uint64_t incltime, OTF_KeyValueList *list ); - -int handleMessageSummary( void* firsthandlerarg, - uint64_t time, uint32_t process, uint32_t peer, - uint32_t comm, uint32_t tag, uint64_t number_sent, uint64_t number_recvd, - uint64_t bytes_sent, uint64_t bytes_recved, OTF_KeyValueList *list ); - -int handleCollopSummary( void* firsthandlerarg, - uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, - uint64_t number_sent, uint64_t number_recvd, uint64_t bytes_sent, - uint64_t bytes_recved, OTF_KeyValueList *list ); - - -int handleFileOperationSummary( void* firsthandlerarg, uint64_t time, uint32_t fileid, - uint32_t process, uint64_t nopen, uint64_t nclose, uint64_t nread, - uint64_t nwrite, uint64_t nseek, uint64_t bytesread, uint64_t byteswrite, OTF_KeyValueList *list ); - -int handleFileGroupOperationSummary( void* firsthandlerarg, uint64_t time, - uint32_t groupid, uint32_t process, uint64_t nopen, uint64_t nclose, - uint64_t nread, uint64_t nwrite, uint64_t nseek, uint64_t bytesread, - uint64_t byteswrite, OTF_KeyValueList *list ); - - -/* *** Marker handler *** ******************************************* */ - - -int handleDefMarker( void *userData, uint32_t stream, - uint32_t token, const char* name, uint32_t type, OTF_KeyValueList *list ); - -int handleMarker( void *userData, uint64_t time, - uint32_t process, uint32_t token, const char* text, OTF_KeyValueList *list ); - - -/* *** Misc handlers *** ******************************************** */ - -int handleUnknown( void* fcb, uint64_t time, uint32_t process, const char* record ); - - -#endif /* OTF_handleH */ diff --git a/externals/otf/tools/otfmerge/hash.c b/externals/otf/tools/otfmerge/hash.c deleted file mode 100644 index a4bcf32705480ce04ce4299ff4b4004f7599cef1..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge/hash.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#include "hash.h" - -hashtabT* hash_new( ) { - - - int i; - hashtabT* ret; - - ret = ( hashtabT* ) malloc( sizeof( hashtabT ) * HASH_SIZE ); - - for( i = 0; i < HASH_SIZE; i++) { - - ret[i].entry.streamid = 0; - - ret[i].entry.ticksPerSecond = 0; - - ret[i].entry.functions = NULL; - ret[i].entry.nfunctions = 0; - ret[i].entry.sfunctions = 0; - - ret[i].entry.functiongroups = NULL; - ret[i].entry.nfunctiongroups = 0; - ret[i].entry.sfunctiongroups = 0; - - ret[i].entryvecsize = -1; - ret[i].p_entryvec = 0; - } - - return ret; -} - - -void hash_delete( hashtabT *hash ) { - - - int i; - int a; - int b; - - for( i = 0; i < HASH_SIZE; i++) { - - /* del functions (free namestrings) */ - if( hash[i].entry.functions != NULL ) { - - for( a= 0; a < hash[i].entry.nfunctions; ++a ) { - if( NULL != hash[i].entry.functions[a].name ) { - free( hash[i].entry.functions[a].name ); - } - } - free( hash[i].entry.functions ); - } - - /* del functiongroups (free namestrings) */ - if( hash[i].entry.functiongroups != NULL ) { - - for( a= 0; a < hash[i].entry.nfunctiongroups; ++a ) { - if( NULL != hash[i].entry.functiongroups[a].name ) { - free( hash[i].entry.functiongroups[a].name ); - } - } - free( hash[i].entry.functiongroups ); - } - - - if ( hash[i].entryvecsize > 0 ) { - - for( a= 0; a < hash[i].entryvecsize ; ++a ) { - - /* del functions (free namestrings) */ - if( hash[i].p_entryvec[a].functions != NULL ) { - - for( b= 0; b < hash[i].p_entryvec[a].nfunctions; ++b ) { - if( NULL != hash[i].p_entryvec[a].functions[b].name ) { - free( hash[i].p_entryvec[a].functions[b].name ); - } - } - free( hash[i].p_entryvec[a].functions ); - } - - /* del functiongroups (free namestrings) */ - if( hash[i].p_entryvec[a].functiongroups != NULL ) { - - for( b= 0; b < hash[i].p_entryvec[a].nfunctiongroups; ++b ) { - if( NULL != hash[i].p_entryvec[a].functiongroups[b].name ) { - free( hash[i].p_entryvec[a].functiongroups[b].name ); - } - } - free( hash[i].p_entryvec[a].functiongroups ); - } - } - - free( hash[i].p_entryvec ); - } - } - - free( hash ); -} - - -void hash_add( hashtabT *hash, uint32_t entry ) { - - uint32_t hashkey = entry; - - HASH_GET_KEY( hashkey ); - - if ( hash[hashkey].entryvecsize == -1 ) { - - hash[hashkey].entry.streamid = entry; - - hash[hashkey].entry.ticksPerSecond= 0; - hash[hashkey].entry.functions= NULL; - hash[hashkey].entry.nfunctions= 0; - hash[hashkey].entry.sfunctions= 0; - hash[hashkey].entry.functiongroups= NULL; - hash[hashkey].entry.nfunctiongroups= 0; - hash[hashkey].entry.sfunctiongroups= 0; - - hash[hashkey].entryvecsize = 0; - - } else { /* realloc the entryvector and insert the new entry */ - - hash[hashkey].p_entryvec = (streaminfoT *) realloc( hash[hashkey].p_entryvec, - sizeof( streaminfoT ) * ( hash[hashkey].entryvecsize + 1) ); - - hash[hashkey].p_entryvec[hash[hashkey].entryvecsize].streamid = entry;; - - hash[hashkey].p_entryvec[hash[hashkey].entryvecsize].ticksPerSecond= 0; - hash[hashkey].p_entryvec[hash[hashkey].entryvecsize].functions= NULL; - hash[hashkey].p_entryvec[hash[hashkey].entryvecsize].nfunctions= 0; - hash[hashkey].p_entryvec[hash[hashkey].entryvecsize].sfunctions= 0; - hash[hashkey].p_entryvec[hash[hashkey].entryvecsize].functiongroups= NULL; - hash[hashkey].p_entryvec[hash[hashkey].entryvecsize].nfunctiongroups= 0; - hash[hashkey].p_entryvec[hash[hashkey].entryvecsize].sfunctiongroups= 0; - - hash[hashkey].entryvecsize++; - - } -} - -streaminfoT* hash_search( hashtabT *hash, uint32_t entry) { - - int i; - uint32_t hashkey = entry; - - HASH_GET_KEY( hashkey ); - - if ( hash[hashkey].entry.streamid == entry ) { - return &hash[hashkey].entry; - } else { - for( i = 0; i < hash[hashkey].entryvecsize; i++ ) { - - if ( hash[hashkey].p_entryvec[i].streamid == entry ) - return &(hash[hashkey].p_entryvec[i]); - } - } - - return NULL; -} diff --git a/externals/otf/tools/otfmerge/hash.h b/externals/otf/tools/otfmerge/hash.h deleted file mode 100644 index 4624f2df5445bf8e5bb7d701f9594b61ae68d8e6..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge/hash.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef HASH_H -#define HASH_H - -#include "handler.h" - -/* *** macros ****************************************/ - -/* 0x100 = 4096 */ -#define HASH_SIZE 0x1000 - -#define HASH_GET_KEY(key) \ -{ \ - key += ~(key << 15); \ - key ^= (key >> 10); \ - key += (key << 3); \ - key ^= (key >> 6); \ - key += ~(key << 11); \ - key ^= (key >> 16); \ - key &= HASH_SIZE - 1; \ -} - -/* initialize the hash */ -hashtabT* hash_new( void ); - -/* free all mem of the hash */ -void hash_delete( hashtabT *hash ); - -/* add an entry to the hash */ -void hash_add( hashtabT *hash, uint32_t entry ); - -/* search an entry in the hash */ -streaminfoT* hash_search( hashtabT *hash, uint32_t entry); - - - -#endif /* HASH_H */ diff --git a/externals/otf/tools/otfmerge/otfmerge.c b/externals/otf/tools/otfmerge/otfmerge.c deleted file mode 100644 index 88abd29618c142ad2b7052450e84f6b32cb311f0..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge/otfmerge.c +++ /dev/null @@ -1,807 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <stddef.h> -#include <stdlib.h> -#include <string.h> -#include <stdio.h> -#include <assert.h> - -#include "otf.h" - -#include "handler.h" -#include "hash.h" - - -#define OTFMERGE_STRING "otfmerge" - -#define FINISH_EVERYTHING hash_delete( fcb.hash); fcb.hash= NULL; \ - OTF_Reader_close( reader ); \ - OTF_Writer_close( fcb.writer ); \ - OTF_FileManager_close( manager ); \ - OTF_HandlerArray_close( handlers ); \ - -#define SHOW_HELPTEXT { \ - int l = 0; while( Helptext[l] ) { printf( "%s", Helptext[l++] ); } } - -static const char* Helptext[] = { -" \n", -" otfmerge - converter program of OTF library. \n", -" \n", -" otfmerge [Options] <input file name> \n", -" \n", -" options: \n", -" -h, --help show this help message \n", -" -V show OTF version \n", -" -n <n> set number of streams for output \n", -" set this to 0 for using one stream per process\n", -" standard is 1 \n", -" -f <n> set max number of filehandles available \n", -" -o <name> namestub of the output file (default 'out') \n", -" -rb <size> set buffersize of the reader \n", -" -wb <size> set buffersize of the writer \n", -" -stats cover statistics too \n", -" -snaps cover snaphots too \n", -" -z <zlevel> write compressed output \n", -" zlevel reaches from 0 to 9 where 0 is no \n", -" compression and 9 is the highest level \n", -" -l write long OTF format \n", -" -p show progress \n", -" \n", -" \n", NULL }; - -void initProgressDisplay( void ); -void finishProgressDisplay( void ); -void updateProgressDisplay( uint32_t i, uint64_t max, uint64_t cur ); - -int main ( int argc, char** argv ) { - - - OTF_Reader* reader = NULL; - OTF_HandlerArray* handlers; - OTF_FileManager* manager; - OTF_MasterControl* mc; - OTF_MapEntry* mapentry; - - int read_stats= 0; - int read_snaps= 0; - int nstreams = 1; - int nfiles = 200; - int longformat = 0; - int showprogress= 0; - int i; - - int readerbuffersize = 1024 * 1024; - int writerbuffersize = 1024 * 1024; - OTF_FileCompression compression= 0; - - fcbT fcb; - - char* infile= NULL; - char* outfile= NULL; - - uint64_t minbytes; - uint64_t maxbytes; - uint64_t curbytes; - uint64_t minbytestmp; - uint64_t maxbytestmp; - uint64_t curbytestmp; - uint64_t recordsperupdate; - uint64_t totalbytes; - uint32_t progress_counter= 0; - - uint64_t retde; - uint64_t retma; - uint64_t retev; - uint64_t retst; - uint64_t retsn; - - fcb.error= 0; - - if ( 1 >= argc ) { - - SHOW_HELPTEXT; - return 0; - } - - for ( i = 1; i < argc; i++ ) { - - - if ( ( 0 == strcmp( "-i", argv[i] ) ) && ( i+1 < argc ) ) { - - infile= argv[i+1]; - ++i; - - } else if ( ( 0 == strcmp( "-n", argv[i] ) ) && ( i+1 < argc ) ) { - - nstreams = atoi( argv[i+1] ); - ++i; - - } else if ( ( 0 == strcmp( "-rb", argv[i] ) ) && ( i+1 < argc ) ) { - - readerbuffersize = atoi( argv[i+1] ); - ++i; - - } else if ( ( 0 == strcmp( "-wb", argv[i] ) ) && ( i+1 < argc ) ) { - - writerbuffersize = atoi( argv[i+1] ); - ++i; - - } else if ( ( 0 == strcmp( "-f", argv[i] ) ) && ( i+1 < argc ) ) { - - nfiles = atoi( argv[i+1] ); - ++i; - - } else if ( ( 0 == strcmp( "-o", argv[i] ) ) && ( i+1 < argc ) ) { - - outfile= argv[i+1]; - ++i; - - } else if ( 0 == strcmp( "-stats", argv[i] ) ) { - - read_stats= 1; - - } else if ( 0 == strcmp( "-snaps", argv[i] ) ) { - - read_snaps= 1; - - } else if ( ( 0 == strcmp( "-z", argv[i] ) ) && ( i+1 < argc ) ) { - - compression= atoi( argv[i+1] ); - - ++i; - - } else if ( 0 == strcmp( "-l", argv[i] ) ) { - - longformat = 1; - - } else if ( 0 == strcmp( "-p", argv[i] ) ) { - - showprogress= 1; - - } else if ( 0 == strcmp( "--help", argv[i] ) || - 0 == strcmp( "-h", argv[i] ) ) { - - SHOW_HELPTEXT; - return 0; - - } else if ( 0 == strcmp( "-V", argv[i] ) ) { - - printf( "%u.%u.%u \"%s\"\n", OTF_VERSION_MAJOR, OTF_VERSION_MINOR, - OTF_VERSION_SUB, OTF_VERSION_STRING); - exit( 0 ); - - } else { - - if ( '-' != argv[i][0] ) { - - infile= argv[i]; - - } else{ - - fprintf( stderr, "ERROR: Unknown option: '%s'\n", argv[i] ); - exit(1); - } - } - } - - if ( nfiles < 1 ) { - - fprintf( stderr, "ERROR: less than 1 filehandle is not permitted\n" ); - exit(1); - } - if ( nstreams < 0 ) { - - fprintf( stderr, "ERROR: less than 0 stream is not permitted\n" ); - exit(1); - } - if ( NULL == infile ) { - - fprintf( stderr, "ERROR: no input file specified\n" ); - exit(1); - } - if ( NULL == outfile ) { - - /* - fprintf( stderr, "ERROR: no output file has been specified\n" ); - exit(1); - */ - - outfile= "out.otf"; - } - - handlers = OTF_HandlerArray_open(); - - manager= OTF_FileManager_open( nfiles ); - if( NULL == manager) { - fprintf( stderr, "Error: Unable to initialize File Manager. aborting\n" ); - exit(1); - } - - reader = OTF_Reader_open( infile, manager ); - - if ( NULL == reader ) { - - fprintf( stderr, "Error: Unable to open '%s'. aborting\n", infile ); - OTF_FileManager_close( manager ); - OTF_HandlerArray_close( handlers ); - exit(1); - } - - OTF_Reader_setBufferSizes( reader, readerbuffersize ); - - fcb.writer = OTF_Writer_open( outfile, nstreams, manager ); - OTF_Writer_setBufferSizes( fcb.writer, writerbuffersize ); - OTF_Writer_setCompression( fcb.writer, compression ); - if( longformat ) - OTF_Writer_setFormat( fcb.writer, OTF_WSTREAM_FORMAT_LONG ); - else - OTF_Writer_setFormat( fcb.writer, OTF_WSTREAM_FORMAT_SHORT ); - - mc = OTF_Reader_getMasterControl( reader ); - - /* set your own handler functions */ - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefinitionComment, - OTF_DEFINITIONCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFINITIONCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefTimerResolution, - OTF_DEFTIMERRESOLUTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFTIMERRESOLUTION_RECORD); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefProcess, - OTF_DEFPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefProcessGroup, - OTF_DEFPROCESSGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFPROCESSGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefAttributeList, - OTF_DEFATTRLIST_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFATTRLIST_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefProcessOrGroupAttributes, - OTF_DEFPROCESSORGROUPATTR_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFPROCESSORGROUPATTR_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFunction, - OTF_DEFFUNCTION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFFUNCTION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFunctionGroup, - OTF_DEFFUNCTIONGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFFUNCTIONGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCollectiveOperation, - OTF_DEFCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCounter, - OTF_DEFCOUNTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFCOUNTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCounterGroup, - OTF_DEFCOUNTERGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFCOUNTERGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefScl, - OTF_DEFSCL_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFSCL_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefSclFile, - OTF_DEFSCLFILE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFSCLFILE_RECORD ); - -/* OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefversion, - OTF_DEFVERSION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFVERSION_RECORD ); -*/ - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefCreator, - OTF_DEFCREATOR_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFCREATOR_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFile, - OTF_DEFFILE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFFILE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefFileGroup, - OTF_DEFFILEGROUP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFFILEGROUP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleDefKeyValue, - OTF_DEFKEYVALUE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_DEFKEYVALUE_RECORD ); - - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleNoOp, - OTF_NOOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_NOOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEventComment, - OTF_EVENTCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_EVENTCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleCounter, - OTF_COUNTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_COUNTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEnter, - OTF_ENTER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_ENTER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleCollectiveOperation, - OTF_COLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_COLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginCollectiveOperation, - OTF_BEGINCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_BEGINCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndCollectiveOperation, - OTF_ENDCOLLOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_ENDCOLLOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRecvMsg, - OTF_RECEIVE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_RECEIVE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleSendMsg, - OTF_SEND_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_SEND_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleLeave, - OTF_LEAVE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_LEAVE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginProcess, - OTF_BEGINPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_BEGINPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndProcess, - OTF_ENDPROCESS_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_ENDPROCESS_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFileOperation, - OTF_FILEOPERATION_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_FILEOPERATION_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginFileOperation, - OTF_BEGINFILEOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_BEGINFILEOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEndFileOperation, - OTF_ENDFILEOP_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_ENDFILEOP_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRMAPut, - OTF_RMAPUT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_RMAPUT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRMAPutRemoteEnd, - OTF_RMAPUTRE_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_RMAPUTRE_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRMAGet, - OTF_RMAGET_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_RMAGET_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleRMAEnd, - OTF_RMAEND_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_RMAEND_RECORD ); - - - /* snapshot records */ - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleSnapshotComment, - OTF_SNAPSHOTCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_SNAPSHOTCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleEnterSnapshot, - OTF_ENTERSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_ENTERSNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleSendSnapshot, - OTF_SENDSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_SENDSNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleOpenFileSnapshot, - OTF_OPENFILESNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_OPENFILESNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginCollopSnapshot, - OTF_BEGINCOLLOPSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_BEGINCOLLOPSNAPSHOT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleBeginFileOpSnapshot, - OTF_BEGINFILEOPSNAPSHOT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, - OTF_BEGINFILEOPSNAPSHOT_RECORD ); - - /* summary records */ - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleSummaryComment, - OTF_SUMMARYCOMMENT_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_SUMMARYCOMMENT_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFunctionSummary, - OTF_FUNCTIONSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_FUNCTIONSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFunctionGroupSummary, - OTF_FUNCTIONGROUPSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_FUNCTIONGROUPSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleMessageSummary, - OTF_MESSAGESUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_MESSAGESUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleCollopSummary, - OTF_COLLOPSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_COLLOPSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFileOperationSummary, - OTF_FILEOPERATIONSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_FILEOPERATIONSUMMARY_RECORD ); - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleFileGroupOperationSummary, - OTF_FILEGROUPOPERATIONSUMMARY_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_FILEGROUPOPERATIONSUMMARY_RECORD ); - - /* marker record types */ - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleDefMarker, OTF_DEFMARKER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, OTF_DEFMARKER_RECORD ); - - OTF_HandlerArray_setHandler( handlers, (OTF_FunctionPointer*) handleMarker, OTF_MARKER_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, &fcb, OTF_MARKER_RECORD ); - - /* misc records */ - - OTF_HandlerArray_setHandler( handlers, - (OTF_FunctionPointer*) handleUnknown, - OTF_UNKNOWN_RECORD ); - OTF_HandlerArray_setFirstHandlerArg( handlers, - &fcb, OTF_UNKNOWN_RECORD ); - - /* ask the mastercontrol for the number of streams and create the - * streaminfos array - */ - fcb.nstreaminfos = 0; - - while ( 0 != OTF_MasterControl_getEntryByIndex( mc, fcb.nstreaminfos )) { - - fcb.nstreaminfos++; - } - - fcb.hash = hash_new (); - - /* global stream yourself, because he isnt in the mapping */ - hash_add( fcb.hash, 0 ); - - /* add all streams to the hash */ - for( i = 0; i < fcb.nstreaminfos; i++ ) { - - mapentry = OTF_MasterControl_getEntryByIndex( mc, i ); - - hash_add( fcb.hash, mapentry->argument ); - } - - /* read definitions */ - retde= OTF_Reader_readDefinitions( reader, handlers ); - if( OTF_READ_ERROR == retde || 1 == fcb.error ) { - fprintf( stderr, "Error while reading definitions. aborting\n" ); - FINISH_EVERYTHING; - exit(1); - } - - /* read markers */ - retma= OTF_Reader_readMarkers( reader, handlers ); - if( OTF_READ_ERROR == retma || 1 == fcb.error ) { - fprintf( stderr, "Error while reading marker records. aborting\n" ); - FINISH_EVERYTHING; - exit(1); - } - - - if ( 0 == showprogress ) { - - /* do not show the progress */ - - /* read events */ - retev= OTF_Reader_readEvents( reader, handlers ); - if( OTF_READ_ERROR == retev ) { - fprintf( stderr, "Error while reading events. aborting\n" ); - FINISH_EVERYTHING; - exit(1); - } - - /* read stats */ - if ( 1 == read_stats ) { - - retst= OTF_Reader_readStatistics( reader, handlers ); - if( OTF_READ_ERROR == retst ) { - fprintf( stderr, "Error while reading statistics. aborting\n" ); - FINISH_EVERYTHING; - exit(1); - } - - } - - /* read snaps */ - if ( 1 == read_snaps ) { - - retsn= OTF_Reader_readSnapshots( reader, handlers ); - if( OTF_READ_ERROR == retsn ) { - fprintf( stderr, "Error while reading snapshots. aborting\n" ); - FINISH_EVERYTHING; - exit(1); - } - - } - - } else { - - /* show progress */ - - initProgressDisplay(); - - /* calculate how many records will be read */ - minbytes= 0; - curbytes= 0; - maxbytes= 0; - - OTF_Reader_setRecordLimit( reader, 0 ); - - retev= OTF_Reader_readEvents( reader, handlers ); - if( OTF_READ_ERROR == retev ) { - fprintf( stderr, "Error while reading events. aborting\n" ); - FINISH_EVERYTHING; - exit(1); - } - - if ( 1 == read_stats ) { - retst= OTF_Reader_readStatistics( reader, handlers ); - if( OTF_READ_ERROR == retst ) { - fprintf( stderr, "Error while reading statistics. aborting\n" ); - FINISH_EVERYTHING; - exit(1); - } - } - if ( 1 == read_snaps ) { - retsn= OTF_Reader_readSnapshots( reader, handlers ); - if( OTF_READ_ERROR == retsn ) { - fprintf( stderr, "Error while reading snapshots. aborting\n" ); - FINISH_EVERYTHING; - exit(1); - } - } - - OTF_Reader_eventBytesProgress( reader, &minbytestmp, &curbytestmp, &maxbytestmp ); - - minbytes+= minbytestmp; - maxbytes+= maxbytestmp; - - if ( 1 == read_stats ) { - - OTF_Reader_statisticBytesProgress( reader, &minbytestmp, &curbytestmp, &maxbytestmp ); - minbytes+= minbytestmp; - maxbytes+= maxbytestmp; - } - - /* read snaps */ - if ( 1 == read_snaps ) { - - OTF_Reader_snapshotBytesProgress( reader, &minbytestmp, &curbytestmp, &maxbytestmp ); - minbytes+= minbytestmp; - maxbytes+= maxbytestmp; - } - - curbytes= 0; - totalbytes= maxbytes - minbytes; - - - /* fixed number of records per update in order to provide - frequent update */ - recordsperupdate= 100000; - OTF_Reader_setRecordLimit( reader, recordsperupdate ); - - while ( 0 != ( retev= OTF_Reader_readEvents( reader, handlers ) ) ) { - - if( OTF_READ_ERROR == retev ) { - fprintf( stderr, "Error while reading events. aborting\n" ); - FINISH_EVERYTHING; - exit(1); - } - - OTF_Reader_eventBytesProgress( reader, - &minbytestmp, &curbytestmp, &maxbytestmp ); - - curbytes += curbytestmp - minbytestmp - curbytes; - - updateProgressDisplay( progress_counter++, totalbytes, curbytes ); - } - - /* read stats */ - while ( ( 1 == read_stats ) && - ( 0 != ( retst= OTF_Reader_readStatistics( reader, handlers ) ) ) ) { - - if( OTF_READ_ERROR == retst ) { - fprintf( stderr, "Error while reading statistics. aborting\n" ); - FINISH_EVERYTHING; - exit(1); - } - - OTF_Reader_statisticBytesProgress( reader, - &minbytestmp, &curbytestmp, &maxbytestmp ); - - curbytes += curbytestmp - minbytestmp - curbytes; - - updateProgressDisplay( progress_counter++, totalbytes, curbytes ); - } - - /* read snaps */ - while ( ( 1 == read_snaps ) && - ( 0 != ( retsn= OTF_Reader_readSnapshots( reader, handlers ) ) ) ) { - - if( OTF_READ_ERROR == retsn ) { - fprintf( stderr, "Error while reading snapshots. aborting\n" ); - FINISH_EVERYTHING; - exit(1); - } - - OTF_Reader_snapshotBytesProgress( reader, - &minbytestmp, &curbytestmp, &maxbytestmp ); - - curbytes += curbytestmp - minbytestmp - curbytes; - - updateProgressDisplay( progress_counter++, totalbytes, curbytes ); - } - - finishProgressDisplay(); - } - - FINISH_EVERYTHING; - - return 0; -} - - -void initProgressDisplay() { - - - printf( " %7.2f %%\r", 0.0 ); - fflush( stdout ); -} - - -void finishProgressDisplay() { - - - printf( " %7.2f %% done\n", 100.0 ); - fflush( stdout ); -} - - -void updateProgressDisplay( uint32_t i, uint64_t max, uint64_t cur ) { - - -/* static char animation[]= {"-", "\\", "|", "/" }; */ - static char* animation[]= { "", "." }; - - -/* printf( "%llu / %llu \n", cur, max ); */ - - printf( " %7.2f %% %s \r", - ( ((double) cur) * 100.0 / ((double) max) ), - animation[ i % ( sizeof(animation) / sizeof(animation[0]) ) ] ); - fflush( stdout ); -} - diff --git a/externals/otf/tools/otfmerge/otfmerge_vs08.vcproj b/externals/otf/tools/otfmerge/otfmerge_vs08.vcproj deleted file mode 100644 index 39ad50ab4d646563b84c188e47dd40ac5a2a862b..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfmerge/otfmerge_vs08.vcproj +++ /dev/null @@ -1,386 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="otfmerge" - ProjectGUID="{1B9223C8-DE20-4538-8214-776C6017D22B}" - RootNamespace="otfmerge" - Keyword="Win32Proj" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="../../debug" - IntermediateDirectory="tmp" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - CompileAs="1" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="libotf.lib" - LinkIncremental="2" - AdditionalLibraryDirectories="../../debug" - GenerateDebugInformation="true" - SubSystem="1" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_ZLIB" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - CompileAs="1" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - LinkIncremental="2" - AdditionalLibraryDirectories="" - GenerateDebugInformation="true" - SubSystem="1" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release Static|Win32" - OutputDirectory="../../release_static_32bit" - IntermediateDirectory="tmp_32bit" - ConfigurationType="1" - UseOfMFC="0" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="false" - DebugInformationFormat="0" - CompileAs="1" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="libotf.lib" - LinkIncremental="1" - AdditionalLibraryDirectories="../../release_static_32bit" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="$(NOINHERIT)" - GenerateDebugInformation="false" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release Static|x64" - OutputDirectory="../../release_static_64bit" - IntermediateDirectory="tmp_64bit" - ConfigurationType="1" - UseOfMFC="0" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="../../;../../otflib/" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="false" - DebugInformationFormat="0" - CompileAs="1" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="libotf.lib" - LinkIncremental="1" - AdditionalLibraryDirectories="../../release_static_64bit" - IgnoreAllDefaultLibraries="false" - DelayLoadDLLs="$(NOINHERIT)" - GenerateDebugInformation="false" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Quelldateien" - Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\handler.c" - > - </File> - <File - RelativePath=".\hash.c" - > - </File> - <File - RelativePath=".\otfmerge.c" - > - </File> - </Filter> - <Filter - Name="Headerdateien" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath=".\handler.h" - > - </File> - <File - RelativePath=".\hash.h" - > - </File> - </Filter> - <Filter - Name="Ressourcendateien" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/externals/otf/tools/otfprofile/CSVParse.cpp b/externals/otf/tools/otfprofile/CSVParse.cpp deleted file mode 100644 index e9c5fc44f8f99d7dbca365010b6318badf2f6758..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/CSVParse.cpp +++ /dev/null @@ -1,768 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#include "OTF_Platform.h" - -#include "CSVParse.h" - - -void Glob_Maps::set_trace_count(uint32_t t_count) -{ - trace_count = t_count; -} - -uint32_t Glob_Maps::set_func(string func_name) -{ - uint32_t id = func_id; - GlobalMaps::iterator it = funcmap.find(func_name); - if(it == funcmap.end()) - { - funcmap.insert(pair<string,uint32_t> (func_name, id)); - func_id++; - return id; - } - else - { - return it->second; - } -} - -uint32_t Glob_Maps::set_funcgroup(string fg_name) -{ - uint32_t id = funcgroup_id; - GlobalMaps::iterator it = funcgroupmap.find(fg_name); - if(it == funcgroupmap.end()) - { - funcgroupmap.insert(pair<string,uint32_t> (fg_name, id)); - funcgroup_id++; - return id; - } - else - { - return it->second; - } -} - -uint32_t Glob_Maps::set_counter(string counter_name) -{ - uint32_t id = counter_id; - GlobalMaps::iterator it = countermap.find(counter_name); - if(it == countermap.end()) - { - countermap.insert(pair<string,uint32_t> (counter_name, id)); - counter_id++; - return id; - } - else - { - return it->second; - } -} - -uint32_t Glob_Maps::set_collop(string collop_name) -{ - uint32_t id = collop_id; - GlobalMaps::iterator it = collopmap.find(collop_name); - if(it == collopmap.end()) - { - collopmap.insert(pair<string,uint32_t> (collop_name, id)); - collop_id++; - return id; - } - else - { - return it->second; - } -} - -uint32_t Glob_Maps::get_trace_count() -{ - return trace_count; -} - -uint32_t Glob_Maps::get_func(string func_name) -{ - GlobalMaps::iterator it = funcmap.find(func_name); - if(it == funcmap.end()) - { - return 0; - } - else - { - return it->second; - } -} - -uint32_t Glob_Maps::get_funcgroup(string fg_name) -{ - GlobalMaps::iterator it = funcgroupmap.find(fg_name); - if(it == funcgroupmap.end()) - { - return 0; - } - else - { - return it->second; - } -} - -uint32_t Glob_Maps::get_counter(string counter_name) -{ - GlobalMaps::iterator it = countermap.find(counter_name); - if(it == countermap.end()) - { - return 0; - } - else - { - return it->second; - } -} - -uint32_t Glob_Maps::get_collop(string collop_name) -{ - GlobalMaps::iterator it = collopmap.find(collop_name); - if(it == collopmap.end()) - { - return 0; - } - else - { - return it->second; - } -} - -bool check_value(char* value, const char* place) -{ - if(value == NULL) - { - cerr << "Error by reading the csv file." << endl; - cerr << "An expected value is missing, for the Token " << place << "." << endl; - return false; - } - else - { - return true; - } -} - -int parse_csv(Summary_Container& sum_container, const char* file, Glob_Maps& glob_maps) -{ - typedef map<uint32_t,string> LocalMaps; - - LocalMaps localfuncmap; - LocalMaps localfuncgroupmap; - LocalMaps localcountermap; - LocalMaps localcollopmap; - - static uint32_t trace_nr = 0; - trace_nr++; - - fstream in; - in.open(file, ios::in); - if(!in) - { - cerr << "Error, can't find : " << file << endl; - return 1; - } - char buffer[255]; - char* value; - uint32_t check = 0; - while(!in.eof()) - { - in.getline(buffer,255); - value = strtok(buffer,";"); - if(value == NULL) - { - continue; - } - - if(0 == strcmp("ticks", value)) - { - value = strtok(NULL,";"); - if(!check_value(value, "ticks")) // read ticks - { - return 1; - } - sum_container.adddef_Ticks(trace_nr, (uint64_t) atol(value)); - } - if(0 == strcmp("progtime", value)) - { - value = strtok(NULL,";"); - if(!check_value(value, "progtime")) // read progtime - { - return 1; - } - sum_container.set_ProgTime(trace_nr, (uint64_t) atol(value)); - } - else if(0 == strcmp("proctime", value)) // read proctime - { - value = strtok(NULL,";"); - if(!check_value(value, "proctime")) - { - return 1; - } - uint32_t proc_id = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "proctime")) - { - return 1; - } - sum_container.addvalues_ProcTime(trace_nr, proc_id, (uint64_t) atol(value)); - } - else if(0 == strcmp("proc", value)) // read proc - { - value = strtok(NULL,";"); - if(!check_value(value, "proc")) - { - return 1; - } - Process_Def_Key p_def_key(trace_nr, (uint32_t) atoi(value)); - value = strtok(NULL,";"); - if(!check_value(value, "proc")) - { - return 1; - } - sum_container.adddef_Proc(p_def_key, strdup(value)); - } - else if(0 == strcmp("fg", value)) // read fg - { - value = strtok(NULL,";"); - if(!check_value(value, "fg")) - { - return 1; - } - uint32_t fg_id = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "fg")) - { - return 1; - } - const char* name_char = strdup(value); - string name; - name.assign(name_char); - localfuncgroupmap.insert(make_pair(fg_id, name)); - fg_id = glob_maps.set_funcgroup(name); - - FG_Def_Key fg_def_key(trace_nr, fg_id); - sum_container.adddef_FG(fg_def_key, name_char); - - } - else if(0 == strcmp("funcdef", value)) // read funcdef - { - value = strtok(NULL,";"); - if(!check_value(value, "funcdef")) - { - return 1; - } - uint32_t func_id = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "funcdef")) - { - return 1; - } - const char* name_char = strdup(value); - string name; - name.assign(name_char); - localfuncmap.insert(make_pair(func_id, name)); - func_id = glob_maps.set_func(name); - Function_Def_Key f_def_key(trace_nr, func_id); - - value = strtok(NULL,";"); - if(!check_value(value, "funcdef")) - { - return 1; - } - LocalMaps::iterator it = localfuncgroupmap.find((uint32_t) atoi(value)); - if(it == localfuncgroupmap.end()) - { - cerr << "Error by getting values for function. No function group name found" - << ", for the given identifier. A failure in the csv file could be" - << " the reason." << endl; - } - else - { - uint32_t fg_id = glob_maps.get_funcgroup(it->second); - if(fg_id == 0) - { - cerr << "No function group entry found." - << "This could be a failure in the csv file." << endl; - continue; - } - Function_Def f_def(name_char, fg_id); - sum_container.adddef_Function(f_def_key, f_def); - } - } - else if(0 == strcmp("func", value)) // read func - { - value = strtok(NULL,";"); - if(!check_value(value, "func")) - { - return 1; - } - uint32_t func_id = (uint32_t) atoi(value); - LocalMaps::iterator it = localfuncmap.find(func_id); - if(it == localfuncmap.end()) - { - cerr << "Error by getting values for function. No function name found" - << ", for the given identifier. A failure in the csv file could be" - << " the reason." << endl; - continue; - } - - func_id = glob_maps.get_func(it->second); - - value = strtok(NULL,";"); - if(!check_value(value, "func")) - { - return 1; - } - uint32_t proc_id = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "func")) - { - return 1; - } - uint64_t invoc = (uint64_t) atol(value); - value = strtok(NULL,";"); - if(!check_value(value, "func")) - { - return 1; - } - uint64_t excl_time = (uint64_t) atol(value); - value = strtok(NULL,";"); - if(!check_value(value, "func")) - { - return 1; - } - sum_container.addvalues_Function(trace_nr,func_id, proc_id, invoc, - excl_time, (uint64_t) atol(value)); - } - else if(0 == strcmp("counterdef", value)) // read counterdef - { - value = strtok(NULL,";"); - if(!check_value(value, "counterdef")) - { - return 1; - } - uint32_t counter_id = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "counterdef")) - { - return 1; - } - const char* name_char = strdup(value); - string name; - name.assign(name_char); - localcountermap.insert(pair<uint32_t,string>(counter_id, name)); - counter_id = glob_maps.set_counter(name); - - Counter_Def_Key c_def_key(trace_nr, counter_id); - value = strtok(NULL,";"); - if(!check_value(value, "counterdef")) - { - return 1; - } - Counter_Def c_def(name_char, strdup(value)); - sum_container.adddef_Counter(c_def_key,c_def); - } - else if(0 == strcmp("counter", value)) // read counter - { - value = strtok(NULL,";"); - if(!check_value(value, "counter")) - { - return 1; - } - uint32_t func_id = (uint32_t) atoi(value); - LocalMaps::iterator it = localfuncmap.find(func_id); - if(it == localfuncmap.end()) - { - cerr << "Error by getting values for counter. No function name found" - << ", for the given identifier. A failure in the csv file could be" - << " the reason." << endl; - continue; - } - else - { - func_id = glob_maps.get_func(it->second); - } - value = strtok(NULL,";"); - if(!check_value(value, "counter")) - { - return 1; - } - uint32_t proc_id = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "counter")) - { - return 1; - } - uint32_t counter_id = (uint32_t) atoi(value); - LocalMaps::iterator it2 = localcountermap.find(counter_id); - if(it2 == localcountermap.end()) - { - cerr << "Error by getting values for counter. No counter name found" - << ", for the given identifier. A failure in the csv file could be" - << " the reason." << endl; - continue; - } - else - { - counter_id = glob_maps.get_counter(it2->second); - } - value = strtok(NULL,";"); - if(!check_value(value, "counter")) - { - return 1; - } - uint64_t excl_value = (uint64_t) atol(value); - value = strtok(NULL,";"); - if(!check_value(value, "counter")) - { - return 1; - } - uint64_t incl_value = (uint64_t) atol(value); - value = strtok(NULL,";"); - if(!check_value(value, "counter")) - { - return 1; - } - if(0 == strcmp("VALID", value)) - { - sum_container.addvalues_Counter(trace_nr, func_id, proc_id, counter_id, - excl_value, incl_value, VALID); - } - else - { - sum_container.addvalues_Counter(trace_nr, func_id, proc_id, counter_id, - excl_value, incl_value, INVALID); - } - } - else if(0 == strcmp("p2p", value)) // read p2p - { - value = strtok(NULL,";"); - if(!check_value(value, "p2p")) - { - return 1; - } - uint32_t sender = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "p2p")) - { - return 1; - } - uint32_t receiver = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "p2p")) - { - return 1; - } - uint32_t bin_1 = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "p2p")) - { - return 1; - } - uint32_t bin_2 = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "p2p")) - { - return 1; - } - uint64_t invoc = (uint64_t) atol(value); - value = strtok(NULL,";"); - if(!check_value(value, "p2p")) - { - return 1; - } - uint64_t length = (uint64_t) atol(value); - value = strtok(NULL,";"); - if(!check_value(value, "p2p")) - { - return 1; - } - sum_container.addvalues_P2P(trace_nr, sender, receiver, bin_1, bin_2, invoc, - length, (uint64_t) atol(value)); - } - else if(0 == strcmp("collopdef", value)) // read collopdef - { - value = strtok(NULL,";"); - if(!check_value(value, "collopdef")) - { - return 1; - } - uint32_t collop_id = (uint32_t) atoi(value); - - value = strtok(NULL,";"); - if(!check_value(value, "collopdef")) - { - return 1; - } - const char* name_char = strdup(value); - string name; - name.assign(name_char); - localcollopmap.insert(pair<uint32_t,string>(collop_id, name)); - collop_id = glob_maps.set_collop(name); - - CollOp_Def_Key collop_def_key(trace_nr, collop_id); - value = strtok(NULL,";"); - if(!check_value(value, "collopdef")) - { - return 1; - } - uint32_t type; - if(0 == strcmp("Barrier", value)) - { - type = OTF_COLLECTIVE_TYPE_BARRIER; - } - else if(0 == strcmp("ONE2ALL", value)) - { - type = OTF_COLLECTIVE_TYPE_ONE2ALL; - } - else if(0 == strcmp("ALL2ONE", value)) - { - type = OTF_COLLECTIVE_TYPE_ALL2ONE; - } - else if(0 == strcmp("ALL2ALL", value)) - { - type = OTF_COLLECTIVE_TYPE_ALL2ALL; - } - else - { - type = OTF_COLLECTIVE_TYPE_UNKNOWN; - } - CollOp_Def collop_def(name_char, type); - sum_container.adddef_CollOp(collop_def_key, collop_def); - } - else if(0 == strcmp("collop", value)) // read collop - { - value = strtok(NULL,";"); - if(!check_value(value, "collop")) - { - return 1; - } - uint32_t proc = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "collop")) - { - return 1; - } - uint32_t collop_id = (uint32_t) atoi(value); - LocalMaps::iterator it = localcollopmap.find(collop_id); - if(it == localcollopmap.end()) - { - cerr << "Error by getting values for Collective Operations." - << "No Collective Operation name found" - << ", for the given identifier. A failure in the csv file could be" - << " the reason." << endl; - continue; - } - - collop_id = glob_maps.get_collop(it->second); - - value = strtok(NULL,";"); - if(!check_value(value, "collop")) - { - return 1; - } - uint64_t invoc_s = (uint64_t) atol(value); - value = strtok(NULL,";"); - if(!check_value(value, "collop")) - { - return 1; - } - uint64_t invoc_r = (uint64_t) atol(value); - value = strtok(NULL,";"); - if(!check_value(value, "collop")) - { - return 1; - } - uint64_t sent = (uint64_t) atol(value); - value = strtok(NULL,";"); - if(!check_value(value, "collop")) - { - return 1; - } - uint64_t received = (uint64_t) atol(value); - value = strtok(NULL,";"); - if(!check_value(value, "collop")) - { - return 1; - } - sum_container.addvalues_CollOp(trace_nr, proc, collop_id, invoc_s, invoc_r, sent, - received, (uint64_t) atol(value)); - } - else if(0 == strcmp("bin1", value)) // read bin1 - { - value = strtok(NULL,";"); - if(!check_value(value, "bin1")) - { - return 1; - } - uint32_t bin = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "bin1")) - { - return 1; - } - uint64_t min = (uint64_t) atol(value); - value = strtok(NULL,";"); - if(!check_value(value, "bin1")) - { - return 1; - } - sum_container.setdef_Bin1(trace_nr, bin, min, (uint64_t) atol(value)); - } - else if(0 == strcmp("bin2", value)) // read bin2 - { - value = strtok(NULL,";"); - if(!check_value(value, "bin2")) - { - return 1; - } - uint32_t bin = (uint32_t) atoi(value); - value = strtok(NULL,";"); - if(!check_value(value, "bin2")) - { - return 1; - } - uint64_t min = (uint64_t) atol(value); - value = strtok(NULL,";"); - if(!check_value(value, "bin2")) - { - return 1; - } - sum_container.setdef_Bin2(trace_nr, bin, min, (uint64_t) atol(value)); - } - else - { - if(check < 20) - { - ++check; - } - else - { - cerr << "Error in csv_parse().Too much unknown token in csv file : " - << file << endl; - return 1; - } - } - } - in.close(); - sum_container.adddef_Trace(trace_nr, file); - glob_maps.set_trace_count(trace_nr); - - return 0; -} - -int Glob_Maps::special_synchronize(Summary_Container& sum_container) -{ - GlobalMaps::iterator it; - it = funcmap.begin(); - uint32_t differences[4] = {0,0,0,0}; // 1 := func_def ; 2:= fg_Def ; ... - while(it != funcmap.end()) - { - for(uint32_t i = 1; i <= trace_count; i++) - { - Function_Def_Key f_def_key(i, it->second); - if(!sum_container.find_Function(f_def_key)) - { - cerr << "Function " << it->first << " couldn\'t found in trace " - << sum_container.get_Trace_name(i) << endl; - for(uint32_t u = 1; u <= trace_count; u++) - { - Function_Def_Key f2_def_key(u, it->second); - if(sum_container.find_Function(f2_def_key)) - { - Function_Def f_def = sum_container.get_Function_Def(u, it->second); - sum_container.adddef_Function(f_def_key, f_def); - differences[0] += 1; - cerr << "Problem fixed" << endl; - break; - } - } - } - } - ++it; - } - it = funcgroupmap.begin(); - while(it != funcgroupmap.end()) - { - for(uint32_t i = 1; i <= trace_count; i++) - { - FG_Def_Key fg_def_key(i, it->second); - if(!sum_container.find_FG(fg_def_key)) - { - cerr << "Function Group " << it->first << " couldn\'t found in trace " - << sum_container.get_Trace_name(i) << endl; - sum_container.adddef_FG(fg_def_key, strdup(it->first.c_str())); - differences[1] += 1; - cerr << "Problem fixed" << endl; - } - } - ++it; - } - it = countermap.begin(); - while(it != countermap.end()) - { - for(uint32_t i = 1; i <= trace_count; i++) - { - Counter_Def_Key c_def_key(i, it->second); - if(!sum_container.find_Counter(c_def_key)) - { - cerr << "Counter " << it->first << " couldn\'t found in trace " - << sum_container.get_Trace_name(i) << endl; - for(uint32_t u = 1; u <= trace_count; u++) - { - Counter_Def_Key c2_def_key(u, it->second); - if(sum_container.find_Counter(c2_def_key)) - { - Counter_Def c_def = sum_container.get_Counter_Def(u, it->second); - sum_container.adddef_Counter(c_def_key, c_def); - differences[2] += 1; - cerr << "Problem fixed" << endl; - break; - } - } - } - } - ++it; - } - - it = collopmap.begin(); - while(it != collopmap.end()) - { - for(uint32_t i = 1; i <= trace_count; i++) - { - CollOp_Def_Key co_def_key(i, it->second); - if(!sum_container.find_CollOp(co_def_key)) - { - cerr << "Collective Operation " << it->first << " couldn\'t found in trace " - << sum_container.get_Trace_name(i) << endl; - for(uint32_t u = 1; u <= trace_count; u++) - { - CollOp_Def_Key co2_def_key(u, it->second); - if(sum_container.find_CollOp(co2_def_key)) - { - CollOp_Def co_def = sum_container.get_CollOp_Def(u, it->second); - sum_container.adddef_CollOp(co_def_key, co_def); - differences[3] += 1; - cerr << "Problem fixed" << endl; - break; - } - } - } - } - ++it; - } - - cout << endl; - cout << "Differences in Func_Def : " << differences[0] << endl; - cout << "Differences in Func_Group_Def : " << differences[1] << endl; - cout << "Differences in Counter_Def : " << differences[2] << endl; - cout << "Differences in CollOp_Def : " << differences[3] << endl; - - return 0; -} diff --git a/externals/otf/tools/otfprofile/CSVParse.h b/externals/otf/tools/otfprofile/CSVParse.h deleted file mode 100644 index 253841fdc27e31f32ee624528d8e971eabb3098d..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/CSVParse.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#ifndef CSVPARSER_H -#define CSVPARSER_H - -#include <iostream> -#include <fstream> -#include <map> -#include <string> - -#include "OTF_inttypes.h" - -#include "DataStructure.h" - - -using namespace std; - -// to synchronize the data of the different csv files - -class Glob_Maps -{ - typedef map<string,uint32_t> GlobalMaps; - - public: - Glob_Maps(); - int special_synchronize(Summary_Container& sum_container); - void set_trace_count(uint32_t t_count); - uint32_t get_trace_count(); - // the return value is the identifier - uint32_t set_func(string func_name); - uint32_t set_funcgroup(string fg_name); - uint32_t set_counter(string counter_name); - uint32_t set_collop(string collop_name); - - uint32_t get_func(string func_name); - uint32_t get_funcgroup(string fg_name); - uint32_t get_counter(string counter_name); - uint32_t get_collop(string collop_name); - - private: - uint32_t trace_count; - uint32_t func_id; - uint32_t funcgroup_id; - uint32_t counter_id; - uint32_t collop_id; - GlobalMaps funcmap; - GlobalMaps funcgroupmap; - GlobalMaps countermap; - GlobalMaps collopmap; -}; - -inline Glob_Maps::Glob_Maps() -{ - trace_count = 0; - func_id = 1; - funcgroup_id = 1; - counter_id = 1; - collop_id = 1; -} - -int parse_csv(Summary_Container& sum_container, const char* file, Glob_Maps& glob_maps); - -#endif /* CSVPARSER_H */ diff --git a/externals/otf/tools/otfprofile/DataStructure.cpp b/externals/otf/tools/otfprofile/DataStructure.cpp deleted file mode 100644 index 5aedaeca65ff050da18c10a021d17b2f2061df44..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/DataStructure.cpp +++ /dev/null @@ -1,1694 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#include "DataStructure.h" - -/************************************** operator< **************************************/ - -bool operator<(const FG_Def_Key& c1, const FG_Def_Key& c2 ) -{ - if(c1.trace != c2.trace) - return (c1.trace < c2.trace); - else if(c1.ident != c2.ident) - return (c1.ident < c2.ident); - else - return false; -} - -bool operator<(const Process_Def_Key& c1, const Process_Def_Key& c2) -{ - if(c1.trace != c2.trace) - return (c1.trace < c2.trace); - else if(c1.ident != c2.ident) - return (c1.ident < c2.ident); - else - return false; -} - -bool operator<(const Function_Def_Key& c1, const Function_Def_Key& c2) -{ - if(c1.trace != c2.trace) - return (c1.trace < c2.trace); - else if(c1.ident != c2.ident) - return (c1.ident < c2.ident); - else - return false; -} - -bool operator<(const Counter_Def_Key& c1, const Counter_Def_Key& c2) -{ - if(c1.trace != c2.trace) - return (c1.trace < c2.trace); - else if(c1.ident != c2.ident) - return (c1.ident < c2.ident); - else - return false; -} - -bool operator<(const CollOp_Def_Key& c1, const CollOp_Def_Key& c2) -{ - if(c1.trace != c2.trace) - return (c1.trace < c2.trace); - else if(c1.ident != c2.ident) - return (c1.ident < c2.ident); - else - return false; -} - -bool operator<(const Bin_1_Key& c1, const Bin_1_Key& c2) -{ - if(c1.trace != c2.trace) - return (c1.trace < c2.trace); - else if(c1.ident != c2.ident) - return (c1.ident < c2.ident); - else - return false; -} - -bool operator<(const Bin_2_Key& c1, const Bin_2_Key& c2) -{ - if(c1.trace != c2.trace) - return (c1.trace < c2.trace); - else if(c1.ident != c2.ident) - return (c1.ident < c2.ident); - else - return false; -} - -bool operator<(const Function_Key& f_key1,const Function_Key& f_key2) -{ - if(f_key1.trace != f_key2.trace) - return (f_key1.trace < f_key2.trace); - else if(f_key1.func != f_key2.func) - return (f_key1.func < f_key2.func); - else if(f_key1.proc != f_key2.proc) - return (f_key1.proc < f_key2.proc); - else - return false; -} - -bool operator<(const Counter_Key& c_key1, const Counter_Key& c_key2) -{ - if(c_key1.trace != c_key2.trace) - return (c_key1.trace < c_key2.trace); - else if(c_key1.func != c_key2.func) - return (c_key1.func < c_key2.func); - else if(c_key1.proc != c_key2.proc) - return (c_key1.proc < c_key2.proc); - else if(c_key1.counter != c_key2.counter) - return (c_key1.counter < c_key2.counter); - else - return false; -} - -bool operator<(const P2P_Key& p2p_key1, const P2P_Key& p2p_key2) -{ - if(p2p_key1.trace != p2p_key2.trace) - return (p2p_key1.trace < p2p_key2.trace); - else if(p2p_key1.sender != p2p_key2.sender) - return (p2p_key1.sender < p2p_key2.sender); - else if(p2p_key1.receiver != p2p_key2.receiver) - return (p2p_key1.receiver < p2p_key2.receiver); - else if(p2p_key1.bin_1 != p2p_key2.bin_1) - return (p2p_key1.bin_1 < p2p_key2.bin_1); - else if(p2p_key1.bin_2 != p2p_key2.bin_2) - return (p2p_key1.bin_2 < p2p_key2.bin_2); - else - return false; -} - -bool operator<(const CollOp_Key& coll_key1, const CollOp_Key& coll_key2) -{ - if(coll_key1.trace != coll_key2.trace) - return (coll_key1.trace < coll_key2.trace); - else if(coll_key1.proc != coll_key2.proc) - return (coll_key1.proc < coll_key2.proc); - else if(coll_key1.collop != coll_key2.collop) - return (coll_key1.collop < coll_key2.collop); - else - return false; -} - - -/************************************** operator== **************************************/ - - -bool operator==(const FG_Def_Key& c1, const FG_Def_Key& c2 ) -{ - if(((0 == c1.trace) || (0 == c2.trace) || (c1.trace == c2.trace)) && - ((0 == c1.ident) || (0 == c2.ident) || (c1.ident == c2.ident))) - return true; - else - return false; -} - -bool operator==(const Process_Def_Key& c1, const Process_Def_Key& c2) -{ - if(((0 == c1.trace) || (0 == c2.trace) || (c1.trace == c2.trace)) && - ((0 == c1.ident) || (0 == c2.ident) || (c1.ident == c2.ident))) - return true; - else - return false; -} - -bool operator==(const Function_Def_Key& c1, const Function_Def_Key& c2) -{ - if(((0 == c1.trace) || (0 == c2.trace) || (c1.trace == c2.trace)) && - ((0 == c1.ident) || (0 == c2.ident) || (c1.ident == c2.ident))) - return true; - else - return false; -} - -bool operator==(const Counter_Def_Key& c1, const Counter_Def_Key& c2) -{ - if(((0 == c1.trace) || (0 == c2.trace) || (c1.trace == c2.trace)) && - ((0 == c1.ident) || (0 == c2.ident) || (c1.ident == c2.ident))) - return true; - else - return false; -} - -bool operator==(const CollOp_Def_Key& c1, const CollOp_Def_Key& c2) -{ - if(((0 == c1.trace) || (0 == c2.trace) || (c1.trace == c2.trace)) && - ((0 == c1.ident) || (0 == c2.ident) || (c1.ident == c2.ident))) - return true; - else - return false; -} - -bool operator==(const Bin_1_Key& c1, const Bin_1_Key& c2) -{ - if(((0 == c1.trace) || (0 == c2.trace) || (c1.trace == c2.trace)) && - ((0 == c1.ident) || (0 == c2.ident) || (c1.ident == c2.ident))) - return true; - else - return false; -} - -bool operator==(const Bin_2_Key& c1, const Bin_2_Key& c2) -{ - if(((0 == c1.trace) || (0 == c2.trace) || (c1.trace == c2.trace)) && - ((0 == c1.ident) || (0 == c2.ident) || (c1.ident == c2.ident))) - return true; - else - return false; -} - - - -bool operator==(const Function_Key& f_key1,const Function_Key& f_key2) -{ - if(((0 == f_key1.trace) || (0 == f_key2.trace) || (f_key1.trace == f_key2.trace)) && - ((0 == f_key1.func) || (0 == f_key2.func) || (f_key1.func == f_key2.func)) && - ((0 == f_key1.proc) || (0 == f_key2.proc) || (f_key1.proc == f_key2.proc))) - return true; - else - return false; -} - -bool operator==(const Counter_Key& c_key1,const Counter_Key& c_key2) -{ - if(((0 == c_key1.trace) || (0 == c_key2.trace) || (c_key1.trace == c_key2.trace)) && - ((0 == c_key1.func) || (0 == c_key2.func) || (c_key1.func == c_key2.func)) && - ((0 == c_key1.proc) || (0 == c_key2.proc) || (c_key1.proc == c_key2.proc)) && - ((0 == c_key1.counter) || (0 == c_key2.counter) || (c_key1.counter == c_key2.counter))) - return true; - else - return false; -} - -bool operator==(const P2P_Key& p2p_key1,const P2P_Key& p2p_key2) -{ - if(((0 == p2p_key1.trace) || (0 == p2p_key2.trace) || (p2p_key1.trace == p2p_key2.trace)) && - ((0 == p2p_key1.sender) || (0 == p2p_key2.sender) || (p2p_key1.sender == p2p_key2.sender)) && - ((0 == p2p_key1.receiver) || (0 == p2p_key2.receiver) || (p2p_key1.receiver == p2p_key2.receiver)) && - ((0 == p2p_key1.bin_1) || (0 == p2p_key2.bin_1) || (p2p_key1.bin_1 == p2p_key2.bin_1)) && - ((0 == p2p_key1.bin_2) || (0 == p2p_key2.bin_2) || (p2p_key1.bin_2 == p2p_key2.bin_2))) - return true; - else - return false; -} - -bool operator==(const CollOp_Key& co_key1,const CollOp_Key& co_key2) -{ - if(((0 == co_key1.trace) || (0 == co_key2.trace) || (co_key1.trace == co_key2.trace)) && - ((0 == co_key1.proc) || (0 == co_key2.proc) || (co_key1.proc == co_key2.proc)) && - ((0 == co_key1.collop) || (0 == co_key2.collop) || (co_key1.collop == co_key2.collop))) - return true; - else - return false; -} - - -/************************************** operator+= **************************************/ - -Function_Value& Function_Value::operator+=(const Function_Value& f_value) -{ - invoc += f_value.invoc; - excl_time += f_value.excl_time; - incl_time += f_value.incl_time; - - return *this; -} - -Counter_Value& Counter_Value::operator+=(const Counter_Value& c_value) -{ - if((valid == INVALID) || (c_value.valid == INVALID)) - valid = INVALID; - excl_value += c_value.excl_value; - incl_value += c_value.incl_value; - - return *this; -} - -P2P_Value& P2P_Value::operator+=(const P2P_Value& p2p_value) -{ - invoc += p2p_value.invoc; - length += p2p_value.length; - time += p2p_value.time; - - return *this; -} - -CollOp_Value& CollOp_Value::operator+=(const CollOp_Value& coll_value) -{ - invoc_send += coll_value.invoc_send; - invoc_receive += coll_value.invoc_receive; - length_send += coll_value.length_send; - length_receive += coll_value.length_receive; - time += coll_value.time; - - return *this; -} - -/************************************** operator= **************************************/ - -Function_Value& Function_Value::operator=(const Function_Value& f_value) -{ - invoc = f_value.invoc; - excl_time = f_value.excl_time; - incl_time = f_value.incl_time; - - return *this; -} - -Counter_Value& Counter_Value::operator=(const Counter_Value& c_value) -{ - valid = c_value.valid; - excl_value = c_value.excl_value; - incl_value = c_value.incl_value; - - return *this; -} - -P2P_Value& P2P_Value::operator=(const P2P_Value& p2p_value) -{ - invoc = p2p_value.invoc; - length = p2p_value.length; - time = p2p_value.time; - - return *this; -} - -CollOp_Value& CollOp_Value::operator=(const CollOp_Value& coll_value) -{ - invoc_send = coll_value.invoc_send; - invoc_receive = coll_value.invoc_receive; - length_send = coll_value.length_send; - length_receive = coll_value.length_receive; - time = coll_value.time; - - return *this; -} - -/****************************** Summary_Container methodes ******************************/ - -int Summary_Container::adddef_Function(Function_Def_Key f_def_key, Function_Def f_def) -{ - func_def_map.insert(make_pair(f_def_key, f_def)); - return 0; -} - -int Summary_Container::adddef_Counter(Counter_Def_Key c_def_key, Counter_Def c_def) -{ - counter_def_map.insert(make_pair(c_def_key, c_def)); - return 0; -} - -int Summary_Container::adddef_FG(FG_Def_Key fg_def_key, const char* name) -{ - if(name == NULL) - fg_def_map.insert(make_pair(fg_def_key, - (const char*)"functiongroup")); - else - fg_def_map.insert(make_pair(fg_def_key, name)); - - return 0; -} - -int Summary_Container::adddef_Proc(Process_Def_Key p_def_key, const char* name) -{ - if(name == NULL) - proc_def_map.insert(make_pair(p_def_key, - (const char*)"process")); - else - proc_def_map.insert(make_pair(p_def_key, name)); - - return 0; -} - -int Summary_Container::adddef_CollOp(CollOp_Def_Key coll_def_key, CollOp_Def coll_def) -{ - collop_def_map.insert(make_pair(coll_def_key, coll_def)); - return 0; -} - -int Summary_Container::adddef_Ticks(uint32_t trace, uint64_t ticks) -{ - ticks_def_map.insert(make_pair(trace, ticks)); - return 0; -} - -int Summary_Container::adddef_Trace(uint32_t trace, const char* name) -{ - if(name == NULL) - trace_map.insert(make_pair(trace, - (const char*)"trace")); - else - trace_map.insert(make_pair(trace, name)); - - return 0; -} - -int Summary_Container::adddef_Bin(uint32_t trace) -{ - uint32_t i; - - /* Bin_1 */ - - uint32_t N = 24; - uint64_t border = 1; - uint64_t border_temp = 0; - for(i = 1; i < N; i++) - { - Bin_1_Key b_1_key(trace, i); - Bin_1_Value b_1_value(border_temp, border); - bin_1_map.insert(make_pair(b_1_key, b_1_value)); - border_temp = border + 1; - border <<= 1; - } - Bin_1_Key b_1_key(trace, N); - Bin_1_Value b_1_value(border_temp, border_temp); - // min_value == max_value -> for all values bigger than min_value - bin_1_map.insert(make_pair(b_1_key, b_1_value)); - - /* Bin_2 */ - - N = 16; - border = 4; - border_temp = 0; - for(i = 1; i < N; i++) - { - Bin_2_Key b_2_key(trace, i); - Bin_2_Value b_2_value(border_temp, border); - bin_2_map.insert(make_pair(b_2_key, b_2_value)); - border_temp = border + 1; - border <<= 2; - } - Bin_2_Key b_2_key(trace, N); - Bin_2_Value b_2_value(border_temp, border_temp); - // min_value == max_value -> for all values bigger than min_value - bin_2_map.insert(make_pair(b_2_key, b_2_value)); - - return 0; -} - -int Summary_Container::setdef_Bin1(uint32_t trace, uint32_t bin, uint64_t min, uint64_t max) -{ - if((bin <= 0) || (trace <= 0)) - { - return 1; - } - Bin_1_Key b_1_key(trace, bin); - Bin_1_Value b_1_value(min, max); - bin_1_map.insert(make_pair(b_1_key, b_1_value)); - return 0; -} - -int Summary_Container::setdef_Bin2(uint32_t trace, uint32_t bin, uint64_t min, uint64_t max) -{ - if((bin <= 0) || (trace <= 0)) - { - return 1; - } - Bin_2_Key b_2_key(trace, bin); - Bin_2_Value b_2_value(min, max); - bin_2_map.insert(make_pair(b_2_key, b_2_value)); - return 0; -} - -int Summary_Container::set_ProgTime(uint32_t trace, uint64_t time) -{ - progtime_map[trace] = time; - return 0; -} - -int Summary_Container::addvalues_Function(uint32_t trace, uint32_t func, uint32_t proc, - uint64_t invoc, uint64_t excl_time, - uint64_t incl_time) -{ - if((trace == 0) || (func == 0) || (proc == 0)) - { - cerr << "\nError in addvalues_Function, one or more key parameter were 0." << endl; - return 1; - } - Function_Key f_key(trace, func, proc); - Function_Value f_value(invoc, excl_time, incl_time); - function_map[f_key] += f_value; - - return 0; -} - -int Summary_Container::resetvalues_Function(uint32_t trace, uint32_t func, uint32_t proc, - uint64_t invoc, uint64_t excl_time, - uint64_t incl_time) -{ - if((trace == 0) || (func == 0) || (proc == 0)) - { - cerr << "\nError in resetvalues_Function, one or more key parameter were 0." << endl; - return 1; - } - Function_Key f_key(trace, func, proc); - Function_Value f_value(invoc, excl_time, incl_time); - function_map[f_key] = f_value; - return 0; -} - - -int Summary_Container::addvalues_Counter(uint32_t trace, uint32_t func, uint32_t proc, - uint32_t counter, uint64_t excl_value, - uint64_t incl_value, bool valid) -{ - if((trace == 0) || (func == 0) || (proc == 0) || (counter == 0)) - { - cerr << "\nError in addvalues_Counter, one or more key parameter were 0." << endl; - return 1; - } - Counter_Key c_key(trace, func, proc, counter); - Counter_Value c_value(valid, excl_value, incl_value); - counter_map[c_key] += c_value; - return 0; -} - -int Summary_Container::addvalues_P2P(uint32_t trace, uint32_t sender, uint32_t receiver, - uint32_t bin_1, uint32_t bin_2, uint64_t invoc, - uint64_t length, uint64_t time) -{ - if((trace == 0) || (sender == 0) || (receiver == 0) || (bin_1 == 0) || (bin_2 == 0)) - { - cerr << "\nError in addvalues_P2P, one or more key parameter were 0." << endl; - return 1; - } - - P2P_Value p2p_value(invoc, length, time); - - p2p_map[trace][sender][receiver][bin_1][bin_2] += p2p_value; - - return 0; -} - -int Summary_Container::resetvalues_P2P(uint32_t trace, uint32_t sender, uint32_t receiver, - uint32_t bin_1, uint32_t bin_2, uint64_t invoc, - uint64_t length, uint64_t time) -{ - if((trace == 0) || (sender == 0) || (receiver == 0) || (bin_1 == 0) || (bin_2 == 0)) - { - cerr << "\nError in resetvalues_P2P, one or more key parameter were 0." << endl; - return 1; - } - P2P_Key p2p_key(trace, sender, receiver, bin_1, bin_2); - P2P_Value p2p_value(invoc, length, time); - - map<P2P_Key,uint64_t>::iterator iter; - iter = p2p_time_map.find(p2p_key); - if(iter == p2p_time_map.end()) p2p_time_map[p2p_key] = 0; - - if(p2p_time_map[p2p_key] == time) { - p2p_map[trace][sender][receiver][bin_1][bin_2] += p2p_value; - } else { - p2p_map[trace][sender][receiver][bin_1][bin_2] = p2p_value; - p2p_time_map[p2p_key] = time; - } - return 0; -} - -int Summary_Container::addvalues_CollOp(uint32_t trace, uint32_t proc, uint32_t collop, - uint64_t invoc_send, uint64_t invoc_receive, uint64_t length_send, - uint64_t length_receive, uint64_t time) -{ - if((trace == 0) || (proc == 0) || (collop == 0)) - { - cerr << "\nError in addvalues_CollOp, one or more key parameter were 0." << endl; - return 1; - } - CollOp_Key collop_key(trace, proc, collop); - CollOp_Value collop_value(invoc_send, invoc_receive, length_send, length_receive, time); - collop_map[collop_key] += collop_value; - return 0; -} - -int Summary_Container::resetvalues_CollOp(uint32_t trace, uint32_t proc, uint32_t collop, - uint64_t invoc_send, uint64_t invoc_receive, uint64_t length_send, uint64_t length_receive, uint64_t time) -{ - if((trace == 0) || (proc == 0) || (collop == 0)) - { - cerr << "\nError in resetvalues_CollOp, one or more key parameter were 0." << endl; - return 1; - } - CollOp_Key collop_key(trace, proc, collop); - CollOp_Value collop_value(invoc_send, invoc_receive, length_send, length_receive, time); - collop_map[collop_key] = collop_value; - return 0; -} - -int Summary_Container::addvalues_ProcTime(uint32_t trace, uint32_t proc, uint64_t time) -{ - if((trace == 0) || (proc == 0)) - { - cerr << "\nError in addvalues_ProcTime, one or more key parameter were 0." << endl; - return 1; - } - Process_Def_Key proc_def_key(trace, proc); - proctime_map[proc_def_key] = time; - return 0; -} - -int Summary_Container::get_Function_Def_Key(uint32_t trace, vector<uint32_t>& f_vector) -{ - FuncDefMap::iterator it = func_def_map.begin(); - while(it != func_def_map.end()) - { - if((((Function_Def_Key) it->first).get_trace() == trace) || (trace == 0)) - { - f_vector.push_back(((Function_Def_Key) it->first).get_ident()); - } - ++it; - } - return 0; -} - -int Summary_Container::get_Counter_Def_Key(uint32_t trace, vector<uint32_t>& c_vector) -{ - CounterDefMap::iterator it = counter_def_map.begin(); - while(it != counter_def_map.end()) - { - if((((Counter_Def_Key) it->first).get_trace() == trace) || (trace == 0)) - { - c_vector.push_back(((Counter_Def_Key) it->first).get_ident()); - } - ++it; - } - return 0; -} - -int Summary_Container::get_Process_Def_Key(uint32_t trace, vector<uint32_t>& p_vector) -{ - ProcDefMap::iterator it = proc_def_map.begin(); - while(it != proc_def_map.end()) - { - if((((Process_Def_Key) it->first).get_trace() == trace) || (trace == 0)) - { - p_vector.push_back(((Process_Def_Key) it->first).get_ident()); - } - ++it; - } - return 0; -} - -int Summary_Container::get_FG_Def_Key(uint32_t trace, vector<uint32_t>& fg_vector) -{ - FGDefMap::iterator it = fg_def_map.begin(); - while(it != fg_def_map.end()) - { - if((((FG_Def_Key) it->first).get_trace() == trace) || (trace == 0)) - { - fg_vector.push_back(((FG_Def_Key) it->first).get_ident()); - } - ++it; - } - return 0; -} - -int Summary_Container::get_CollOp_Def_Key(uint32_t trace, vector<uint32_t>& collop_vector) -{ - CollOpDefMap::iterator it = collop_def_map.begin(); - while(it != collop_def_map.end()) - { - if((((CollOp_Def_Key) it->first).get_trace() == trace) || (trace == 0)) - { - collop_vector.push_back(((CollOp_Def_Key) it->first).get_ident()); - } - ++it; - } - return 0; -} - -int Summary_Container::get_Bin1_Def_Key(uint32_t trace, vector<uint32_t>& bin1_vector) -{ - Bin1Map::iterator it = bin_1_map.begin(); - while(it != bin_1_map.end()) - { - if((((Bin_1_Key) it->first).get_trace() == trace) || (trace == 0)) - { - bin1_vector.push_back(((Bin_1_Key) it->first).get_ident()); - } - ++it; - } - return 0; -} - -int Summary_Container::get_Bin2_Def_Key(uint32_t trace, vector<uint32_t>& bin2_vector) -{ - Bin2Map::iterator it = bin_2_map.begin(); - while(it != bin_2_map.end()) - { - if((((Bin_2_Key) it->first).get_trace() == trace) || (trace == 0)) - { - bin2_vector.push_back(((Bin_2_Key) it->first).get_ident()); - } - ++it; - } - return 0; -} - -int Summary_Container::get_Trace(vector<uint32_t>& trace_vector) -{ - TraceMap::iterator it = trace_map.begin(); - while(it != trace_map.end()) - { - trace_vector.push_back(it->first); - ++it; - } - return 0; -} - -Function_Def Summary_Container::get_Function_Def(uint32_t trace, uint32_t func) -{ - Function_Def_Key f_def_key(trace, func); - FuncDefMap::iterator it = func_def_map.find(f_def_key); - if(it == func_def_map.end()) - { - Function_Def f_def(NULL, 0); //No entry in map - return f_def; - } - else - return it->second; -} - -Counter_Def Summary_Container::get_Counter_Def(uint32_t trace, uint32_t counter) -{ - Counter_Def_Key c_def_key(trace, counter); - CounterDefMap::iterator it = counter_def_map.find(c_def_key); - if(it == counter_def_map.end()) - { - Counter_Def c_def(NULL, NULL); //No entry in map - return c_def; - } - else - return it->second; -} - -const char* Summary_Container::get_Process_Def(uint32_t trace, uint32_t proc) -{ - Process_Def_Key p_def_key(trace, proc); - ProcDefMap::iterator it = proc_def_map.find(p_def_key); - if(it == proc_def_map.end()) - return NULL; - else - return it->second; -} - -const char* Summary_Container::get_FG_Def(uint32_t trace, uint32_t fg) -{ - FG_Def_Key fg_def_key(trace, fg); - FGDefMap::iterator it = fg_def_map.find(fg_def_key); - if(it == fg_def_map.end()) - return NULL; - else - return it->second; -} - -const char* Summary_Container::get_Trace_name(uint32_t trace) -{ - TraceMap::iterator it = trace_map.find(trace); - if(it == trace_map.end()) - return NULL; - else - return it->second; -} - -CollOp_Def Summary_Container::get_CollOp_Def(uint32_t trace, uint32_t collop) -{ - CollOp_Def_Key collop_def_key(trace, collop); - CollOpDefMap::iterator it = collop_def_map.find(collop_def_key); - if(it == collop_def_map.end()) - { - CollOp_Def collop_def(NULL, 0); //No entry in map - return collop_def; - } - else - return it->second; -} - -uint32_t Summary_Container::get_CollOpType_Def(uint32_t trace, uint32_t collop) -{ - CollOp_Def_Key collop_def_key(trace, collop); - CollOpDefMap::iterator it = collop_def_map.find(collop_def_key); - if(it == collop_def_map.end()) - return 0; - else - return it->second.get_type(); -} - -Function_Value Summary_Container::get_Function(uint32_t trace, uint32_t func, uint32_t proc) -{ - Function_Key f_key(trace, func, proc); - Function_Value f_value; - FunctionMap::iterator it; - - if(trace == 0 || func == 0 || proc == 0) - { - it = function_map.begin(); - while(it != function_map.end()) - { - if(it->first == f_key) - f_value += it->second; - ++it; - } - return f_value; - } - else - { - it = function_map.find(f_key); - if(it == function_map.end()) - return f_value; - else - return f_value += it->second; - } -} - -Counter_Value Summary_Container::get_Counter(uint32_t trace, uint32_t func, uint32_t proc, - uint32_t counter) -{ - Counter_Key c_key(trace, func, proc, counter); - Counter_Value c_value; - CounterMap::iterator it; - - if(trace == 0 || func == 0 || proc == 0 || counter == 0) - { - it = counter_map.begin(); - while(it != counter_map.end()) - { - if(it->first == c_key) - c_value += it->second; - ++it; - } - return c_value; - } - else - { - it = counter_map.find(c_key); - if(it == counter_map.end()) - return c_value; - else - return c_value += it->second; - } -} - -P2P_Value Summary_Container::get_P2P(uint32_t trace, uint32_t sender, uint32_t receiver, - uint32_t bin_1, uint32_t bin_2) -{ - P2P_Value p2p_value; - map<uint32_t, map<uint32_t, map<uint32_t, map<uint32_t, map<uint32_t, P2P_Value> > > > >::iterator trace_it; - map<uint32_t, map<uint32_t, map<uint32_t, map<uint32_t, P2P_Value> > > >::iterator send_it; - map<uint32_t, map<uint32_t, map<uint32_t, P2P_Value> > >::iterator recv_it; - map<uint32_t, map<uint32_t, P2P_Value> >::iterator bin1_it; - map<uint32_t, P2P_Value>::iterator bin2_it; - - if( trace > 0 && bin_1 == 0 && bin_2 == 0) { - if( sender > 0 && receiver > 0) { - - bin1_it = p2p_map[trace][sender][receiver].begin(); - while(bin1_it != p2p_map[trace][sender][receiver].end() ) { - bin2_it = bin1_it->second.begin(); - while( bin2_it != bin1_it->second.end() ) { - p2p_value += bin2_it->second; - ++bin2_it; - } - ++bin1_it; - } - - return p2p_value; - - } else if( sender > 0) { - - recv_it = p2p_map[trace][sender].begin(); - while(recv_it != p2p_map[trace][sender].end() ) { - bin1_it = recv_it->second.begin(); - while(bin1_it != recv_it->second.end() ) { - bin2_it = bin1_it->second.begin(); - while( bin2_it != bin1_it->second.end() ) { - p2p_value += bin2_it->second; - ++bin2_it; - } - ++bin1_it; - } - ++recv_it; - } - - return p2p_value; - - } else if( receiver > 0) { - - send_it = p2p_map[trace].begin(); - while( send_it != p2p_map[trace].end() ) { - bin1_it = send_it->second[receiver].begin(); - while( bin1_it != send_it->second[receiver].end() ) { - bin2_it = bin1_it->second.begin(); - while( bin2_it != bin1_it->second.end() ) { - p2p_value += bin2_it->second; - ++bin2_it; - } - ++bin1_it; - } - ++send_it; - } - - return p2p_value; - - } - - } else if( trace > 0 && sender == 0 && receiver == 0 ) { - if( bin_1 > 0 && bin_2 > 0 ) { - - send_it = p2p_map[trace].begin(); - while(send_it != p2p_map[trace].end() ) { - recv_it = send_it->second.begin(); - while( recv_it != send_it->second.end() ) { - p2p_value += recv_it->second[bin_1][bin_2]; - ++recv_it; - } - ++send_it; - } - - return p2p_value; - - } else if( bin_1 > 0 ) { - - send_it = p2p_map[trace].begin(); - while(send_it != p2p_map[trace].end() ) { - recv_it = send_it->second.begin(); - while( recv_it != send_it->second.end() ) { - bin2_it = recv_it->second[bin_1].begin(); - while( bin2_it != recv_it->second[bin_1].end() ) { - p2p_value += bin2_it->second; - ++bin2_it; - } - ++recv_it; - } - ++send_it; - } - - return p2p_value; - - } - - } - - /* this case should never appear, however following part fits for each case (but it is slow) */ - /*cerr << "Unknown constellation while summarising P2P values." << endl;*/ - - for( trace_it = p2p_map.begin(); trace_it != p2p_map.end(); ++trace_it) { - for( send_it = trace_it->second.begin(); send_it != trace_it->second.end(); ++send_it ) { - for( recv_it = send_it->second.begin(); recv_it != send_it->second.end(); ++recv_it ) { - for( bin1_it = recv_it->second.begin(); bin1_it != recv_it->second.end(); ++bin1_it ) { - for( bin2_it = bin1_it->second.begin(); bin2_it != bin1_it->second.end(); ++bin2_it ) { - - } - } - } - } - } - - return p2p_value; -} - -CollOp_Value Summary_Container::get_CollOp(uint32_t trace, uint32_t proc, uint32_t collop) -{ - CollOp_Key collop_key(trace, proc, collop); - CollOp_Value collop_value; - CollOpMap::iterator it; - - if(trace == 0 || proc == 0 || collop == 0) - { - it = collop_map.begin(); - while(it != collop_map.end()) - { - if(it->first == collop_key) - collop_value += it->second; - ++it; - } - return collop_value; - } - else - { - it = collop_map.find(collop_key); - if(it == collop_map.end()) - return collop_value; - else - return collop_value += it->second; - } -} - -CollOp_Value Summary_Container::get_CollOpType(uint32_t trace, uint32_t proc, uint32_t type) -{ - if(type == 0) - { - cerr << "Sorry, type has to be greater then 0, because type has no wildcard option." - << endl; - } - - CollOp_Value collop_value; - CollOpMap::iterator it; - - if(trace == 0 || proc == 0) - { - it = collop_map.begin(); - while(it != collop_map.end()) - { - if(((it->first.trace == trace) || (trace == 0)) && - ((it->first.proc == proc) || (proc == 0)) && - (type == get_CollOpType_Def(it->first.trace,it->first.collop))) - { - collop_value += it->second; - } - ++it; - } - return collop_value; - } - else - { - vector<uint32_t> collop_id; - get_CollOp_Def_Key(trace, collop_id); - vector<uint32_t>::iterator it2 = collop_id.begin(); - while(it2 != collop_id.end()) - { - if(type == get_CollOpType_Def(trace, *it2)) - { - CollOp_Key collop_key(trace,proc,*it2); - it = collop_map.find(collop_key); - if(it != collop_map.end()) - { - collop_value += it->second; - } - } - ++it2; - } - return collop_value; - } -} - -uint64_t Summary_Container:: get_ProgTime(uint32_t trace) -{ - ProgTimeMap::iterator it = progtime_map.find(trace); - if(it == progtime_map.end()) - return 0; - else - return it->second; -} - -uint64_t Summary_Container::get_ProcTime(uint32_t trace, uint32_t proc) -{ - Process_Def_Key proc_def_key(trace, proc); - uint64_t time = 0; - ProcTimeMap::iterator it; - - if((trace == 0) || (proc == 0)) - { - it = proctime_map.begin(); - while(it != proctime_map.end()) - { - if(it->first == proc_def_key) - time += it->second; - ++it; - } - return time; - } - else - { - it = proctime_map.find(proc_def_key); - if(it == proctime_map.end()) - return time; - else - return time += it->second; - } -} -uint64_t Summary_Container::get_ticks(uint32_t trace) -{ - TicksDefMap::iterator it = ticks_def_map.find(trace); - if(it == ticks_def_map.end()) - return 0; - else - return it->second; -} - -uint32_t Summary_Container::get_bin_1(uint64_t length) -{ - uint32_t N = 24; - uint32_t i; - uint64_t border = 1; - for(i = 1; i < N; i++) - { - if(length <= border) - return i; - border <<= 1; - } - return N; // length is bigger than the last border -} - -uint32_t Summary_Container::get_bin_2(double speed) -{ - uint64_t sp = (uint64_t) speed; - uint32_t N = 16; - uint32_t i; - uint64_t border = 4; - for(i = 1; i < N; i++) - { - if(sp <= border) - return i; - border <<= 2; - } - return N; // speed is bigger than the last border -} - - -int Summary_Container::get_color_gray(double min, double max, double value, - float& red, float& green, float& blue) -{ - if((value == min) || (min == max)) - { - red = 0.9f; green = 0.9f; blue = 0.9f; - return 0; - } - if(value == max) - { - red = 1.0; green = 0.0; blue = 0.0; - return 0; - } - - double factor = (max - min) / 5.0; - uint32_t part = (uint32_t) (((value - min) * 5.0) / (max - min)); - double min_temp = min + (factor * part); - double max_temp = min + (factor * (part + 1.0)); - double part_temp; - - if(value == min_temp) - part_temp = 0.0; - else if(value == max_temp) - part_temp = 1.0; - else - part_temp = (value - min_temp) / (max_temp - min_temp); - if (part == 0) - part_temp = part_temp / 2; - switch(part) - { - case 0 : - red = (float) (0.9 - part_temp); - green = (float) (0.9 - part_temp); - blue = (float) (0.9 - part_temp); - break; - case 1 : - red = (float) (0.0); - green = (float) (part_temp); - blue = (float) (1.0); - break; - case 2 : - red = (float) (0.0); - green = (float) (1.0); - blue = (float) (1.0 - part_temp); - break; - case 3 : - red = (float) (part_temp); - green = (float) (1.0); - blue = (float) (0.0); - break; - case 4 : - red = (float) (1.0); - green = (float) (1.0 - part_temp); - blue = (float) (0.0); - break; - default : cerr << "Error in get_color(). Wrong part calculated." << endl; return 1; - } - - return 0; -} - -int Summary_Container::get_color(double min, double max, double value, - float& red, float& green, float& blue) -{ - if((value == min) || (min == max)) - { - red = 0.0; green = 0.0; blue = 1.0; - return 0; - } - if(value == max) - { - red = 1.0; green = 0.0; blue = 0.0; - return 0; - } - - double factor = (max - min) / 4.0; - uint32_t part = (uint32_t) (((value - min) * 4.0) / (max - min)); - double min_temp = min + (factor * part); - double max_temp = min + (factor * (part + 1.0)); - double part_temp; - - if(value == min_temp) - part_temp = 0.0; - else if(value == max_temp) - part_temp = 1.0; - else - part_temp = (value - min_temp) / (max_temp - min_temp); - - switch(part) - { - case 0 : red = 0.0f; green = (float) part_temp; blue = 1.0f; break; - case 1 : red = 0.0f; green = 1.0f; blue = (float) (1.0 - part_temp); break; - case 2: red = (float) part_temp; green = 1.0f; blue = 0.0f; break; - case 3 : red = 1.0f; green = (float) (1.0 - part_temp); blue = 0.0f; break; - default : cerr << "Error in get_color(). Wrong part calculated." << endl; return 1; - } - - return 0; -} - -int Summary_Container::get_gray(double min, double max, double value, - float& red, float& green, float& blue) -{ - if((value == min) || (min == max)) - { - red = 1.0; green = 1.0; blue = 1.0; - return 0; - } - if(value == max) - { - red = 0.0; green = 0.0; blue = 0.0; - return 0; - } - - double part = (value - min) / (max - min); - - red = (float) (1.0 - part); - green = (float) (1.0 - part); - blue = (float) (1.0 - part); - - return 0; -} - -int Summary_Container::get_color_gray(uint64_t min, uint64_t max, uint64_t value, - float& red, float& green, float& blue) -{ - return get_color((double) min, (double) max, (double) value, red, green, blue); -} - -int Summary_Container::get_color(uint64_t min, uint64_t max, uint64_t value, - float& red, float& green, float& blue) -{ - return get_color((double) min, (double) max, (double) value, red, green, blue); -} - -int Summary_Container::get_gray(uint64_t min, uint64_t max, uint64_t value, - float& red, float& green, float& blue) -{ - return get_color((double) min, (double) max, (double) value, red, green, blue); -} - -int Summary_Container::csv_Function(fstream& out, uint32_t trace) -{ - if(trace == 0) - { - cerr << "Error in csv_Function. Second parameter was 0" << endl; - return 1; - } - TicksDefMap::iterator it_t = ticks_def_map.find(trace); - FunctionMap::iterator it = function_map.begin(); - CounterDefMap::iterator it_c = counter_def_map.begin(); - CounterMap::iterator it_c2 = counter_map.begin(); - Counter_Value c_value; - - out << ";;;;;"; - while(it_c != counter_def_map.end()) - { - if(((Counter_Def_Key) it_c->first).get_trace() == trace) - { - out << ";" << it_c->second.get_name(); - out << ";" << it_c->second.get_name(); - } - ++it_c; - } - out << endl; - out << "Function;FunctionGroup;Process;Invocation;Exclusive Time;Inclusive Time"; - - it_c = counter_def_map.begin(); - while(it_c != counter_def_map.end()) - { - if(((Counter_Def_Key) it_c->first).get_trace() == trace) - { - out << ";Exclusive Value;Inclusive Value"; - } - ++it_c; - } - out << endl; - while(it != function_map.end()) - { - if(it->first.trace == trace) - { - out << get_Function_Def(trace, it->first.func).get_name() - << ";" << get_FG_Def(trace, get_Function_Def(trace, it->first.func).get_funcgroup_id()) - << ";" << get_Process_Def(trace, it->first.proc) - << ";" << it->second.invoc - << ";" << (double) it->second.excl_time / (double) it_t->second - << ";" << (double) it->second.incl_time / (double) it_t->second; - it_c = counter_def_map.begin(); - while(it_c != counter_def_map.end()) - { - Counter_Key c_key(trace,it->first.func,it->first.proc,((Counter_Def_Key) it_c->first).get_ident()); - it_c2 = counter_map.find(c_key); - if(it_c2 == counter_map.end()) - out << ";no value"; - else if(it_c2->second.valid == INVALID) - { - out << ";invalid value"; - } - else - { - out << ";" << it_c2->second.excl_value - << ";" << it_c2->second.incl_value; - } - ++it_c; - } - out << endl; - } - ++it; - } - out << endl; - - return 0; -} - -int Summary_Container::csv_P2P(fstream& out, uint32_t trace) -{ - if(trace == 0) - { - cerr << "Error in csv_P2P. Second parameter was 0" << endl; - return 1; - } - uint64_t temp = 1; - double duration; - TicksDefMap::iterator it_t = ticks_def_map.find(trace); - - map<uint32_t, map<uint32_t, map<uint32_t, map<uint32_t, P2P_Value> > > >::iterator send_iter; - map<uint32_t, map<uint32_t, map<uint32_t, P2P_Value> > >::iterator recv_iter; - map<uint32_t, map<uint32_t, P2P_Value> >::iterator bin1_iter; - map<uint32_t, P2P_Value>::iterator bin2_iter; - - out << "Process to;Process;Msg Length Field;Rate Field;Invocation;Msg Length;Duration;Rate" << endl; - - for( send_iter = p2p_map[trace].begin(); send_iter != p2p_map[trace].end(); ++send_iter ) { - for( recv_iter = send_iter->second.begin(); recv_iter != send_iter->second.end(); ++recv_iter ) { - for( bin1_iter = recv_iter->second.begin(); bin1_iter != recv_iter->second.end(); ++bin1_iter ) { - for( bin2_iter = bin1_iter->second.begin(); bin2_iter != bin1_iter->second.end(); ++bin2_iter ) { - - duration = (double) bin2_iter->second.time / (double) it_t->second; - out << get_Process_Def(trace,send_iter->first) - << ";" << get_Process_Def(trace,recv_iter->first) - << ";<" << (temp << bin1_iter->first) - << ";<" << (temp << (bin2_iter->first * 2)) - << ";" << bin2_iter->second.invoc - << ";" << bin2_iter->second.length - << ";" << duration - << ";" << (double) bin2_iter->second.length / duration << endl; - - } - } - } - } - - return 0; -} - -int Summary_Container::csv_CollOp(fstream& out, uint32_t trace) -{ - if(trace == 0) - { - cerr << "Error in csv_P2P. Second parameter was 0" << endl; - return 1; - } - double duration; - TicksDefMap::iterator it_t = ticks_def_map.find(trace); - CollOpMap::iterator it = collop_map.begin(); - out << "Process;Name;Type;Send Invocation;Send Msg Length;Receive Invocation" - << ";Receive Msg Length;Duration;Rate" << endl; - while(it != collop_map.end()) - { - if(it->first.trace == trace) - { - duration = (double) it->second.time / (double) it_t->second; - out << get_Process_Def(trace,it->first.proc) - << ";" << get_CollOp_Def(trace,it->first.collop).get_name(); - switch(get_CollOp_Def(trace,it->first.collop).get_type()) - { - case OTF_COLLECTIVE_TYPE_BARRIER : out << ";Barrier";break; - case OTF_COLLECTIVE_TYPE_ONE2ALL : out << ";ONE2ALL";break; - case OTF_COLLECTIVE_TYPE_ALL2ONE : out << ";ALL2ONE";break; - case OTF_COLLECTIVE_TYPE_ALL2ALL : out << ";ALL2ALL";break; - default : out << ";Unknown Type"; - } - out << ";" << it->second.invoc_send - << ";" << it->second.invoc_receive - << ";" << it->second.length_send - << ";" << it->second.length_receive - << ";" << duration - << ";" << (double) (it->second.length_send + it->second.length_receive) / duration - << endl; - } - ++it; - } - - return 0; -} - -int Summary_Container::csv_Data(fstream& out, uint32_t trace) -{ - if(trace == 0) - { - cerr << "Error in csv_P2P. Second parameter was 0" << endl; - return 1; - } - TicksDefMap::iterator it_t = ticks_def_map.find(trace); - ProgTimeMap::iterator it_pgt = progtime_map.find(trace); - ProcDefMap::iterator it_pd = proc_def_map.begin(); - FGDefMap::iterator it_fgd = fg_def_map.begin(); - FuncDefMap::iterator it_fd = func_def_map.begin(); - FunctionMap::iterator it_f = function_map.begin(); - CounterDefMap::iterator it_cd = counter_def_map.begin(); - CounterMap::iterator it_c = counter_map.begin(); - CollOpDefMap::iterator it_cod = collop_def_map.begin(); - CollOpMap::iterator it_co = collop_map.begin(); - Bin1Map::iterator it_b1 = bin_1_map.begin(); - Bin2Map::iterator it_b2 = bin_2_map.begin(); - ProcTimeMap::iterator it_pt = proctime_map.begin(); - - Counter_Value c_value; - - map<uint32_t, map<uint32_t, map<uint32_t, map<uint32_t, P2P_Value> > > >::iterator send_iter; - map<uint32_t, map<uint32_t, map<uint32_t, P2P_Value> > >::iterator recv_iter; - map<uint32_t, map<uint32_t, P2P_Value> >::iterator bin1_iter; - map<uint32_t, P2P_Value>::iterator bin2_iter; - - - if(it_t != ticks_def_map.end()) - out << "ticks;" << it_t->second << endl; - else - out << "ticks;1" << endl; - - if(it_pgt != progtime_map.end()) - out << "progtime;" << it_pgt->second << endl; - else - out << "progtime;0" << endl; - - while(it_pt != proctime_map.end()) - { - if(((Process_Def_Key) it_pt->first).get_trace() == trace) - { - out << "proctime" - << ";" << ((Process_Def_Key) it_pt->first).get_ident() - << ";" << it_pt->second - << endl; - } - ++it_pt; - } - while(it_pd != proc_def_map.end()) - { - if(((Process_Def_Key) it_pd->first).get_trace() == trace) - { - out << "proc" - << ";" << ((Process_Def_Key) it_pd->first).get_ident() - << ";" << it_pd->second - << endl; - } - ++it_pd; - } - while(it_fgd != fg_def_map.end()) - { - if(((FG_Def_Key) it_fgd->first).get_trace() == trace) - { - out << "fg" - << ";" << ((FG_Def_Key) it_fgd->first).get_ident() - << ";" << it_fgd->second - << endl; - } - ++it_fgd; - } - while(it_fd != func_def_map.end()) - { - if(((Function_Def_Key) it_fd->first).get_trace() == trace) - { - out << "funcdef" - << ";" << ((Function_Def_Key) it_fd->first).get_ident() - << ";" << it_fd->second.get_name() - << ";" << it_fd->second.get_funcgroup_id() - << endl; - } - ++it_fd; - } - while(it_f != function_map.end()) - { - if(it_f->first.trace == trace) - { - out << "func" - << ";" << it_f->first.func - << ";" << it_f->first.proc - << ";" << it_f->second.invoc - << ";" << it_f->second.excl_time - << ";" << it_f->second.incl_time - << endl; - } - ++it_f; - } - while(it_cd != counter_def_map.end()) - { - if(((Counter_Def_Key) it_cd->first).get_trace() == trace) - { - out << "counterdef" - << ";" << ((Counter_Def_Key) it_cd->first).get_ident() - << ";" << it_cd->second.get_name() - << ";" << it_cd->second.get_unit() - << endl; - } - ++it_cd; - } - while(it_c != counter_map.end()) - { - if(it_c->first.trace == trace) - { - out << "counter" - << ";" << it_c->first.func - << ";" << it_c->first.proc - << ";" << it_c->first.counter; - if(it_c->second.valid == VALID) - { - out << ";" << it_c->second.excl_value - << ";" << it_c->second.incl_value - << ";VALID"; - } - else - { - out << ";0;0;INVALID"; - } - out << endl; - } - ++it_c; - } - - for( send_iter = p2p_map[trace].begin(); send_iter != p2p_map[trace].end(); ++send_iter ) { - for( recv_iter = send_iter->second.begin(); recv_iter != send_iter->second.end(); ++recv_iter ) { - for( bin1_iter = recv_iter->second.begin(); bin1_iter != recv_iter->second.end(); ++bin1_iter ) { - for( bin2_iter = bin1_iter->second.begin(); bin2_iter != bin1_iter->second.end(); ++bin2_iter ) { - - out << "p2p" - << ";" << send_iter->first - << ";" << recv_iter->first - << ";" << bin1_iter->first - << ";" << bin2_iter->first - << ";" << bin2_iter->second.invoc - << ";" << bin2_iter->second.length - << ";" << bin2_iter->second.time - << endl; - - } - } - } - } - - while(it_cod != collop_def_map.end()) - { - if(((CollOp_Def_Key) it_cod->first).get_trace() == trace) - { - out << "collopdef" - << ";" << ((CollOp_Def_Key) it_cod->first).get_ident() - << ";" << it_cod->second.get_name(); - switch(it_cod->second.get_type()) - { - case OTF_COLLECTIVE_TYPE_BARRIER : out << ";Barrier";break; - case OTF_COLLECTIVE_TYPE_ONE2ALL : out << ";ONE2ALL";break; - case OTF_COLLECTIVE_TYPE_ALL2ONE : out << ";ALL2ONE";break; - case OTF_COLLECTIVE_TYPE_ALL2ALL : out << ";ALL2ALL";break; - default : out << ";UNKNOWN"; - } - out << endl; - } - ++it_cod; - } - while(it_co != collop_map.end()) - { - if(it_co->first.trace == trace) - { - out << "collop" - << ";" << it_co->first.proc - << ";" << it_co->first.collop - << ";" << it_co->second.invoc_send - << ";" << it_co->second.invoc_receive - << ";" << it_co->second.length_send - << ";" << it_co->second.length_receive - << ";" << it_co->second.time - << endl; - } - ++it_co; - } - while(it_b1 != bin_1_map.end()) - { - if(((Bin_1_Key) it_b1->first).get_trace() == trace) - { - out << "bin1" - << ";" << ((Bin_1_Key) it_b1->first).get_ident() - << ";" << it_b1->second.get_min_value() - << ";" << it_b1->second.get_max_value() - << endl; - } - ++it_b1; - } - while(it_b2 != bin_2_map.end()) - { - if(((Bin_2_Key) it_b2->first).get_trace() == trace) - { - out << "bin2" - << ";" << ((Bin_2_Key) it_b2->first).get_ident() - << ";" << it_b2->second.get_min_value() - << ";" << it_b2->second.get_max_value() - << endl; - } - ++it_b2; - } - return 0; -} - -bool Summary_Container::find_FG(FG_Def_Key fg_def_key) -{ - FGDefMap::iterator it = fg_def_map.find(fg_def_key); - if(it == fg_def_map.end()) - return false; - else - return true; -} - -bool Summary_Container::find_Function(Function_Def_Key f_def_key) -{ - FuncDefMap::iterator it = func_def_map.find(f_def_key); - if(it == func_def_map.end()) - return false; - else - return true; -} - -bool Summary_Container::find_Counter(Counter_Def_Key c_def_key) -{ - CounterDefMap::iterator it = counter_def_map.find(c_def_key); - if(it == counter_def_map.end()) - return false; - else - return true; -} - -bool Summary_Container::find_CollOp(CollOp_Def_Key coll_def_key) -{ - CollOpDefMap::iterator it = collop_def_map.find(coll_def_key); - if(it == collop_def_map.end()) - return false; - else - return true; -} - -int Summary_Container::mergeContainer(Summary_Container& container) { - FunctionMap fmap = container.function_map; - FunctionMap::iterator fit; - - for(fit = fmap.begin(); fit!=fmap.end(); fit++) { - this->function_map[fit->first] += fit->second; - } - - CounterMap cmap = container.counter_map; - CounterMap::iterator cit; - for(cit = cmap.begin(); cit!=cmap.end(); cit++) { - this->counter_map[cit->first] += cit->second; - } - - map<uint32_t, map<uint32_t, map<uint32_t, map<uint32_t, map<uint32_t, P2P_Value> > > > >::iterator trace_iter; - map<uint32_t, map<uint32_t, map<uint32_t, map<uint32_t, P2P_Value> > > >::iterator send_iter; - map<uint32_t, map<uint32_t, map<uint32_t, P2P_Value> > >::iterator recv_iter; - map<uint32_t, map<uint32_t, P2P_Value> >::iterator bin1_iter; - map<uint32_t, P2P_Value>::iterator bin2_iter; - - for( trace_iter = container.p2p_map.begin(); trace_iter != container.p2p_map.end(); ++trace_iter ) { - for( send_iter = trace_iter->second.begin(); send_iter != trace_iter->second.end(); ++send_iter ) { - for( recv_iter = send_iter->second.begin(); recv_iter != send_iter->second.end(); ++recv_iter ) { - for( bin1_iter = recv_iter->second.begin(); bin1_iter != recv_iter->second.end(); ++bin1_iter ) { - for( bin2_iter = bin1_iter->second.begin(); bin2_iter != bin1_iter->second.end(); ++bin2_iter ) { - - this->p2p_map[trace_iter->first][send_iter->first][recv_iter->first][bin1_iter->first][bin2_iter->first] += bin2_iter->second; - - } - } - } - } - } - - CollOpMap colmap = container.collop_map; - CollOpMap::iterator colit; - for(colit = colmap.begin(); colit!=colmap.end(); colit++) { - this->collop_map[colit->first] = colit->second; - } - - ProcTimeMap procmap = container.proctime_map; - ProcTimeMap::iterator procit; - for(procit = procmap.begin(); procit!=procmap.end(); procit++) { - this->proctime_map[procit->first] += procit->second; - } - - return 0; -} - diff --git a/externals/otf/tools/otfprofile/DataStructure.h b/externals/otf/tools/otfprofile/DataStructure.h deleted file mode 100644 index 17fd3d0d12aaca39b35399233a9acd089d01f801..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/DataStructure.h +++ /dev/null @@ -1,875 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#ifndef DATASTRUCTURE_H -#define DATASTRUCTURE_H - -#include <fstream> -#include <map> -#include <vector> -#include <iostream> - -#include "OTF_inttypes.h" -#include "otf.h" - -#include "Definitions.h" - -/* show wether the result is valid or invalid */ -#define INVALID false -#define VALID true - -using namespace std; - -/*************************************** FG *****************************************/ -/********** Def_Key **********/ - -class FG_Def_Key -{ - friend bool operator<(const FG_Def_Key& c1, const FG_Def_Key& c2); - friend bool operator==(const FG_Def_Key& c1, const FG_Def_Key& c2); - - public: - FG_Def_Key(uint32_t tr, uint32_t fg_id); - uint32_t get_trace(); - uint32_t get_ident(); - private: - uint32_t trace; - uint32_t ident; -}; - -inline FG_Def_Key::FG_Def_Key(uint32_t tr, uint32_t fg_id) - :trace(tr), ident(fg_id) -{ -} - -inline uint32_t FG_Def_Key::get_trace() -{ - return trace; -} - -inline uint32_t FG_Def_Key::get_ident() -{ - return ident; -} - -/*************************************** Process *****************************************/ -/********** Def_Key **********/ - -class Process_Def_Key -{ - friend bool operator<(const Process_Def_Key& c1, const Process_Def_Key& c2); - friend bool operator==(const Process_Def_Key& c1, const Process_Def_Key& c2); - - public: - Process_Def_Key(uint32_t tr, uint32_t p_id); - uint32_t get_trace(); - uint32_t get_ident(); - private: - uint32_t trace; - uint32_t ident; -}; - -inline Process_Def_Key::Process_Def_Key(uint32_t tr, uint32_t p_id) - :trace(tr), ident(p_id) -{ -} - -inline uint32_t Process_Def_Key::get_trace() -{ - return trace; -} - -inline uint32_t Process_Def_Key::get_ident() -{ - return ident; -} - -/*************************************** Function *****************************************/ -/********** Def_Key **********/ - -class Function_Def_Key -{ - friend bool operator<(const Function_Def_Key& c1, const Function_Def_Key& c2); - friend bool operator==(const Function_Def_Key& c1, const Function_Def_Key& c2); - public: - Function_Def_Key(uint32_t tr, uint32_t f_id); - uint32_t get_trace(); - uint32_t get_ident(); - private: - uint32_t trace; - uint32_t ident; -}; - -inline Function_Def_Key::Function_Def_Key(uint32_t tr, uint32_t f_id) - :trace(tr), ident(f_id) -{ -} - -inline uint32_t Function_Def_Key::get_trace() -{ - return trace; -} - -inline uint32_t Function_Def_Key::get_ident() -{ - return ident; -} - -/********** Def **********/ - -class Function_Def -{ - public: - Function_Def(const char* n, uint32_t fg); - uint32_t get_funcgroup_id(); - const char* get_name(); - private: - const char* name; - uint32_t funcgroup_id; -}; - -inline Function_Def::Function_Def(const char* n, uint32_t fg) - :name(n), funcgroup_id(fg) -{ -} - -inline const char* Function_Def::get_name() -{ - return name; -} - -inline uint32_t Function_Def::get_funcgroup_id() -{ - return funcgroup_id; -} - -/********** Key **********/ - -class Function_Key -{ - friend bool operator<(const Function_Key& f_key1, const Function_Key& f_keyy2); - friend bool operator==(const Function_Key& f_key1,const Function_Key& f_key2); - public: - Function_Key(uint32_t tr, uint32_t f, uint32_t p); - Function_Key(const Function_Key& f_key); - //private: (wenn Tests erfolgreich wieder freigeben) - uint32_t trace; - uint32_t func; - uint32_t proc; -}; - -inline Function_Key::Function_Key(uint32_t tr, uint32_t f, uint32_t p) - :trace(tr), func(f), proc(p) -{ -} -inline Function_Key::Function_Key(const Function_Key& f_key) - :trace(f_key.trace), func(f_key.func), proc(f_key.proc) -{ -} - -/********** Value **********/ - -class Function_Value -{ - friend int print_Funtion(); - public: - Function_Value(); - Function_Value(uint64_t inv, uint64_t excl, uint64_t incl); - Function_Value(const Function_Value& f_value); - Function_Value& operator+=(const Function_Value& func_value_add); - Function_Value& operator=(const Function_Value& f_value); - uint64_t get_invoc(); - uint64_t get_excl_time(); - uint64_t get_incl_time(); - //private:(wenn Tests erfolgreich wieder freigeben) - uint64_t invoc; - uint64_t excl_time; - uint64_t incl_time; -}; - -inline Function_Value::Function_Value() -{ - invoc = 0; - excl_time = 0; - incl_time = 0; -} - -inline Function_Value::Function_Value(uint64_t inv, uint64_t excl, uint64_t incl) - :invoc(inv), excl_time(excl), incl_time(incl) -{ -} - -inline Function_Value::Function_Value(const Function_Value& f_value) - :invoc(f_value.invoc), excl_time(f_value.excl_time), incl_time(f_value.incl_time) -{ -} - -inline uint64_t Function_Value::get_invoc() -{ - return invoc; -} - -inline uint64_t Function_Value::get_excl_time() -{ - return excl_time; -} - -inline uint64_t Function_Value::get_incl_time() -{ - return incl_time; -} - -/*************************************** Counter ******************************************/ -/********** Def_Key **********/ - -class Counter_Def_Key -{ - friend bool operator<(const Counter_Def_Key& c1, const Counter_Def_Key& c2); - friend bool operator==(const Counter_Def_Key& c1, const Counter_Def_Key& c2); - public: - Counter_Def_Key(uint32_t tr, uint32_t c_id); - uint32_t get_trace(); - uint32_t get_ident(); - private: - uint32_t trace; - uint32_t ident; -}; - -inline Counter_Def_Key::Counter_Def_Key(uint32_t tr, uint32_t c_id) - :trace(tr), ident(c_id) -{ -} - -inline uint32_t Counter_Def_Key::get_trace() -{ - return trace; -} - -inline uint32_t Counter_Def_Key::get_ident() -{ - return ident; -} - -/********** Def **********/ - -class Counter_Def -{ - public: - Counter_Def(const char* n, const char* u); - const char* get_name(); - const char* get_unit(); - private: - const char* name; - const char* unit; -}; - -inline Counter_Def::Counter_Def(const char* n, const char* u) - :name(n), unit(u) -{ -} - -inline const char* Counter_Def::get_name() -{ - return name; -} - -inline const char* Counter_Def::get_unit() -{ - return unit; -} - -/********** Key **********/ - -class Counter_Key -{ - friend bool operator<(const Counter_Key& c_key1, const Counter_Key& c_key2); - friend bool operator==(const Counter_Key& c_key1,const Counter_Key& c_key2); - - public: - Counter_Key(uint32_t tr, uint32_t f, uint32_t p, uint32_t c); - Counter_Key(const Counter_Key& c_key); - //private:(wenn Tests erfolgreich wieder freigeben) - uint32_t trace; - uint32_t func; - uint32_t proc; - uint32_t counter; -}; - -inline Counter_Key::Counter_Key(uint32_t tr, uint32_t f, uint32_t p, uint32_t c) - :trace(tr), func(f), proc(p), counter(c) -{ -} - -inline Counter_Key::Counter_Key(const Counter_Key& c_key) - :trace(c_key.trace), func(c_key.func), proc(c_key.proc), counter(c_key.counter) -{ -} - -/********** Value **********/ - -class Counter_Value -{ - public: - Counter_Value(); - Counter_Value(bool val, uint64_t excl, uint64_t incl); - Counter_Value(const Counter_Value& c_value); - Counter_Value& operator+=(const Counter_Value& c_value); - Counter_Value& operator=(const Counter_Value& c_value); - bool get_valid(); - uint64_t get_excl_value(); - uint64_t get_incl_value(); - //private:(wenn Tests erfolgreich wieder freigeben) - bool valid; - uint64_t excl_value; - uint64_t incl_value; -}; - -inline Counter_Value::Counter_Value() -{ - valid = VALID; - excl_value = 0; - incl_value = 0; -} - -inline Counter_Value::Counter_Value(bool val, uint64_t excl, uint64_t incl) - :valid(val), excl_value(excl), incl_value(incl) -{ -} - -inline Counter_Value::Counter_Value(const Counter_Value& c_value) - :valid(c_value.valid), excl_value(c_value.excl_value), incl_value(c_value.incl_value) -{ -} - -inline bool Counter_Value::get_valid() -{ - return valid; -} - -inline uint64_t Counter_Value::get_excl_value() -{ - return excl_value; -} - -inline uint64_t Counter_Value::get_incl_value() -{ - return incl_value; -} - -/****************************************** P2P ********************************************/ -/********** Key **********/ - -class P2P_Key -{ - friend bool operator<(const P2P_Key& p2p_key1, const P2P_Key& p2p_key2); - friend bool operator==(const P2P_Key& p2p_key1,const P2P_Key& p2p_key2); - - public: - P2P_Key(uint32_t tr, uint32_t send, uint32_t rec, uint32_t b_1, uint32_t b_2); - P2P_Key(const P2P_Key& p2p_key); - //private:(wenn Tests erfolgreich wieder freigeben) - uint32_t trace; - uint32_t sender; - uint32_t receiver; - uint32_t bin_1; - uint32_t bin_2; -}; - -inline P2P_Key::P2P_Key(uint32_t tr, uint32_t send, uint32_t rec, uint32_t b_1, uint32_t b_2) - :trace(tr), sender(send), receiver(rec), bin_1(b_1), bin_2(b_2) -{ -} - -inline P2P_Key::P2P_Key(const P2P_Key& p2p_key) - :trace(p2p_key.trace), sender(p2p_key.sender), receiver(p2p_key.receiver), - bin_1(p2p_key.bin_1), bin_2(p2p_key.bin_2) -{ -} - -/********** Value **********/ - -class P2P_Value -{ - public: - P2P_Value(); - P2P_Value(uint64_t inv, uint64_t l, uint64_t t); - P2P_Value(const P2P_Value& p2p_value); - P2P_Value& operator+=(const P2P_Value& p2p_value); - P2P_Value& operator=(const P2P_Value& p2p_value); - uint64_t get_invoc(); - uint64_t get_length(); - uint64_t get_time(); - //private: (wenn Tests erfolgreich wieder freigeben) - uint64_t invoc; - uint64_t length; - uint64_t time; -}; - -inline P2P_Value::P2P_Value() -{ - invoc = 0; - length = 0; - time = 0; -} - -inline P2P_Value::P2P_Value(uint64_t inv, uint64_t l, uint64_t t) - :invoc(inv), length(l), time(t) -{ -} - -inline P2P_Value::P2P_Value(const P2P_Value& p2p_value) - :invoc(p2p_value.invoc), length(p2p_value.length), time(p2p_value.time) -{ -} - -inline uint64_t P2P_Value::get_invoc() -{ - return invoc; -} - -inline uint64_t P2P_Value::get_length() -{ - return length; -} - -inline uint64_t P2P_Value::get_time() -{ - return time; -} - -/**************************************** CollOp ******************************************/ -/********** Def_Key **********/ - -class CollOp_Def_Key -{ - friend bool operator<(const CollOp_Def_Key& c1, const CollOp_Def_Key& c2); - friend bool operator==(const CollOp_Def_Key& c1, const CollOp_Def_Key& c2); - public: - CollOp_Def_Key(uint32_t tr, uint32_t coll_id); - uint32_t get_trace(); - uint32_t get_ident(); - private: - uint32_t trace; - uint32_t ident; -}; - -inline CollOp_Def_Key::CollOp_Def_Key(uint32_t tr, uint32_t coll_id) - :trace(tr), ident(coll_id) -{ -} - -inline uint32_t CollOp_Def_Key::get_trace() -{ - return trace; -} - -inline uint32_t CollOp_Def_Key::get_ident() -{ - return ident; -} - -/********** Def **********/ - -class CollOp_Def -{ - public: - CollOp_Def(const char* n, uint32_t t); - const char* get_name(); - uint32_t get_type(); - private: - const char* name; - uint32_t type; -}; - -inline CollOp_Def::CollOp_Def(const char* n, uint32_t t) - :name(n), type(t) -{ -} - -inline const char* CollOp_Def::get_name() -{ - return name; -} - -inline uint32_t CollOp_Def::get_type() -{ - return type; -} - -/********** Key **********/ - -class CollOp_Key -{ - friend bool operator<(const CollOp_Key& coll_key1, const CollOp_Key& coll_key2); - friend bool operator==(const CollOp_Key& co_key1,const CollOp_Key& co_key2); - - public: - CollOp_Key(uint32_t tr, uint32_t p, uint32_t co); - CollOp_Key(const CollOp_Key& coll_key); - //private:(wenn Tests erfolgreich wieder freigeben) - uint32_t trace; - uint32_t proc; - uint32_t collop; -}; - -inline CollOp_Key::CollOp_Key(uint32_t tr, uint32_t p, uint32_t co) - :trace(tr), proc(p), collop(co) -{ -} - -inline CollOp_Key::CollOp_Key(const CollOp_Key& coll_key) - :trace(coll_key.trace), proc(coll_key.proc), collop(coll_key.collop) -{ -} - -/********** Value **********/ - -class CollOp_Value -{ - public: - CollOp_Value(); - CollOp_Value(uint64_t inv_s, uint64_t inv_r, uint64_t l_s, uint64_t l_r, uint64_t t); - CollOp_Value(const CollOp_Value& coll_value); - CollOp_Value& operator+=(const CollOp_Value& coll_value); - CollOp_Value& operator=(const CollOp_Value& co_value); - uint64_t get_invoc_send(); - uint64_t get_invoc_receive(); - uint64_t get_length_send(); - uint64_t get_length_receive(); - uint64_t get_time(); - //private:(wenn Tests erfolgreich wieder freigeben) - uint64_t invoc_send; - uint64_t invoc_receive; - uint64_t length_send; - uint64_t length_receive; - uint64_t time; -}; - -inline CollOp_Value::CollOp_Value() -{ - invoc_send = 0; - invoc_receive = 0; - length_send = 0; - length_receive = 0; - time = 0; -} - -inline CollOp_Value::CollOp_Value(uint64_t inv_s, uint64_t inv_r, uint64_t l_s, uint64_t l_r, - uint64_t t) - :invoc_send(inv_s), invoc_receive(inv_r), length_send(l_s), length_receive(l_r), time(t) -{ -} - -inline CollOp_Value::CollOp_Value(const CollOp_Value& coll_value) - :invoc_send(coll_value.invoc_send), invoc_receive(coll_value.invoc_receive), - length_send(coll_value.length_send), length_receive(coll_value.length_receive), - time(coll_value.time) -{ -} - -inline uint64_t CollOp_Value::get_invoc_send() -{ - return invoc_send; -} - -inline uint64_t CollOp_Value::get_invoc_receive() -{ - return invoc_receive; -} - -inline uint64_t CollOp_Value::get_length_send() -{ - return length_send; -} - -inline uint64_t CollOp_Value::get_length_receive() -{ - return length_receive; -} - -inline uint64_t CollOp_Value::get_time() -{ - return time; -} - -/**************************************** Bin_1 ******************************************/ -/********** Key **********/ - -class Bin_1_Key -{ - friend bool operator<(const Bin_1_Key& c1, const Bin_1_Key& c2); - friend bool operator==(const Bin_1_Key& c1, const Bin_1_Key& c2); - - public: - Bin_1_Key(uint32_t tr, uint32_t b); - uint32_t get_trace(); - uint32_t get_ident(); - private: - uint32_t trace; - uint32_t ident; -}; - -inline Bin_1_Key::Bin_1_Key(uint32_t tr, uint32_t b) - :trace(tr), ident(b) -{ -} - -inline uint32_t Bin_1_Key::get_trace() -{ - return trace; -} - -inline uint32_t Bin_1_Key::get_ident() -{ - return ident; -} - -/********** Value **********/ -class Bin_1_Value -{ - public: - Bin_1_Value(uint64_t min, uint64_t max); - uint64_t get_min_value(); - uint64_t get_max_value(); - private: - uint64_t min_value; - uint64_t max_value; -}; - -inline Bin_1_Value::Bin_1_Value(uint64_t min, uint64_t max) - :min_value(min), max_value(max) -{ -} - -inline uint64_t Bin_1_Value::get_min_value() -{ - return min_value; -} - -inline uint64_t Bin_1_Value::get_max_value() -{ - return max_value; -} - -/**************************************** Bin_2 ******************************************/ -/********** Key **********/ - -class Bin_2_Key -{ - friend bool operator<(const Bin_2_Key& c1, const Bin_2_Key& c2); - friend bool operator==(const Bin_2_Key& c1, const Bin_2_Key& c2); - - public: - Bin_2_Key(uint32_t tr, uint32_t b); - uint32_t get_trace(); - uint32_t get_ident(); - private: - uint32_t trace; - uint32_t ident; -}; - -inline Bin_2_Key::Bin_2_Key(uint32_t tr, uint32_t b) - :trace(tr), ident(b) -{ -} - -inline uint32_t Bin_2_Key::get_trace() -{ - return trace; -} - -inline uint32_t Bin_2_Key::get_ident() -{ - return ident; -} - -/********** Value **********/ -class Bin_2_Value -{ - public: - Bin_2_Value(uint64_t min, uint64_t max); - uint64_t get_min_value(); - uint64_t get_max_value(); - //private: - uint64_t min_value; - uint64_t max_value; -}; - -inline Bin_2_Value::Bin_2_Value(uint64_t min, uint64_t max) - :min_value(min), max_value(max) -{ -} - -inline uint64_t Bin_2_Value::get_min_value() -{ - return min_value; -} - -inline uint64_t Bin_2_Value::get_max_value() -{ - return max_value; -} - -/********************************** Summary_Container *************************************/ - -class Summary_Container -{ - /* maps with the values */ - typedef map<Function_Key,Function_Value> FunctionMap; - typedef map<Counter_Key,Counter_Value> CounterMap; - typedef map<P2P_Key,uint64_t> p2pTimeMap; - typedef map<CollOp_Key,CollOp_Value> CollOpMap; - typedef map<uint32_t,const char*> TraceMap; - typedef map<Process_Def_Key,uint64_t> ProcTimeMap; - typedef map<uint32_t,uint64_t> ProgTimeMap; - /* maps with the definitions */ - typedef map<Function_Def_Key,Function_Def> FuncDefMap; - typedef map<FG_Def_Key,const char*> FGDefMap; - typedef map<Process_Def_Key,const char*> ProcDefMap; - typedef map<CollOp_Def_Key,CollOp_Def> CollOpDefMap; - typedef map<Counter_Def_Key,Counter_Def> CounterDefMap; - typedef map<uint32_t,uint64_t> TicksDefMap; - typedef map<Bin_1_Key,Bin_1_Value> Bin1Map; - typedef map<Bin_2_Key,Bin_2_Value> Bin2Map; - - /* trace sender receiver bin1 bin2 Value */ - typedef map<uint32_t, map<uint32_t, map<uint32_t, map<uint32_t, map<uint32_t, P2P_Value> > > > > P2PMap; - - public: - int adddef_Function(Function_Def_Key f_def_key, Function_Def f_def); - int adddef_Counter(Counter_Def_Key c_def_key, Counter_Def c_def); - int adddef_FG(FG_Def_Key fg_def_key, const char* name); - int adddef_Proc(Process_Def_Key p_def_key, const char* name); - int adddef_CollOp(CollOp_Def_Key coll_def_key, CollOp_Def coll_def); - int adddef_Ticks(uint32_t trace, uint64_t ticks); - int adddef_Trace(uint32_t trace, const char* name); - int adddef_Bin(uint32_t trace); - int setdef_Bin1(uint32_t trace, uint32_t bin, uint64_t min, uint64_t max); - int setdef_Bin2(uint32_t trace, uint32_t bin, uint64_t min, uint64_t max); - int set_ProgTime(uint32_t trace, uint64_t time); - - int addvalues_Function(uint32_t trace, uint32_t func, uint32_t proc, uint64_t invoc, - uint64_t excl_time, uint64_t incl_time); - - int resetvalues_Function(uint32_t trace, uint32_t func, uint32_t proc, - uint64_t invoc, uint64_t excl_time, - uint64_t incl_time); - - int addvalues_Counter(uint32_t trace, uint32_t func, uint32_t proc, uint32_t counter, - uint64_t excl_value, uint64_t incl_value, bool valid); - - int addvalues_P2P(uint32_t trace, uint32_t sender, uint32_t receiver, uint32_t bin_1, - uint32_t bin_2, uint64_t invoc, uint64_t length, uint64_t time); - - int resetvalues_P2P(uint32_t trace, uint32_t sender, uint32_t receiver, uint32_t bin_1, - uint32_t bin_2, uint64_t invoc, uint64_t length, uint64_t time); - - int addvalues_CollOp(uint32_t trace, uint32_t proc, uint32_t type, uint64_t invoc_send, - uint64_t invoc_receive, uint64_t length_send, - uint64_t length_receive, uint64_t time); - - int resetvalues_CollOp(uint32_t trace, uint32_t proc, uint32_t collop, - uint64_t invoc_send, uint64_t invoc_receive, uint64_t length_send, uint64_t length_receive, uint64_t time); - - int addvalues_ProcTime(uint32_t trace, uint32_t proc,uint64_t time); - - int get_Function_Def_Key(uint32_t trace, vector<uint32_t>& f_vector); - int get_Counter_Def_Key(uint32_t trace, vector<uint32_t>& c_vector); - int get_Process_Def_Key(uint32_t trace, vector<uint32_t>& p_vector); - int get_FG_Def_Key(uint32_t trace, vector<uint32_t>& fg_vector); - int get_CollOp_Def_Key(uint32_t trace, vector<uint32_t>& collop_vector); - int get_Bin1_Def_Key(uint32_t trace, vector<uint32_t>& bin1_vector); - int get_Bin2_Def_Key(uint32_t trace, vector<uint32_t>& bin2_vector); - int get_Trace(vector<uint32_t>& trace_vector); - - Function_Def get_Function_Def(uint32_t trace, uint32_t func); - Counter_Def get_Counter_Def(uint32_t trace, uint32_t counter); - const char* get_Process_Def(uint32_t trace, uint32_t proc); - const char* get_FG_Def(uint32_t trace, uint32_t fg); - const char* get_Trace_name(uint32_t trace); - CollOp_Def get_CollOp_Def(uint32_t trace, uint32_t collop); - uint32_t get_CollOpType_Def(uint32_t trace, uint32_t collop); - - Function_Value get_Function(uint32_t trace, uint32_t func, uint32_t proc); - Counter_Value get_Counter(uint32_t trace, uint32_t func, uint32_t proc, - uint32_t counter); - P2P_Value get_P2P(uint32_t trace, uint32_t sender, uint32_t receiver, uint32_t bin_1, - uint32_t bin_2); - CollOp_Value get_CollOp(uint32_t trace, uint32_t proc, uint32_t collop); - CollOp_Value get_CollOpType(uint32_t trace, uint32_t proc, uint32_t type); - - uint64_t get_ProgTime(uint32_t trace); - uint64_t get_ProcTime(uint32_t trace, uint32_t proc); - uint64_t get_ticks(uint32_t trace); - uint32_t get_bin_1(uint64_t length); - uint32_t get_bin_2(double speed); - int get_color_gray(double min, double max, double value, - float& red, float& green, float& blue); - int get_color_gray(uint64_t min, uint64_t max, uint64_t value, - float& red, float& green, float& blue); - int get_color(double min, double max, double value, - float& red, float& green, float& blue); - int get_color(uint64_t min, uint64_t max, uint64_t value, - float& red, float& green, float& blue); - int get_gray(double min, double max, double value, - float& red, float& green, float& blue); - int get_gray(uint64_t min, uint64_t max, uint64_t value, - float& red, float& green, float& blue); - - bool find_FG(FG_Def_Key fg_def_key); - bool find_Function(Function_Def_Key f_def_key); - bool find_Counter(Counter_Def_Key c_def_key); - bool find_CollOp(CollOp_Def_Key coll_def_key); - - int csv_Function(fstream& out, uint32_t trace); - int csv_P2P(fstream& out, uint32_t trace); - int csv_CollOp(fstream& out, uint32_t trace); - int csv_Data(fstream& out, uint32_t trace); - int mergeContainer(Summary_Container& container); - - private: - FunctionMap function_map; - CounterMap counter_map; - P2PMap p2p_map; - p2pTimeMap p2p_time_map; - CollOpMap collop_map; - TraceMap trace_map; - ProcTimeMap proctime_map; - ProgTimeMap progtime_map; - - FuncDefMap func_def_map; - FGDefMap fg_def_map; - ProcDefMap proc_def_map; - CollOpDefMap collop_def_map; - CounterDefMap counter_def_map; - TicksDefMap ticks_def_map; - Bin1Map bin_1_map; - Bin2Map bin_2_map; -}; - -/* -template<class T> -bool operator<(const T& c1, const T& c2) -{ - if(c1.trace != c2.trace) - return (c1.trace < c2.trace); - else if(c1.ident != c2.ident) - return (c1.ident < c2.ident); - else - return false; -} - -template<class T> -bool operator==(const T& c1, const T& c2) -{ - if(((0 == c1.trace) || (0 == c2.trace) || (c1.trace == c2.trace)) && - ((0 == c1.ident) || (0 == c2.ident) || (c1.ident == c2.ident))) - return true; - else - return false; -} -*/ -#endif /* DATASTRUCTURE_H */ - diff --git a/externals/otf/tools/otfprofile/Definitions.h b/externals/otf/tools/otfprofile/Definitions.h deleted file mode 100644 index 17188e5329ba10d3aecf24208deb84635a86a9f3..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/Definitions.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#ifndef DEFINITIONS_H -#define DEFINITIONS_H - -#define _BYTE 1.0 -#define KBYTE 1024.0 -#define MBYTE 1048576.0 -#define GBYTE 1073741824.0 -#define KILO 1000.0 -#define MEGA 1000000.0 -#define GIGA 1000000000.0 - -/* scale units */ - -#define SECOND " sec" -#define K_SECOND " K*sec" -#define M_SECOND " M*sec" -#define G_SECOND " G*sec" - -#define INVOC " \\#" -#define K_INVOC " K*\\#" -#define M_INVOC " M*\\#" -#define G_INVOC " G*\\#" -#define BYTE_SEC " Byte/s" -#define KBYTE_SEC " KByte/s" -#define MBYTE_SEC " MByte/s" -#define GBYTE_SEC " GByte/s" -#define BYTE_TEXT " Byte" -#define KBYTE_TEXT " KByte" -#define MBYTE_TEXT " MByte" -#define GBYTE_TEXT " GByte" - -/* specify which global summary should be printed */ - -#define TEX_OFF -1 -#define TEX_ALL 0 -#define TEX_ALLPLOT 1 -#define TEX_FUNC 2 -#define TEX_P2P 3 -#define TEX_COLLOP 4 - -/* definitions for prodtex */ - -#define TINY_TEX 6 //range of color (6 different colors) -#define SMALL_TEX 11 //range of color (11 different colors) -#define MIDDLE_TEX 16 //range of color (16 different colors) -#define LARGE_TEX 21 //range of color (21 different colors) -#define HUGE_TEX 26 //range of color (26 different colors) - -#define P2P_AV_RAT 1 // Average Rate P2P -#define P2P_AV_DUR 2 // Average Duration P2P -#define P2P_AV_LEN 3 // Average Message Length P2P -#define P2P_SUM_DUR 4 // Sum of Duration P2P -#define P2P_SUM_LEN 5 // Sum of Message Length P2P -#define P2P_ALL 6 // All plots - -#define MAXIMUM(x , y) (((x) > (y)) ? (x) : (y)) -#define MINIMUM(x , y) (((x) < (y)) ? (x) : (y)) - -#endif /* DEFINITIONS_H */ diff --git a/externals/otf/tools/otfprofile/Handler.cpp b/externals/otf/tools/otfprofile/Handler.cpp deleted file mode 100644 index 50f8f02c21096436bae3856d02c11b68efaa4d0a..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/Handler.cpp +++ /dev/null @@ -1,457 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#include "OTF_Platform.h" - - -#include "Handler.h" -#include "Summary.h" - - -int save_temp(global_data* gd_ptr); - -/* SummaryHandler */ - -int handleFunctionSummary (void *firsthandlerarg, uint64_t time, uint32_t func, uint32_t proc, uint64_t invocations, uint64_t exclTime, uint64_t inclTime) { - - global_data* gd_ptr = (global_data*)firsthandlerarg; - gd_ptr->sum_container.resetvalues_Function(1,func, proc, invocations, exclTime, inclTime); - - return RETURN_HANDLER_OK; -} - -int handleMessageSummary (void *firsthandlerarg, uint64_t time, uint32_t process, uint32_t peer, uint32_t comm, uint32_t type, uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes, uint64_t receivedBytes) -{ - global_data* gd_ptr = (global_data*)firsthandlerarg; - - if(peer == 0) peer = (uint32_t) -1; - //int bin1 = gd_ptr->sum_container.get_bin_1(sentBytes); - gd_ptr->sum_container.resetvalues_P2P(1, process, peer, 1, 1, sentNumber, sentBytes, time); - gd_ptr->sum_container.resetvalues_P2P(1, peer, process, 1, 1, receivedNumber, receivedBytes, time); - - return RETURN_HANDLER_OK; -} - -int handleCollopSummary (void *firsthandlerarg, uint64_t time, uint32_t process, uint32_t comm, - uint32_t collective, uint64_t sentNumber, uint64_t receivedNumber, - uint64_t sentBytes, uint64_t receivedBytes) { - - /* message length in Summary is calculated differently compared to hanldeCollectiveOperation() */ - - global_data* gd_ptr = (global_data*)firsthandlerarg; - - gd_ptr->sum_container.resetvalues_CollOp(1, process, collective, sentNumber, receivedNumber, sentBytes, receivedBytes, time); - - return RETURN_HANDLER_OK; -} - -/****************/ - -int handleDefCreator(void *firsthandlerarg, uint32_t stream, const char *creator) { - - global_data* gd_ptr = (global_data*)firsthandlerarg; - gd_ptr->creator = creator; - - return RETURN_HANDLER_OK; -} - -int handleDefVersion(void *firsthandlerarg, uint32_t stream, uint8_t major, uint8_t minor, uint8_t sub, const char *string) { - - global_data* gd_ptr = (global_data*)firsthandlerarg; - char ver[30]; - - snprintf(ver,30,"%u.%u.%u %s",major,minor,sub,string); - gd_ptr->version = ver; - - return RETURN_HANDLER_OK; -} - -int handleDefTimerResolution(void* firsthandlerarg, uint32_t streamid, uint64_t ticks_per_sec) -{ - global_data* gd_ptr = (global_data*)firsthandlerarg; - gd_ptr->sum_container.adddef_Ticks(1, ticks_per_sec); - gd_ptr->ticks = ticks_per_sec; - return RETURN_HANDLER_OK; -} - -int handleDefFunction(void* firsthandlerarg, uint32_t streamid, - uint32_t func, const char* name, uint32_t group, uint32_t scltoken) -{ - global_data* gd_ptr = (global_data*)firsthandlerarg; - Function_Def_Key f_def_key(1, func); - if(name == NULL) - { - Function_Def f_def("Function", group); - gd_ptr->sum_container.adddef_Function(f_def_key, f_def); - } - else - { - Function_Def f_def(strdup(name), group); - gd_ptr->sum_container.adddef_Function(f_def_key, f_def); - } - return RETURN_HANDLER_OK; -} - -int handleDefFunctionGroup(void* firsthandlerarg, uint32_t streamid, - uint32_t funcg, const char* name) -{ - global_data* gd_ptr = (global_data*)firsthandlerarg; - FG_Def_Key fg_def_key(1, funcg); - if(name == NULL) - { - gd_ptr->sum_container.adddef_FG(fg_def_key, "FuncGroup"); - } - else - { - gd_ptr->sum_container.adddef_FG(fg_def_key, strdup(name)); - } - return RETURN_HANDLER_OK; -} - -int handleDefProcess(void* firsthandlerarg, uint32_t streamid, - uint32_t proc, const char* name, uint32_t parent) -{ - global_data* gd_ptr = (global_data*)firsthandlerarg; - Process_Def_Key p_def_key(1, proc); - if(name == NULL) - { - gd_ptr->sum_container.adddef_Proc(p_def_key, "Process"); - } - else - { - - char* dup= strdup( name ); - char* p= dup; - while ( '\0' != *p ) { - - if ( '_' == *p ) *p= ' '; - if ( '\\' == *p ) *p= ' '; - - p++; - } - - gd_ptr->sum_container.adddef_Proc(p_def_key, dup ); - } - Process p; - - /* ignore in lite mode */ - if ( ! lite ) { - - /* make empty recv_map for all processes */ - for(uint32_t i=1; i<= gd_ptr->num_cpu; i++) { - p.clear_recv_map(i); - } - } - - gd_ptr->p_map.insert(pair<uint32_t,Process>(proc, p)); - return RETURN_HANDLER_OK; -} - -int handleDefProcessGroup(void *firsthandlerarg, uint32_t stream, uint32_t procGroup, - const char *name, uint32_t numberOfProcs, const uint32_t *procs) -{ - global_data* gd_ptr= (global_data*)firsthandlerarg; - gd_ptr->p_group_map[procGroup] = numberOfProcs; - - return RETURN_HANDLER_OK; -} - -int handleDefCollectiveOperation(void* firsthandlerarg, uint32_t streamid, - uint32_t collop, const char* name, uint32_t type) -{ - global_data* gd_ptr= (global_data*)firsthandlerarg; - CollOp_Def_Key collop_def_key(1, collop); - if(name == NULL) - { - CollOp_Def collop_def("CollOp", type); - gd_ptr->sum_container.adddef_CollOp(collop_def_key, collop_def); - } - else - { - CollOp_Def collop_def(strdup(name), type); - gd_ptr->sum_container.adddef_CollOp(collop_def_key, collop_def); - } - return RETURN_HANDLER_OK; -} - -int handleDefCounter( void* firsthandlerarg, uint32_t streamid, - uint32_t counter, const char* name, uint32_t properties, - uint32_t countergroup, const char* unit ) -{ - if(properties == OTF_COUNTER_TYPE_ACC) - { - global_data* gd_ptr = (global_data*)firsthandlerarg; - Counter_Def_Key c_def_key(1, counter); - if(name == NULL) - { - Counter_Def c_def("Counter", strdup(unit)); - gd_ptr->sum_container.adddef_Counter(c_def_key,c_def); - } - else - { - Counter_Def c_def(strdup(name), strdup(unit)); - gd_ptr->sum_container.adddef_Counter(c_def_key,c_def); - } - } - return RETURN_HANDLER_OK; -} - -int handleEnter(void* firsthandlerarg, uint64_t time, uint32_t func, - uint32_t proc, uint32_t scltoken) -{ - global_data* gd_ptr = (global_data*)firsthandlerarg; - - if(time > gd_ptr->max_time && gd_ptr->clear_temp) { - return RETURN_HANDLER_ABORT; - } - else if(time > gd_ptr->max_time) - { - save_temp(gd_ptr); - gd_ptr->clear_temp = true; - return RETURN_HANDLER_ABORT; - } - - uint64_t enter_time = time; - - if(time < gd_ptr->min_time) - enter_time = gd_ptr->min_time; - - ProcessMap::iterator it_p = gd_ptr->p_map.find(proc); - if(it_p == gd_ptr->p_map.end()) - { - cerr << "\nprocess : " << proc - << "\n This process wasn't defined. That could cause a failure of the program" - << endl; - return OTF_RETURN_BREAK; - } - it_p->second.set_exclTime(func, enter_time); - it_p->second.set_proc_start(enter_time); - - if(gd_ptr->prog_start > enter_time) - { - gd_ptr->prog_start = enter_time; - } - - return RETURN_HANDLER_OK; -} - -int handleLeave(void* firsthandlerarg, uint64_t time, uint32_t func, - uint32_t proc, uint32_t scltoken) -{ - global_data* gd_ptr = (global_data*)firsthandlerarg; - pair<uint32_t, uint64_t> data_exclt; - - if(time > gd_ptr->max_time && gd_ptr->clear_temp) { - return RETURN_HANDLER_ABORT; - } - else if(time > gd_ptr->max_time) - { - save_temp(gd_ptr); - gd_ptr->clear_temp = true; - return RETURN_HANDLER_ABORT; - } - - ProcessMap::iterator it_p = gd_ptr->p_map.find(proc); - - if(it_p == gd_ptr->p_map.end()) { - cerr << "\nFailure in the otf-file.The process in the leaving event doesn't exist." - << endl; - } - else - { - it_p->second.get_exclTime(func, proc, time, gd_ptr); - it_p->second.set_proc_end(time); - if(gd_ptr->prog_end < time) { - gd_ptr->prog_end = time; - } - } - - return RETURN_HANDLER_OK; -} - -int handleCounter(void* firsthandlerarg, uint64_t time, uint32_t proc, - uint32_t counter, uint64_t value) -{ - global_data* gd_ptr = (global_data*)firsthandlerarg; - Counter_Def_Key c_def_key(1, counter); - if(gd_ptr->sum_container.find_Counter(c_def_key)) - { - ProcessMap::iterator it_p = gd_ptr->p_map.find(proc); - if(it_p == gd_ptr->p_map.end()) - cerr << "\nFailure in the otf-file.The process in the counter event doesn't exist." - << endl; - else - it_p->second.set_counter(counter, time, value, gd_ptr); - } - - return RETURN_HANDLER_OK; -} - -int handleSendMsg(void* firsthandlerarg, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t communicator, uint32_t msgtype, uint32_t msglength, - uint32_t scltoken) -{ - global_data* gd_ptr = (global_data*)firsthandlerarg; - if(time > gd_ptr->max_time && gd_ptr->clear_temp) { - return RETURN_HANDLER_ABORT; - } - else if(time > gd_ptr->max_time) - { - save_temp(gd_ptr); - gd_ptr->clear_temp = true; - return RETURN_HANDLER_ABORT; - } - - ProcessMap::iterator it = gd_ptr->p_map.find(sender); - if(it == gd_ptr->p_map.end()) - cerr << "\nError in SendMsg event. Sender " << sender << " unknown." << endl; - - if(time < gd_ptr->min_time) - it->second.set_mbyte_per_sec(sender, receiver, time, msgtype, INVALID, gd_ptr); - - else - it->second.set_mbyte_per_sec(sender, receiver, time, msgtype, VALID, gd_ptr); - - - return RETURN_HANDLER_OK; - -} - -int handleRecvMsg(void* firsthandlerarg, uint64_t time, uint32_t receiver, - uint32_t sender, uint32_t communicator, uint32_t msgtype, uint32_t msglength, - uint32_t scltoken) -{ - global_data* gd_ptr = (global_data*)firsthandlerarg; - if(time > gd_ptr->max_time && gd_ptr->clear_temp) { - return RETURN_HANDLER_ABORT; - } - else if(time > gd_ptr->max_time) - { - save_temp(gd_ptr); - gd_ptr->clear_temp = true; - return RETURN_HANDLER_ABORT; - } - - ProcessMap::iterator it = gd_ptr->p_map.find(receiver); - if(it == gd_ptr->p_map.end()) - cerr << "\nError in RecvMsg event. Sender " << sender << " unknown." << endl; - - it->second.get_mbyte_per_sec(sender, receiver, time, msglength, msgtype, gd_ptr); - - return RETURN_HANDLER_OK; -} - -int handleCollectiveOperation(void* firsthandlerarg, uint64_t time, - uint32_t proc, uint32_t collop, uint32_t procgroup, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken) -{ - global_data* gd_ptr = (global_data*)firsthandlerarg; - uint32_t type; - if(time > gd_ptr->max_time && gd_ptr->clear_temp) - return RETURN_HANDLER_ABORT; - else if(time > gd_ptr->max_time) - { - save_temp(gd_ptr); - gd_ptr->clear_temp = true; - return RETURN_HANDLER_ABORT; - } - else if(time < gd_ptr->min_time) - return RETURN_HANDLER_OK; - - ProcessMap::iterator it_p = gd_ptr->p_map.find(proc); - if((type = gd_ptr->sum_container.get_CollOpType_Def(1, collop)) != 0) - { - if(proc == rootprocess) - it_p->second.set_data_collective(proc, collop, type, true, procgroup, sent, received, duration, - gd_ptr); - else - it_p->second.set_data_collective(proc, collop, type, false, procgroup, sent, received, duration, - gd_ptr); - } - else - { - cerr << "\nCollOp : " << collop << " started on Process " << proc << " wasn't defined." - << " That's a failure in the otf-file." << endl; - } - - return RETURN_HANDLER_OK; - -} - -int set_time_sum_container(global_data* gd_ptr) -{ - uint64_t time = 0; - uint64_t prog_time = 0; - ProcessMap::iterator it_p = gd_ptr->p_map.begin(); - while(it_p != gd_ptr->p_map.end()) - { - if(it_p->second.get_proc_end() < it_p->second.get_proc_start()) - { - time = 0; - cerr << "Error, proc_start is greater than proc_end." << endl; - } - else - { - time = it_p->second.get_proc_end() - it_p->second.get_proc_start(); - } - gd_ptr->sum_container.addvalues_ProcTime(1, it_p->first, time); - ++it_p; - } - if(gd_ptr->prog_end < gd_ptr->prog_start) - { - cerr << "Error, prog_start is greater than prog_end." << endl; - } - else - { - prog_time = gd_ptr->prog_end - gd_ptr->prog_start; - } - gd_ptr->sum_container.set_ProgTime(1, prog_time); - - return 0; -} - -int mergeProgTime(global_data* gd, global_data* data) { - if(gd->prog_start > data->prog_start) { - gd->prog_start = data->prog_start; - } - if(gd->prog_end < data->prog_end) { - gd->prog_end = data->prog_end; - } - - uint64_t time = gd->prog_end - gd->prog_start; - - gd->sum_container.set_ProgTime(1, time); - - return 0; -} - -/* this function clears the stack for the exclusive time in each object of the class Process */ - -int save_temp(global_data* gd_ptr) -{ - ProcessMap::iterator it_p = gd_ptr->p_map.begin(); - uint32_t f_id; - while(it_p != gd_ptr->p_map.end()) - { - - if(it_p->second.get_stack_status()) - ++it_p; - else - { - while(!it_p->second.get_stack_status()) - { - f_id = it_p->second.get_stack_top_func_id(); - it_p->second.get_exclTime(f_id, it_p->first, gd_ptr->max_time, gd_ptr); - } - ++it_p; - } - } - return 0; -} - - - - diff --git a/externals/otf/tools/otfprofile/Handler.h b/externals/otf/tools/otfprofile/Handler.h deleted file mode 100644 index e727a497196e3a1fe16d11730613bbfaa8053bb7..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/Handler.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#ifndef HANDLER_H -#define HANDLER_H - -#include "OTF_inttypes.h" - -#include "Summary.h" - -#define RETURN_HANDLER_OK 0 -#define RETURN_HANDLER_ABORT 1 - -using namespace std; - -/* SummaryHandler */ - -int handleFunctionSummary (void *firsthandlerarg, uint64_t time, uint32_t function, uint32_t process, uint64_t invocations, uint64_t exclTime, uint64_t inclTime); - -int handleMessageSummary (void *firsthandlerarg, uint64_t time, uint32_t process, uint32_t peer, uint32_t comm, uint32_t type, uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes, uint64_t receivedBytes); - -int handleCollopSummary (void *firsthandlerarg, uint64_t time, uint32_t process, uint32_t comm, uint32_t collective, - uint64_t sentNumber, uint64_t receivedNumber, uint64_t sentBytes, uint64_t receivedBytes); - -/*********************/ - -int handleDefCreator(void *firsthandlerarg, uint32_t stream, const char *creator); - -int handleDefVersion(void *firsthandlerarg, uint32_t stream, uint8_t major, uint8_t minor, uint8_t sub, const char *string); - -int handleDefTimerResolution(void* firsthandlerarg, uint32_t streamid, uint64_t ticks_per_sec); - -int handleDefFunction(void* firsthandlerarg, uint32_t streamid, - uint32_t func, const char* name, uint32_t group, uint32_t scltoken); - -int handleDefFunctionGroup(void* firsthandlerarg, uint32_t streamid, - uint32_t funcg, const char* name); - -int handleDefProcess(void* firsthandlerarg, uint32_t streamid, - uint32_t proc, const char* name, uint32_t parent); - -int handleDefProcessGroup(void *firsthandlerarg, uint32_t stream, - uint32_t procGroup, const char *name, uint32_t numberOfProcs, - const uint32_t *procs); - -int handleDefCollectiveOperation(void* firsthandlerarg, uint32_t streamid, - uint32_t collop, const char* name, uint32_t type); - -int handleDefCounter(void* firsthandlerarg, uint32_t streamid, - uint32_t counter, const char* name, uint32_t properties, - uint32_t countergroup, const char* unit); - -int handleEnter(void* firsthandlerarg, uint64_t time, uint32_t func, - uint32_t proc, uint32_t scltoken); - -int handleLeave(void* firsthandlerarg, uint64_t time, uint32_t func, - uint32_t proc, uint32_t scltoken); - -int handleCounter(void* firsthandlerarg, uint64_t time, uint32_t proc, - uint32_t counter, uint64_t value); - -int handleRecvMsg(void* firsthandlerarg, uint64_t time, uint32_t receiver, - uint32_t sender, uint32_t communicator, uint32_t msgtype, uint32_t msglength, - uint32_t scltoken); - -int handleSendMsg(void* firsthandlerarg, uint64_t time, uint32_t sender, - uint32_t receiver, uint32_t communicator, uint32_t msgtype, uint32_t msglength, - uint32_t scltoken); - -int handleCollectiveOperation(void* firsthandlerarg, uint64_t time, - uint32_t proc, uint32_t collop, uint32_t procgroup, - uint32_t rootprocess, uint32_t sent, uint32_t received, - uint64_t duration, uint32_t scltoken); - -int set_time_sum_container(global_data* gd_ptr); -int mergeProgTime(global_data* gd, global_data* data); - -#endif /* HANDLER_H */ diff --git a/externals/otf/tools/otfprofile/Makefile.am b/externals/otf/tools/otfprofile/Makefile.am deleted file mode 100644 index 127c6a3bc196ee2c38c0a4c1ef3dd98ad936ff38..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib - -if AMBUILDBINARIES -bin_PROGRAMS = \ - otfprofile -endif - -if AMHAVEOMP -otfprofile_CXXFLAGS = $(OPENMP_CXXFLAGS) -otfprofile_LDFLAGS = $(OPENMP_CXXFLAGS) -endif - -otfprofile_LDADD = $(top_builddir)/otflib/libotf.la $(MATHLIB) -otfprofile_DEPENDENCIES = $(top_builddir)/otflib/libotf.la -otfprofile_SOURCES = \ - CSVParse.h \ - DataStructure.h \ - Definitions.h \ - Handler.h \ - Prodtex.h \ - Summary.h \ - otfprofile.cpp \ - CSVParse.cpp \ - DataStructure.cpp \ - Handler.cpp \ - Prodtex.cpp \ - Summary.cpp - diff --git a/externals/otf/tools/otfprofile/Makefile.in b/externals/otf/tools/otfprofile/Makefile.in deleted file mode 100644 index 27de597385a6b046ea0fda292bfb17b586a002e0..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/Makefile.in +++ /dev/null @@ -1,724 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@AMBUILDBINARIES_TRUE@bin_PROGRAMS = otfprofile$(EXEEXT) -subdir = tools/otfprofile -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_otfprofile_OBJECTS = otfprofile-otfprofile.$(OBJEXT) \ - otfprofile-CSVParse.$(OBJEXT) \ - otfprofile-DataStructure.$(OBJEXT) \ - otfprofile-Handler.$(OBJEXT) otfprofile-Prodtex.$(OBJEXT) \ - otfprofile-Summary.$(OBJEXT) -otfprofile_OBJECTS = $(am_otfprofile_OBJECTS) -am__DEPENDENCIES_1 = -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -otfprofile_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(otfprofile_CXXFLAGS) \ - $(CXXFLAGS) $(otfprofile_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) -am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CXXLD_0 = @echo " CXXLD " $@; -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(otfprofile_SOURCES) -DIST_SOURCES = $(otfprofile_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib -@AMHAVEOMP_TRUE@otfprofile_CXXFLAGS = $(OPENMP_CXXFLAGS) -@AMHAVEOMP_TRUE@otfprofile_LDFLAGS = $(OPENMP_CXXFLAGS) -otfprofile_LDADD = $(top_builddir)/otflib/libotf.la $(MATHLIB) -otfprofile_DEPENDENCIES = $(top_builddir)/otflib/libotf.la -otfprofile_SOURCES = \ - CSVParse.h \ - DataStructure.h \ - Definitions.h \ - Handler.h \ - Prodtex.h \ - Summary.h \ - otfprofile.cpp \ - CSVParse.cpp \ - DataStructure.cpp \ - Handler.cpp \ - Prodtex.cpp \ - Summary.cpp - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/otfprofile/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/otfprofile/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -otfprofile$(EXEEXT): $(otfprofile_OBJECTS) $(otfprofile_DEPENDENCIES) - @rm -f otfprofile$(EXEEXT) - $(AM_V_CXXLD)$(otfprofile_LINK) $(otfprofile_OBJECTS) $(otfprofile_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfprofile-CSVParse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfprofile-DataStructure.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfprofile-Handler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfprofile-Prodtex.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfprofile-Summary.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfprofile-otfprofile.Po@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -otfprofile-otfprofile.o: otfprofile.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -MT otfprofile-otfprofile.o -MD -MP -MF $(DEPDIR)/otfprofile-otfprofile.Tpo -c -o otfprofile-otfprofile.o `test -f 'otfprofile.cpp' || echo '$(srcdir)/'`otfprofile.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/otfprofile-otfprofile.Tpo $(DEPDIR)/otfprofile-otfprofile.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='otfprofile.cpp' object='otfprofile-otfprofile.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -c -o otfprofile-otfprofile.o `test -f 'otfprofile.cpp' || echo '$(srcdir)/'`otfprofile.cpp - -otfprofile-otfprofile.obj: otfprofile.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -MT otfprofile-otfprofile.obj -MD -MP -MF $(DEPDIR)/otfprofile-otfprofile.Tpo -c -o otfprofile-otfprofile.obj `if test -f 'otfprofile.cpp'; then $(CYGPATH_W) 'otfprofile.cpp'; else $(CYGPATH_W) '$(srcdir)/otfprofile.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/otfprofile-otfprofile.Tpo $(DEPDIR)/otfprofile-otfprofile.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='otfprofile.cpp' object='otfprofile-otfprofile.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -c -o otfprofile-otfprofile.obj `if test -f 'otfprofile.cpp'; then $(CYGPATH_W) 'otfprofile.cpp'; else $(CYGPATH_W) '$(srcdir)/otfprofile.cpp'; fi` - -otfprofile-CSVParse.o: CSVParse.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -MT otfprofile-CSVParse.o -MD -MP -MF $(DEPDIR)/otfprofile-CSVParse.Tpo -c -o otfprofile-CSVParse.o `test -f 'CSVParse.cpp' || echo '$(srcdir)/'`CSVParse.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/otfprofile-CSVParse.Tpo $(DEPDIR)/otfprofile-CSVParse.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='CSVParse.cpp' object='otfprofile-CSVParse.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -c -o otfprofile-CSVParse.o `test -f 'CSVParse.cpp' || echo '$(srcdir)/'`CSVParse.cpp - -otfprofile-CSVParse.obj: CSVParse.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -MT otfprofile-CSVParse.obj -MD -MP -MF $(DEPDIR)/otfprofile-CSVParse.Tpo -c -o otfprofile-CSVParse.obj `if test -f 'CSVParse.cpp'; then $(CYGPATH_W) 'CSVParse.cpp'; else $(CYGPATH_W) '$(srcdir)/CSVParse.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/otfprofile-CSVParse.Tpo $(DEPDIR)/otfprofile-CSVParse.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='CSVParse.cpp' object='otfprofile-CSVParse.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -c -o otfprofile-CSVParse.obj `if test -f 'CSVParse.cpp'; then $(CYGPATH_W) 'CSVParse.cpp'; else $(CYGPATH_W) '$(srcdir)/CSVParse.cpp'; fi` - -otfprofile-DataStructure.o: DataStructure.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -MT otfprofile-DataStructure.o -MD -MP -MF $(DEPDIR)/otfprofile-DataStructure.Tpo -c -o otfprofile-DataStructure.o `test -f 'DataStructure.cpp' || echo '$(srcdir)/'`DataStructure.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/otfprofile-DataStructure.Tpo $(DEPDIR)/otfprofile-DataStructure.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='DataStructure.cpp' object='otfprofile-DataStructure.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -c -o otfprofile-DataStructure.o `test -f 'DataStructure.cpp' || echo '$(srcdir)/'`DataStructure.cpp - -otfprofile-DataStructure.obj: DataStructure.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -MT otfprofile-DataStructure.obj -MD -MP -MF $(DEPDIR)/otfprofile-DataStructure.Tpo -c -o otfprofile-DataStructure.obj `if test -f 'DataStructure.cpp'; then $(CYGPATH_W) 'DataStructure.cpp'; else $(CYGPATH_W) '$(srcdir)/DataStructure.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/otfprofile-DataStructure.Tpo $(DEPDIR)/otfprofile-DataStructure.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='DataStructure.cpp' object='otfprofile-DataStructure.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -c -o otfprofile-DataStructure.obj `if test -f 'DataStructure.cpp'; then $(CYGPATH_W) 'DataStructure.cpp'; else $(CYGPATH_W) '$(srcdir)/DataStructure.cpp'; fi` - -otfprofile-Handler.o: Handler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -MT otfprofile-Handler.o -MD -MP -MF $(DEPDIR)/otfprofile-Handler.Tpo -c -o otfprofile-Handler.o `test -f 'Handler.cpp' || echo '$(srcdir)/'`Handler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/otfprofile-Handler.Tpo $(DEPDIR)/otfprofile-Handler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Handler.cpp' object='otfprofile-Handler.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -c -o otfprofile-Handler.o `test -f 'Handler.cpp' || echo '$(srcdir)/'`Handler.cpp - -otfprofile-Handler.obj: Handler.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -MT otfprofile-Handler.obj -MD -MP -MF $(DEPDIR)/otfprofile-Handler.Tpo -c -o otfprofile-Handler.obj `if test -f 'Handler.cpp'; then $(CYGPATH_W) 'Handler.cpp'; else $(CYGPATH_W) '$(srcdir)/Handler.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/otfprofile-Handler.Tpo $(DEPDIR)/otfprofile-Handler.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Handler.cpp' object='otfprofile-Handler.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -c -o otfprofile-Handler.obj `if test -f 'Handler.cpp'; then $(CYGPATH_W) 'Handler.cpp'; else $(CYGPATH_W) '$(srcdir)/Handler.cpp'; fi` - -otfprofile-Prodtex.o: Prodtex.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -MT otfprofile-Prodtex.o -MD -MP -MF $(DEPDIR)/otfprofile-Prodtex.Tpo -c -o otfprofile-Prodtex.o `test -f 'Prodtex.cpp' || echo '$(srcdir)/'`Prodtex.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/otfprofile-Prodtex.Tpo $(DEPDIR)/otfprofile-Prodtex.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Prodtex.cpp' object='otfprofile-Prodtex.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -c -o otfprofile-Prodtex.o `test -f 'Prodtex.cpp' || echo '$(srcdir)/'`Prodtex.cpp - -otfprofile-Prodtex.obj: Prodtex.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -MT otfprofile-Prodtex.obj -MD -MP -MF $(DEPDIR)/otfprofile-Prodtex.Tpo -c -o otfprofile-Prodtex.obj `if test -f 'Prodtex.cpp'; then $(CYGPATH_W) 'Prodtex.cpp'; else $(CYGPATH_W) '$(srcdir)/Prodtex.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/otfprofile-Prodtex.Tpo $(DEPDIR)/otfprofile-Prodtex.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Prodtex.cpp' object='otfprofile-Prodtex.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -c -o otfprofile-Prodtex.obj `if test -f 'Prodtex.cpp'; then $(CYGPATH_W) 'Prodtex.cpp'; else $(CYGPATH_W) '$(srcdir)/Prodtex.cpp'; fi` - -otfprofile-Summary.o: Summary.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -MT otfprofile-Summary.o -MD -MP -MF $(DEPDIR)/otfprofile-Summary.Tpo -c -o otfprofile-Summary.o `test -f 'Summary.cpp' || echo '$(srcdir)/'`Summary.cpp -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/otfprofile-Summary.Tpo $(DEPDIR)/otfprofile-Summary.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Summary.cpp' object='otfprofile-Summary.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -c -o otfprofile-Summary.o `test -f 'Summary.cpp' || echo '$(srcdir)/'`Summary.cpp - -otfprofile-Summary.obj: Summary.cpp -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -MT otfprofile-Summary.obj -MD -MP -MF $(DEPDIR)/otfprofile-Summary.Tpo -c -o otfprofile-Summary.obj `if test -f 'Summary.cpp'; then $(CYGPATH_W) 'Summary.cpp'; else $(CYGPATH_W) '$(srcdir)/Summary.cpp'; fi` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/otfprofile-Summary.Tpo $(DEPDIR)/otfprofile-Summary.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Summary.cpp' object='otfprofile-Summary.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(otfprofile_CXXFLAGS) $(CXXFLAGS) -c -o otfprofile-Summary.obj `if test -f 'Summary.cpp'; then $(CYGPATH_W) 'Summary.cpp'; else $(CYGPATH_W) '$(srcdir)/Summary.cpp'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS 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-binPROGRAMS - -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: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - 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-binPROGRAMS 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 \ - uninstall-binPROGRAMS - - -# 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/externals/otf/tools/otfprofile/Prodtex.cpp b/externals/otf/tools/otfprofile/Prodtex.cpp deleted file mode 100644 index 90dcad56f7e1331ac044d215ba38866f7d4c14e6..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/Prodtex.cpp +++ /dev/null @@ -1,2273 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#ifdef _SX -# include <unistd.h> -# include <sys/socket.h> /* <- this include is needed on NEC SX platforms for gethostname() */ -#endif - -#ifdef _WIN32 -# include <Winsock2.h> -#endif - -#include "OTF_Platform.h" - -#include "Prodtex.h" - -void bar_data(fstream& out, double value[16][7], bool var, uint32_t proc_count) -{ - double help = 0; - if(!var && (proc_count > 16)) - { - out << "\\def\\bardataI" << endl; - out << "{" << endl; - for(int k = 0; k < 16; k++) - { - if(value[k][2] > 0) - out << (k + 0.25) << " " << (log(value[k][2])/log(2.0) + 1) << endl; - if(value[k][5] > 0) - out << (k + 0.75) << " " << (log(value[k][5])/log(2.0) + 1) << endl; - } - out << "}" << endl; - } - out << "\\def\\bardataII" << endl; - out << "{" << endl; - for(int k = 0; k < 16; k++) - { - if(value[k][0] > 0) - { - help = value[k][0] / value[k][6]; - if(help < 1) - out << (k + 0.3) << " " << help << endl; - else - out << (k + 0.3) << " " << (log(help)/log(2.0) + 1) << endl; - } - if(value[k][3] > 0) - { - help = value[k][3] / value[k][6]; - if(help < 1) - out << (k + 0.8) << " " << help << endl; - else - out << (k + 0.8) << " " << (log(help)/log(2.0) + 1) << endl; - } - } - out << "}" << endl; - if(!var && (proc_count > 16)) - { - out << "\\def\\bardataIII" << endl; - out << "{" << endl; - for(int k = 0; k < 16; k++) - { - if(value[k][1] > 0) - out << (k + 0.4) << " " << (log(value[k][1])/log(2.0) + 1) << endl; - if(value[k][4] > 0) - out << (k + 0.9) << " " << (log(value[k][4])/log(2.0) + 1) << endl; - } - out << "}" << endl; - } -} - -void bar_chart(uint64_t max, fstream& out, string proc_name1[16], string proc_name2[16], - uint32_t proc_count, string chart_name, bool byte , double value[16][7], - bool var, bool sum) -{ - uint64_t max_help = max; - if(var && (proc_count > 16)) - { - double help; - for(int k = 0; k < 16; k++) - { - if((value[k][0] > 0) && (value[k][6] > 1)) - { - - help = value[k][0] / value[k][6]; - value[k][2] = (value[k][1] -( value[k][6] * help * help)) / (value[k][6] - 1.0); - value[k][2] = sqrt(value[k][2]); - max = MAXIMUM(max, max_help + (uint64_t) value[k][2]); - } - else - { - value[k][2] = 0; - } - - if((value[k][3] > 0) && (value[k][6] > 1)) - { - - help = value[k][3] / value[k][6]; - value[k][5] = (value[k][4] - (value[k][6] * help * help)) / (value[k][6] - 1.0); - value[k][5] = sqrt(value[k][5]); - max = MAXIMUM(max, max_help + (uint64_t) value[k][5]); - } - else - { - value[k][5] = 0; - } - } - - } - - out << "{\\Large \\bf " << chart_name << "}" << endl; - out << endl; - out << "\\bigskip" << endl; - out << "\\bigskip" << endl; - out << "\\bigskip" << endl; - out << endl; - out << "\\begin{help}" << endl; - out << "\\psset{xunit=1,yunit=0.5}" << endl; - out << "\\begin{pspicture}(0,0)(16," << ((uint64_t) log((double)max)/log(2.0) + 2) << ")" << endl; - out << " \\psaxes[labels=no,Oy=-1,ysubticks=2,ylogBase=2,Dy=2,ytickwidth=1pt," << endl; - out << " ysubtickwidth=1pt,xticksize=-1 " << ((uint64_t) log((double)max)/log(2.0) + 2) - << ",yticksize=0 16,ysubticksize=1," << endl; - out << " yticklinestyle=dotted,ysubticklinestyle=dotted]{-}(0,0)(0,0)(16.1," - << ((uint64_t) log((double)max)/log(2.0) + 2) << ")" << endl; - uint32_t count = 1; - out << " \\rput[r](-0.2,0){0}" << endl; - uint64_t i; - if(byte) - { - for(i = 1; i <= max<<1; i <<= 1) - { - out << "\\psline{-}(-0.15," << count << ")(0," << count << ")" << endl; - if(i < KBYTE) - { - out << " \\rput[r](-0.2," << count << "){" << i <<"}" << endl; - } - else if(i < MBYTE) - { - out << " \\rput[r](-0.2," << count << "){" << (i / KBYTE) << "K}" << endl; - } - else if(i < GBYTE) - { - out << " \\rput[r](-0.2," << count << "){" << (i / MBYTE) << "M}" << endl; - } - else - { - out << " \\rput[r](-0.2," << count << "){" << (i / GBYTE) << "G}" << endl; - } - count += 1; - } - } - else - { - for(i = 1; i <= max<<1; i <<= 1) - { - out << "\\psline{-}(-0.15," << count << ")(0," << count << ")" << endl; - if(i < KILO) - { - out << " \\rput[r](-0.2," << count << "){" << i <<"}" << endl; - } - else if(i < MEGA) - { - out << " \\rput[r](-0.2," << count << "){" << (i / KILO) << "K}" << endl; - } - else if(i < GIGA) - { - out << " \\rput[r](-0.2," << count << "){" << (i / MEGA) << "M}" << endl; - } - else - { - out << " \\rput[r](-0.2," << count << "){" << (i / GIGA) << "G}" << endl; - } - count += 1; - } - } - if(!var && (proc_count > 16)) - { - out << " \\listplot[shadow=false,plotstyle=bar,barwidth=0.4," << endl; - out << " fillcolor=red,fillstyle=solid]{\\bardataI}" << endl; - out << " \\listplot[shadow=false,plotstyle=bar,barwidth=0.3," << endl; - out << " fillcolor=green,fillstyle=solid]{\\bardataII}" << endl; - out << " \\listplot[shadow=false,plotstyle=bar,barwidth=0.10," << endl; - out << " fillcolor=blue,fillstyle=solid]{\\bardataIII}" << endl; - } - else - { - out << " \\listplot[shadow=false,plotstyle=bar,barwidth=0.46," << endl; - out << " fillcolor=green,fillstyle=solid]{\\bardataII}" << endl; - } - - if(var && (proc_count > 16)) - { - double help, test; - for(int k = 0; k < 16; k++) - { - if(value[k][0] > 0) - { - help = value[k][0] / value[k][6]; - out << "\\psframe[fillstyle=solid,fillcolor=lightgray](" << (k + 0.2) << ","; - if(help < value[k][2]) - out << "0"; - else - { - if((test = help - value[k][2]) < 1) - out << test; - else - out << log(test)/log(2.0) + 1; - } - out << ")(" << (k + 0.4) << ","; - test = help + value[k][2]; - if(test < 1) - out << test; - else - out << log(test)/log(2.0) + 1; - out << ")" << endl; - } - if(value[k][3] > 0) - { - help = value[k][3] / value[k][6]; - out << "\\psframe[fillstyle=solid,fillcolor=lightgray](" << (k + 0.7) << ","; - if(help < value[k][5]) - out << "0"; - else - { - if((test = help - value[k][5]) < 1) - out << test; - else - out << log(test)/log(2.0) + 1; - } - out << ")(" << (k + 0.9) << ","; - test = help + value[k][5]; - if(test < 1) - out << test; - else - out << log(test)/log(2.0) + 1; - out << ")" << endl; - } - } - } - - for(int k = 0; k < 16; k++) - { - if(proc_name1[k].size() > 15) - { - proc_name1[k].resize(15); - } - if(proc_count <= 16) - { - out << " \\rput[r]{90}(" << (k + 0.5) << ",-0.8){" << proc_name1[k] << "}" << endl; - out << " \\rput[t](" << (k + 0.2) << ",-0.2){s}" << endl; - out << " \\rput[t](" << (k + 0.8) << ",-0.2){r}" << endl; - } - else - { - if(proc_name2[k].size() > 15) - { - proc_name2[k].resize(15); - } - out << " \\rput[t](" << (k + 0.2) << ",-0.2){s}" << endl; - out << " \\rput[t](" << (k + 0.8) << ",-0.2){r}" << endl; - out << " \\rput[t](" << (k + 1.2) << ",-0.2){s}" << endl; - out << " \\rput[t](" << (k + 1.8) << ",-0.2){r}" << endl; - out << " \\rput[r]{90}(" << (k + 0.2) << ",-0.8){" << proc_name1[k] << "}" << endl; - out << " \\rput[r]{90}(" << (k + 0.5) << ",-0.8){-}" << endl; - out << " \\rput[r]{90}(" << (k + 0.8) << ",-0.8){" << proc_name2[k] << "}" << endl; - k++; - } - } - - out << " \\rput[l](0,-7){s - Send}" << endl; - out << " \\rput[l](0,-7.7){r - Receive}" << endl; - - if(!sum) { - if( (chart_name.find("ONE2ALL") < chart_name.size()) || (chart_name.find("ALL2ALL") < chart_name.size()) ) { - string sub = "the root"; - if(chart_name.find("ALL2ALL") < chart_name.size()) sub = "every"; - out << " \\rput[l](0,-11.0){In this chart one collective operation call means that " << sub << " process broadcasts only one message to the}" << endl; - out << " \\rput[l](0,-11.7){group and not allways one message to every group member. All processes of the group, the root process}" << endl; - out << " \\rput[l](0,-12.4){included, receive one message in total.}" << endl; - } - } else { - if( (chart_name.find("ONE2ALL") < chart_name.size()) || (chart_name.find("ALL2ALL") < chart_name.size()) ) { - string sub = "the root"; - if(chart_name.find("ALL2ALL") < chart_name.size()) sub = "every"; - out << " \\rput[l](0,-11.0){In this chart one collective operation call means that " << sub << " process broadcasts one message to every}" << endl; - out << " \\rput[l](0,-11.7){group member and not only one to the group. All processes of the group, the root process included,}" << endl; - out << " \\rput[l](0,-12.4){receive one message in total.}" << endl; - } - } - - if(!var && (proc_count > 16)) - { - out << " \\fnode[framesize=0.2 0.2,fillstyle=solid,fillcolor=red,linecolor=black](3,-7){Y}" << endl; - out << " \\rput[l](3.2,-7.0){Maximum}" << endl; - out << " \\fnode[framesize=0.2 0.2,fillstyle=solid,fillcolor=green,linecolor=black](3,-7.7){Y}" << endl; - out << " \\rput[l](3.2,-7.7){Average}" << endl; - out << " \\fnode[framesize=0.2 0.2,fillstyle=solid,fillcolor=blue,linecolor=black](3,-8.4){Y}" << endl; - out << " \\rput[l](3.2,-8.4){Minimum}" << endl; - } - out << "\\end{pspicture}" << endl; - out << "\\end{help}" << endl; - out << "\\newpage" << endl; -} - -/**************************************** tex_header ****************************************/ - -void tex_header(fstream& out, global_data* gd_ptr) -{ - char hostname[255]; - gethostname(hostname, sizeof(hostname)); - out << "\\documentclass[a4paper,10pt]{article}" << endl; - out << "\\usepackage{amssymb}" << endl; - out << "\\usepackage{longtable}" << endl; - out << "\\usepackage{pstricks,pst-plot,pstricks-add}" << endl; - out << "\\textwidth=16.0cm \\textheight=27.0cm \\topmargin=-1.8cm" << endl; - out << "\\oddsidemargin=0.1cm \\evensidemargin=0.1cm \\footskip=45pt" << endl; - out << endl; - out << "\\newcommand{\\PstDrawNode}[7]{%" << endl; - out << " \\definecolor{MyColor}{rgb}{#1,#2,#3}%" << endl; - out << " \\fnode[framesize=#4 #5,fillstyle=solid,fillcolor=MyColor,linecolor=MyColor](#6,#7){Y}" << endl; - out << "}" << endl; - out << endl; - out << "\\newcommand{\\Print}[4]{%" << endl; - out << " \\definecolor{MyColor}{rgb}{#1,#2,#3}%" << endl; - out << " \\textcolor{MyColor}{#4}" << endl; - out << "}" << endl; - out << endl; - out << "\\newenvironment{help}{}{}" << endl; - out << endl; - out << "\\begin{document}" << endl; - out << endl; - out << "\\begin{flushleft}" << endl; - out << endl; - out << "file: \\verb|" << gd_ptr->filename << "| \\\\" << endl; - out << endl; - out << "\\bigskip" << endl; - out << "\\fbox{\\parbox{6.0 cm}{created by : " << gd_ptr->creator << "\\\\" << endl; - out << " OTF-Version: " << gd_ptr->version << "}}" << endl; - //out << " Author: Denis Huenich \\\\" << endl; - //out << " ZIH, TU Dresden}}" << endl; - out << "\\end{flushleft}" << endl; - out << "\\bigskip" << endl; - out << "\\bigskip" << endl; - out << endl; - out << "\\begin{center}" << endl; - out << endl; -} - -/***************************************** tex_foot *****************************************/ - -void tex_foot(fstream& out) -{ - out << endl; - out << "\\end{center}" << endl; - out << endl; out << "\\end{document}" << endl; -} - -/*********************************** Function and Counter ***********************************/ - -int tex_func(fstream& out, global_data* gd_ptr, vector<string> counter_names, bool sum) -{ - typedef multimap<double,func_temp,greater<double> > TempMap; - typedef map<uint32_t,count_temp> CountMap1; - - int min; - int max = 0; - - string tmp; - uint32_t stellen = 0; - - int i; - int help; - string func_name; - string count_name; - bool c_name; - - TempMap temp_map; - CountMap1 count_map1; - double ticks; - double excl_time, incl_time; - double rate; - float red,green,blue; // color values for rgb - - uint64_t min_invoc = (uint64_t) -1; - uint64_t max_invoc = 0; - // 0 = excl_time, 1 = incl_time - double min_time[2] = {(double)((uint64_t) -1), (double)((uint64_t) -1)}; - double max_time[2] = {0.0, 0.0}; - - vector<uint32_t> func_vector; - vector<uint32_t> count_vector; - vector<uint32_t> count_name_vector; - Function_Value f_value; - Counter_Value c_value; - - gd_ptr->sum_container.get_Function_Def_Key(1, func_vector); - gd_ptr->sum_container.get_Counter_Def_Key(1, count_vector); - ticks = (double) gd_ptr->sum_container.get_ticks(1); - if(ticks < 1.0) - { - ticks = 1.0; - cerr << "Error in tex_func. No ticks given for this trace." << endl; - } - - /* collects information for Function and Counter */ - - vector<uint32_t>::iterator it_vector = func_vector.begin(); - vector<uint32_t>::iterator it_c_vector; - vector<uint32_t>::iterator it_c_name; - CountMap1::iterator it_c_map1; - TempMap::iterator it_map; - TempMap::iterator it_map_page; - - if(!counter_names.empty()) - { - it_c_vector = count_vector.begin(); - while(it_c_vector != count_vector.end()) - { - string s(strdup(gd_ptr->sum_container.get_Counter_Def(1, *it_c_vector).get_name())); - transform(s.begin(), s.end(), s.begin(), ::toupper); - vector<string>::iterator help_v; - help_v = counter_names.begin(); - while(help_v != counter_names.end()) - { - if(s == *help_v) - { - count_name_vector.push_back(*it_c_vector); - break; - } - ++help_v; - } - ++it_c_vector; - } - } - while(it_vector != func_vector.end()) - { - func_temp f_temp; - f_value = gd_ptr->sum_container.get_Function(1, *it_vector, 0); - if(f_value.get_invoc() > 0) - { - excl_time = (double) f_value.get_excl_time() / ticks; - incl_time = (double) f_value.get_incl_time() / ticks; - f_temp.func_id = *it_vector; - f_temp.invoc = f_value.get_invoc(); - f_temp.incl_time = incl_time; - - it_c_vector = count_vector.begin(); - while(it_c_vector != count_vector.end()) - { - c_name = false; - c_value = gd_ptr->sum_container.get_Counter(1, *it_vector, 0, *it_c_vector); - if(c_value.get_valid() == VALID) - { - if(count_name_vector.empty()) - { - if((excl_time == 0.0) || (c_value.get_excl_value() == 0)) - rate = 0.0; - else - rate = ((double) c_value.get_excl_value()) / excl_time / MEGA; - } - else - { - it_c_name = count_name_vector.begin(); - while(it_c_name != count_name_vector.end()) - { - if(*it_c_name == *it_c_vector) - { - c_name = true; - break; - } - ++it_c_name; - } - if(c_name) - { - if(c_value.get_excl_value() == 0) - rate = 0.0; - else - rate = ((double) c_value.get_excl_value()) / MEGA; - } - else - { - if((excl_time == 0.0) || (c_value.get_excl_value() == 0)) - rate = 0.0; - else - rate = ((double) c_value.get_excl_value()) / excl_time / MEGA; - } - } - f_temp.count_map2[*it_c_vector] = rate; - - it_c_map1 = count_map1.find(*it_c_vector); - if(it_c_map1 == count_map1.end()) - { - count_temp c_temp; - c_temp.min = rate; - c_temp.max = rate; - count_map1.insert(pair<uint32_t,count_temp>(*it_c_vector,c_temp)); - } - else - { - if(it_c_map1->second.min == 0.0) - it_c_map1->second.min = rate; - else if(rate > 0.0) - it_c_map1->second.min = MINIMUM(rate,it_c_map1->second.min); - it_c_map1->second.max = MAXIMUM(rate,it_c_map1->second.max); - } - } - ++it_c_vector; - } - temp_map.insert(pair<const double,func_temp>(excl_time, f_temp)); - - min_invoc = MINIMUM(f_value.get_invoc(), min_invoc); - max_invoc = MAXIMUM(f_value.get_invoc(), max_invoc); - min_time[0] = MINIMUM(excl_time, min_time[0]); - max_time[0] = MAXIMUM(excl_time, max_time[0]); - min_time[1] = MINIMUM(incl_time, min_time[1]); - max_time[1] = MAXIMUM(incl_time, max_time[1]); - } - ++it_vector; - } - - /********************************** Top 50 of Function **********************************/ - /* How many functions in total*/ - - for(it_map = temp_map.begin(); it_map!=temp_map.end(); ++it_map) { - max++; - tmp.assign(gd_ptr->sum_container.get_Function_Def(1, it_map->second.func_id).get_name()); - if(tmp.size() > stellen) { - if(tmp.size() <= 20) stellen = (uint32_t) tmp.size(); else stellen = 20; - } - } - - min = gd_ptr->TOP_FUNC; - if(max < gd_ptr->TOP_FUNC) { - min = max; - } - - it_map = temp_map.begin(); - - out << "{\\Large \\bf Top " << min << " of " << max << " Functions}" << endl; - out << endl; - out << "\\bigskip" << endl; - out << endl; - out << "\\begin{longtable}{|l||r|r|r|}" << endl; - out << endl; - out << " \\hline" << endl; - out << " \\bf Function & \\bf invocations[\\#] & \\bf excl. time[sec] $\\nabla$ & " - << " \\bf incl. time[sec] \\\\" << endl; - out << " \\hline\\hline" << endl; - for(i = 1; i <= min; i++) - { - func_name.assign(gd_ptr->sum_container.get_Function_Def(1, it_map->second.func_id).get_name()); - //if(func_name.size() > 20) - func_name.resize(stellen,32); - - out << " \\verb|" << func_name << "| & "; - out.precision(2); - gd_ptr->sum_container.get_color(min_invoc, max_invoc, it_map->second.invoc, - red, green, blue); - out << "\\Print{" << red << "}{" << green << "}{" << blue << "}{" - << it_map->second.invoc << "} & "; - gd_ptr->sum_container.get_color(min_time[0], max_time[0], it_map->first, - red, green, blue); - out << "\\Print{" << red << "}{" << green << "}{" << blue << "}{"; - out.precision(6); - out << it_map->first << "} & "; - out.precision(2); - gd_ptr->sum_container.get_color(min_time[1], max_time[1], it_map->second.incl_time, - red, green, blue); - out << "\\Print{" << red << "}{" << green << "}{" << blue << "}{"; - out.precision(6); - out << it_map->second.incl_time << "} \\\\" << endl; - - if((i % 3) == 0) - out << " \\hline" << endl; - - ++it_map; - - if(it_map == temp_map.end()) - break; - } - out << " \\hline" << endl; - out << "\\end{longtable}" << endl; - out << endl; - out << "\\newpage" << endl; - out << endl; - - /********************************** Top 50 of Counter **********************************/ - - CountMap1::iterator it_c_tmp_map; - - if(!sum) { - - it_c_map1 = count_map1.begin(); - CountMap2::iterator it_c_map2; - int page = 1; - - while(it_c_map1 != count_map1.end()) - { - page = 1; - it_map_page = temp_map.begin(); - it_map = it_map_page; - - while(page <= gd_ptr->TOP_FUNC && it_map != temp_map.end()) - { - out << "{\\Large \\bf Top " << gd_ptr->TOP_FUNC << " of Counter [in Mega]}" << endl; - out << endl; - out << "\\bigskip" << endl; - out << endl; - out << "\\begin{tabular}{|l||r|}" << endl; - out << endl; - out << " \\hline" << endl; - out << " \\bf Function & \\bf excl. time[sec] \\\\" << endl; - out << " \\hline\\hline" << endl; - - it_map = it_map_page; - for(i = page; i <= gd_ptr->TOP_FUNC; i++) - { - func_name.assign(gd_ptr->sum_container.get_Function_Def(1, it_map->second.func_id).get_name()); - //if(func_name.size() > 20) - func_name.resize(stellen,32); - out << " \\verb|" << func_name << "| & " << endl; - gd_ptr->sum_container.get_color(min_time[0], max_time[0], it_map->first, - red, green, blue); - out << "\\Print{" << red << "}{" << green << "}{" << blue << "}{"; - out.precision(6); - out << it_map->first << "}\\\\" << endl; - if((i % 3) == 0) - out << " \\hline" << endl; - ++it_map; - if((it_map == temp_map.end()) || ((i % 54) == 0)) - break; - } - out << " \\hline" << endl; - out << "\\end{tabular}" << endl; - - it_map = it_map_page; - help = 1; - i = page; - while((help <= 2) && (it_c_map1 != count_map1.end())) - { - if((i % 54) == 1) - { - count_name.assign(gd_ptr->sum_container.get_Counter_Def(1, it_c_map1->first).get_name()); - if(count_name.size() > 20) - count_name.resize(20); - out << "\\begin{tabular}{r|}" << endl; - out << endl; - out << " \\hline" << endl; - - c_name = false; - if(count_name_vector.empty()) - { - out << " \\bf\\verb|" << count_name << " #/sec| \\\\" << endl; - } - else - { - it_c_name = count_name_vector.begin(); - while(it_c_name != count_name_vector.end()) - { - if(*it_c_name == it_c_map1->first) - { - c_name = true; - break; - } - ++it_c_name; - } - if(c_name) - { - out << " \\bf\\verb|" << count_name << " #| \\\\" << endl; - } - else - { - out << " \\bf\\verb|" << count_name << " #/sec| \\\\" << endl; - } - } - out << " \\hline\\hline" << endl; - } - - it_c_map2 = it_map->second.count_map2.find(it_c_map1->first); - if((it_c_map2 == it_map->second.count_map2.end()) || (it_c_map2->second == 0.0)) - { - out << " no value\\\\" << endl; - } - else - { - out.precision(2); - gd_ptr->sum_container.get_color(it_c_map1->second.min, it_c_map1->second.max, - it_c_map2->second, red, green, blue); - out << " \\Print{" << red << "}{" << green << "}{" << blue << "}{"; - out.precision(6); - out << it_c_map2->second << "}\\\\" << endl; - } - - if((i % 3) == 0) - out << " \\hline" << endl; - - ++it_map; - ++i; - - if((it_map == temp_map.end()) || (i > gd_ptr->TOP_FUNC) || ((i % 54) == 1)) - { - ++help; - - out << " \\hline" << endl; - out << "\\end{tabular}" << endl; - it_c_tmp_map = count_map1.end(); - --it_c_tmp_map; - if((help > 2) || (it_c_map1 == it_c_tmp_map)) - { - it_map_page = it_map; - page = i; - out << "\\newpage" << endl; - out << endl; - if((i % 54) == 1) { - if(it_c_map1 != it_c_tmp_map) { - --it_c_map1; - } - help = 1; - break; - } - else { - ++it_c_map1;} - } - else - { - it_map = it_map_page; - i = page; - ++it_c_map1; - } - } - } - } - out << "\\newpage" << endl; - out << endl; - } - } - - return 0; -} - -/******************************************* P2P *******************************************/ - - /************************************ tex_p2p_values ************************************/ - -int tex_p2p_values(vector<uint32_t> proc_vector, fstream& out, global_data* gd_ptr, - double ticks, uint32_t range, int type) -{ - P2P_Value p2p_value; - float red,green,blue; // color values for rgb - double min = (double)((uint64_t) - 1); - double max = 0.0; - double min_var = (double)((uint64_t) - 1); - double max_var = 0.0; - double value = 0.0; - double value_field[16][16][5];// 0 = value, 1 = min_value_local, 2 = max_value_local, 3 = count, 4 = value² - string proc_name1[16]; - string proc_name2[16]; - - for(int j = 0; j < 16; j++) - { - proc_name1[j].assign(" "); - proc_name2[j].assign(" "); - for(int k = 0; k < 16; k++) - { - for(int l = 0; l < 5; l++) - { - if(l == 1) - value_field[j][k][l] = (double)((uint64_t) - 1); - else - value_field[j][k][l] = 0.0; - } - } - } - vector<uint32_t>::iterator it_vector = proc_vector.begin(); - vector<uint32_t>::iterator it_vector2; - int count1 = 16; // 15 is the first process group in value field and 0 is the last - int count2 = 16; // 15 is the first process group in value field and 0 is the last - double j = 0.0; - double k = 0.0; - int help1 = (int) proc_vector.size(); - int help2; - - while(it_vector != proc_vector.end()) - { - for(j = 0.0; j < ((double) help1 / (double) count1); j++) - { - if(j == 0.0) - proc_name1[16 - count1].assign(gd_ptr->sum_container.get_Process_Def(1, *it_vector)); - it_vector2 = proc_vector.begin(); - count2 = 16; - help2 = (int) proc_vector.size(); - - while(it_vector2 != proc_vector.end()) - { - for(k = 0.0; k < ((double) help2 / (double) count2); k++) - { - - p2p_value = gd_ptr->sum_container.get_P2P(1, *it_vector, *it_vector2, 0, 0); - if((p2p_value.get_time() > 0) && (p2p_value.get_length() > 0)) - { - switch(type) - { - case P2P_AV_RAT : value = (double) p2p_value.get_length() / - ((double) p2p_value.get_time() / ticks);break; - case P2P_AV_DUR : value = ((double) p2p_value.get_time() / - (double) p2p_value.get_invoc()) / ticks;break; - case P2P_AV_LEN : value = (double) p2p_value.get_length() / - (double) p2p_value.get_invoc();break; - case P2P_SUM_DUR : value = (double) p2p_value.get_time() / ticks;break; - case P2P_SUM_LEN : value = (double) p2p_value.get_length();break; - default : cerr << "Error in tex_p2p_values().Wrong type." - << endl; - return 1; - } - } - else - value = 0.0; - value_field[16 - count1][16 - count2][3] += 1.0; - value_field[16 - count1][16 - count2][0] += value; - if(value_field[16 - count1][16 - count2][0] > 0.0) - { - value_field[16 - count1][16 - count2][1] = MINIMUM(value_field[16 - count1][16 - count2][1], value); - value_field[16 - count1][16 - count2][2] = MAXIMUM(value_field[16 - count1][16 - count2][2], value); - - if(gd_ptr->var) - { - value_field[16 - count1][16 - count2][4] += value * value; - } - min = MINIMUM(min, value); - max = MAXIMUM(max, value); - } - - ++it_vector2; - } - --it_vector2; - proc_name2[16 - count2].assign(gd_ptr->sum_container.get_Process_Def(1, *it_vector2)); - ++it_vector2; - help2 -= (int) k; - if(count2 < 1) - cerr << "Error in tex_p2p(). Wrong count2 value." << endl; - --count2; - } - - ++it_vector; - } - help1 -= (int) j; - if(count1 < 1) - cerr << "Error in tex_p2p(). Wrong count1 value." << endl; - --count1; - } - - switch(type) - { - case P2P_AV_RAT : out << "{\\Large \\bf P2P - Message Rate (average)}" << endl;break; - case P2P_AV_DUR : out << "{\\Large \\bf P2P - Message Duration (average)}" << endl;break; - case P2P_AV_LEN : out << "{\\Large \\bf P2P - Message Length (average)}" << endl;break; - case P2P_SUM_DUR : out << "{\\Large \\bf P2P - Message Duration (sum)}" << endl;break; - case P2P_SUM_LEN : out << "{\\Large \\bf P2P - Message Length (sum)}" << endl;break; - default : cerr << "Error in tex_p2p_values.Wrong type." << endl; return 1; - } - out << "\\bigskip" << endl; - out << "\\bigskip" << endl; - if(max <= 0.0) - { - out << "no values" << endl; - out << "\\newpage" << endl; - out << endl; - - return 0; - } - out << "\\bigskip" << endl; - out << "\\bigskip" << endl; - out << "\\bigskip" << endl; - out << endl; - out << "\\begin{help}" << endl; - out << "\\psset{xunit=0.75,yunit=0.75}" << endl; - out << "\\begin{pspicture}(0,-3)(16,13)" << endl; - out << " \\psgrid[subgriddiv=0,%" << endl; - out << " griddots=5,%" << endl; - out << " gridlabels=0](0,-3)(16,13)" << endl; - - if(gd_ptr->var && (proc_vector.size() > 16)) - { - min = (double)((uint64_t) - 1); - max = 0; - for(int j = 0; j < 16; j++) - { - for(int k = 0; k < 16; k++) - { - if(value_field[j][k][0] > 0.0) - { - value_field[j][k][0] = value_field[j][k][0] / value_field[j][k][3]; - min = MINIMUM(min,value_field[j][k][0]); - max = MAXIMUM(max,value_field[j][k][0]); - - if(value_field[j][k][3] == 1.0) - { - value_field[j][k][4] = 0; - } - else - { - value_field[j][k][4] = (value_field[j][k][4] - (value_field[j][k][3] * - value_field[j][k][0] * value_field[j][k][0])) / - (value_field[j][k][3] - 1.0); - value_field[j][k][4] = sqrt(value_field[j][k][4]); - } - min_var = MINIMUM(min_var, value_field[j][k][4]); - max_var = MAXIMUM(max_var, value_field[j][k][4]); - } - } - } - } - for(int l = 0; l < 16; l++) - { - for(int m = 0; m < 16; m++) - { - if(value_field[l][m][0] > 0.0) - { - if(gd_ptr->var && (proc_vector.size() > 16)) - { - if(!gd_ptr->vis) - { - gd_ptr->sum_container.get_gray(min_var, max_var, value_field[l][m][4], red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.73}{0.73}{" << (m + 0.5) << "}{" - << (12 - l + 0.5) << "}" << endl; - gd_ptr->sum_container.get_color(min, max, value_field[l][m][0], red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.5}{0.5}{" << (m + 0.5) << "}{" - << (12 - l + 0.5) << "}" << endl; - } - else - { - gd_ptr->sum_container.get_color(min, max, value_field[l][m][0], red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.73}{0.73}{" << (m + 0.5) << "}{" - << (12 - l + 0.5) << "}" << endl; - gd_ptr->sum_container.get_gray(min_var, max_var, value_field[l][m][4], red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.25}{0.5}{" << (m + 0.75) << "}{" - << (12 - l + 0.5) << "}" << endl; - } - } - else if(!gd_ptr->vis) - { - gd_ptr->sum_container.get_color(min, max, value_field[l][m][2], red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.73}{0.73}{" << (m + 0.5) << "}{" - << (12 - l + 0.5) << "}" << endl; - if(proc_vector.size() > 16) - { - gd_ptr->sum_container.get_color(min, max, value_field[l][m][1], red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.58}{0.58}{" << (m + 0.5) << "}{" - << (12 - l + 0.5) << "}" << endl; - gd_ptr->sum_container.get_color(min, max, (value_field[l][m][0] / value_field[l][m][3]), red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.43}{0.43}{" << (m + 0.5) << "}{" - << (12 - l + 0.5) << "}" << endl; - } - } - else - { - gd_ptr->sum_container.get_color(min, max, (value_field[l][m][0] / value_field[l][m][3]), red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.73}{0.73}{" << (m + 0.5) << "}{" - << (12 - l + 0.5) << "}" << endl; - if(proc_vector.size() > 16) - { - gd_ptr->sum_container.get_color(min, max, value_field[l][m][1], red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.25}{0.25}{" << (m + 0.75) << "}{" - << (12 - l + 0.25) << "}" << endl; - gd_ptr->sum_container.get_color(min, max, value_field[l][m][2], red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.25}{0.25}{" << (m + 0.75) << "}{" - << (12 - l + 0.75) << "}" << endl; - } - } - } - } - } - for(int l = 0; l < 16; l++) - { - if(proc_name1[l].size() > 15) - proc_name1[l].resize(15); - if(proc_vector.size() <= 16) - { - out << " \\rput[r](-0.2," << (12 - l + 0.5) << "){" << proc_name1[l] << "}" << endl; - out << " \\rput[l]{90}(" << (l + 0.5) << ",13.2){" << proc_name1[l] << "}" << endl; - } - else - { - if(proc_name2[l].size() > 15) - proc_name2[l].resize(15); - out << " \\rput[r](-0.2," << (12 - l + 0.8) << "){" << proc_name1[l] << "}" << endl; - out << " \\rput[r](-0.2," << (12 - l + 0.5) << "){-}" << endl; - out << " \\rput[r](-0.2," << (12 - l + 0.2) << "){" << proc_name2[l] << "}" << endl; - out << " \\rput[l]{90}(" << (l + 0.2) << ",13.2){" << proc_name1[l] << "}" << endl; - out << " \\rput[l]{90}(" << (l + 0.5) << ",13.2){-}" << endl; - out << " \\rput[l]{90}(" << (l + 0.8) << ",13.2){" << proc_name2[l] << "}" << endl; - l++; - } - } - out << endl; - /******************** color scale for P2P - value rate plot ********************/ - - double factor = (max - min) / (double) range; - double temp = min; - const char* scale_unit; - double unit; - j = 0.0; - out.precision(3); - if((type == P2P_AV_DUR) || (type == P2P_SUM_DUR)) - { - double scale_index = (max - min) / 2.0; - if(scale_index < 0.1) - { - unit = 1; - scale_unit = SECOND; - out.precision(6); - } - else if(scale_index < KILO) - { - unit = 1; - scale_unit = SECOND; - } - else if(scale_index < MEGA) - { - unit = KILO; - scale_unit = K_SECOND; - } - else if(scale_index < GIGA) - { - unit = MEGA; - scale_unit = M_SECOND; - } - else - { - unit = GIGA; - scale_unit = G_SECOND; - } - } - else - { - double scale_index = (max - min) / 2.0; - if(scale_index < KBYTE) - { - unit = _BYTE; - if(type == P2P_AV_RAT) - scale_unit = BYTE_SEC; - else - scale_unit = BYTE_TEXT; - } - else if(scale_index < MBYTE) - { - unit = KBYTE; - if(type == P2P_AV_RAT) - scale_unit = KBYTE_SEC; - else - scale_unit = KBYTE_TEXT; - } - else if(scale_index < GBYTE) - { - unit = MBYTE; - if(type == P2P_AV_RAT) - scale_unit = MBYTE_SEC; - else - scale_unit = MBYTE_TEXT; - } - else - { - unit = GBYTE; - if(type == P2P_AV_RAT) - scale_unit = GBYTE_SEC; - else - scale_unit = GBYTE_TEXT; - } - } - - for(uint32_t i = 1; i <= range; i++) - { - gd_ptr->sum_container.get_color(min, max, temp, red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.5}{0.5}{" << j << "}{" - << (-5) << "}" << endl; - out << " \\rput[r]{90}(" << j << "," << (-5.5) << "){" - << (temp / unit) << scale_unit << "}" << endl; - temp += factor; - j += 0.75; - if(min == max) - break; - } - - if(gd_ptr->var && (proc_vector.size() > 16)) - { - factor = (max_var - min_var) / (double) range; - temp = min_var; - j = 0.0; - - for(uint32_t i = 1; i <= range; i++) - { - gd_ptr->sum_container.get_gray(min_var, max_var, temp, red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.5}{0.5}{" << j << "}{" - << (-12) << "}" << endl; - out << " \\rput[r]{90}(" << j << "," << (-12.5) << "){" - << (temp / unit) << scale_unit << "}" << endl; - temp += factor; - j += 0.75; - if(min_var == max_var) - break; - } - } - if((proc_vector.size() > 16) && !gd_ptr->vis && !gd_ptr->var) - { - out << endl; - out << "\\PstDrawNode{1.000000}{0}{0}{1.46}{1.46}{0}{-11}" << endl; - out << "\\PstDrawNode{0}{0}{1.000000}{1.16}{1.16}{0}{-11}" << endl; - out << "\\PstDrawNode{0}{1}{0}{0.86}{0.86}{0}{-11}" << endl; - out << "\\psline{<-}(0.9,-10.4)(4,-10.4)" << endl; - out << "\\psline{<-}(0,-11.0)(4,-11)" << endl; - out << "\\psline{<-}(0.7,-11.6)(4,-11.6)" << endl; - out << "\\rput[l](4.5,-10.4){Maximum}" << endl; - out << "\\rput[l](4.5,-11){Average}" << endl; - out << "\\rput[l](4.5,-11.6){Minimum}" << endl; - } - if((proc_vector.size() > 16) && gd_ptr->vis && !gd_ptr->var) - { - out << endl; - out << "\\PstDrawNode{0}{1}{0}{1.46}{1.46}{0}{-11}" << endl; - out << "\\PstDrawNode{1.000000}{0}{0}{0.5}{0.5}{0.5}{-10.5}" << endl; - out << "\\PstDrawNode{0}{0}{1.000000}{0.5}{0.5}{0.5}{-11.5}" << endl; - out << "\\psline{<-}(0.7,-10.4)(4,-10.4)" << endl; - out << "\\psline{<-}(0,-11.0)(4,-11)" << endl; - out << "\\psline{<-}(0.7,-11.6)(4,-11.6)" << endl; - out << "\\rput[l](4.5,-10.4){Maximum}" << endl; - out << "\\rput[l](4.5,-11){Average}" << endl; - out << "\\rput[l](4.5,-11.6){Minimum}" << endl; - } - out << "\\end{pspicture}" << endl; - out << "\\end{help}" << endl; - out << endl; - out << "\\newpage" << endl; - out << endl; - - return 0; -} - - /**************************************** tex_p2p ****************************************/ - -int tex_p2p(fstream& out, global_data* gd_ptr, int tex, bool sum) -{ - string chart_name; - double ticks; - double value; - uint32_t i = 1; - uint32_t range = HUGE_TEX; //range of color-scale - float red,green,blue; // color values for rgb - - vector<uint32_t> proc_vector; - vector<uint32_t> bin1_vector; - vector<uint32_t> bin2_vector; - P2P_Value p2p_value; - - /* - gd_ptr->var == false - 0 = value_sent, 1 = min_value_sent, 2 = max_value_sent, 3 = value_receive, - 4 = min_value_receive, 5 = max_value_receive, 6 = number of processes - gd_ptr->var == true and > 16 processes - 0 = value_sent, 1 = value_sent², 2 = value_sent_standard degression , 3 = value_receive, - 4 = value_receive², 5 = value_receive_standard degression, 6 = number of processes - */ - double invoc[16][7]; - double length[16][7]; - string proc_name1[16]; - string proc_name2[16]; - - for(int j = 0; j < 16; j++) - { - proc_name1[j].assign(" "); - proc_name2[j].assign(" "); - for(int k = 0; k < 7; k++) - { - if(((k == 1) || (k == 4)) && !gd_ptr->var) - { - invoc[j][k] = (double)((uint64_t) - 1); - length[j][k] = (double)((uint64_t) - 1); - } - else - { - invoc[j][k] = 0.0; - length[j][k] = 0.0; - } - } - } - - int count = 16; // 15 is the first process group in value field and 0 is the last - double j = 0.0; - int help; - - double invocation; - double min; - double max = 0.0; - double max2 = 0.0; - - gd_ptr->sum_container.get_Process_Def_Key(1, proc_vector); - ticks = (double) gd_ptr->sum_container.get_ticks(1); - if(ticks < 1.0) - { - ticks = 1.0; - cerr << "Error in tex_p2p. No ticks given for this trace." << endl; - } - - - /* assign processes to 16 bins */ - - vector<uint32_t>::iterator it_vector = proc_vector.begin(); - help = (int) proc_vector.size(); - while(it_vector != proc_vector.end()) - { - - /* for all processes in current bin */ - for(j = 0.0; j < ((double) help / (double) count); j++) - { - - /* first process name in bin */ - if( 0.0 == j ) - { - proc_name1[16 - count].assign(gd_ptr->sum_container.get_Process_Def(1, *it_vector)); - } - - /* summ values to bin */ - - //send - p2p_value = gd_ptr->sum_container.get_P2P(1, *it_vector, 0, 0, 0); - value = (double) p2p_value.get_invoc(); - invoc[16 - count][0] += value; - if(gd_ptr->var && (proc_vector.size() > 16)) - { - invoc[16 - count][1] += value * value; - } - else - { - invoc[16 - count][1] = MINIMUM(invoc[16 - count][1], value); - invoc[16 - count][2] = MAXIMUM(invoc[16 - count][2], value); - } - max = MAXIMUM(max, value); - value = (double) p2p_value.get_length(); - length[16 - count][0] += value; - if(gd_ptr->var && (proc_vector.size() > 16)) - { - length[16 - count][1] += value * value; - } - else - { - length[16 - count][1] = MINIMUM(length[16 - count][1], value); - length[16 - count][2] = MAXIMUM(length[16 - count][2], value); - } - max2 = MAXIMUM(max2, value); - - //receive - - p2p_value = gd_ptr->sum_container.get_P2P(1, 0, *it_vector, 0, 0); - value = (double) p2p_value.get_invoc(); - invoc[16 - count][3] += value; - if(gd_ptr->var && (proc_vector.size() > 16)) - { - invoc[16 - count][4] += value * value; - } - else - { - invoc[16 - count][4] = MINIMUM(invoc[16 - count][4],value); - invoc[16 - count][5] = MAXIMUM(invoc[16 - count][5],value); - } - max = MAXIMUM(max, value); - value = (double) p2p_value.get_length(); - length[16 - count][3] += value; - if(gd_ptr->var && (proc_vector.size() > 16)) - { - length[16 - count][4] += value * value; - } - else - { - length[16 - count][4] = MINIMUM(length[16 - count][4], value); - length[16 - count][5] = MAXIMUM(length[16 - count][5], value); - } - - max2 = MAXIMUM(max2, value); - - invoc[16 - count][6] += 1.0; - length[16 - count][6] += 1.0; - ++it_vector; - } - - /* last process name in bin */ - - --it_vector; - proc_name2[16 - count].assign(gd_ptr->sum_container.get_Process_Def(1, *it_vector)); - ++it_vector; - - help -= (int) j; - if(count < 1) - cerr << "Error in tex_p2p(). Wrong count1 value." << endl; - --count; - } - - out.precision(2); - - if(max > 0) - { - chart_name = "Number of P2P Invocations (sum)"; - bar_data(out, invoc, gd_ptr->var, (uint32_t) proc_vector.size()); - bar_chart((uint64_t) max, out, proc_name1, proc_name2, (uint32_t) proc_vector.size(), chart_name, false, invoc, gd_ptr->var, sum); - } - - if(max2 > 0) - { - chart_name = "P2P Message Length (sum)[in Byte]"; - bar_data(out, length, gd_ptr->var, (uint32_t) proc_vector.size()); - bar_chart((uint64_t) max2, out, proc_name1, proc_name2, (uint32_t) proc_vector.size(), chart_name, true, length,gd_ptr->var, sum); - } - - - /* - ACHTUNG: 4-fach-Schleife in tex_p2p_values(...) --> kann bei hoher Anzahl an CPUs sehr langsam werden !!! - */ - /***************************** P2P - message value plots *****************************/ - - if(sum == false) { - if(tex == TEX_ALLPLOT) - { - for(i = P2P_AV_RAT; i < P2P_ALL; i++) - { - tex_p2p_values(proc_vector, out, gd_ptr, ticks, range, i); - } - } - else - tex_p2p_values(proc_vector, out, gd_ptr, ticks, range, P2P_AV_RAT); - - } - /*************************** P2P - message rate histogram ***************************/ - - if(sum == false) { - out.precision(6); - gd_ptr->sum_container.get_Bin1_Def_Key(1, bin1_vector); - gd_ptr->sum_container.get_Bin2_Def_Key(1, bin2_vector); - vector<uint32_t>::iterator it_bin1_vector; - vector<uint32_t>::iterator it_bin2_vector; - - map<uint32_t, map<uint32_t, double> > InvocMap; - map<uint32_t, map<uint32_t, double> >::iterator bin1_iter; - map<uint32_t, double>::iterator bin2_iter; - - min = 0.0; - max = 0.0; - it_bin1_vector = bin1_vector.begin(); - - while(it_bin1_vector != bin1_vector.end()) - { - it_bin2_vector = bin2_vector.begin(); - while(it_bin2_vector != bin2_vector.end()) - { - p2p_value = gd_ptr->sum_container.get_P2P(1, 0, 0, *it_bin1_vector, *it_bin2_vector); - invocation = (double) p2p_value.get_invoc(); - InvocMap[*it_bin1_vector][*it_bin2_vector] = invocation; - if(invocation > 0.0) - { - if(min == 0.0) - min = invocation; - else - min = MINIMUM(invocation,min); - max = MAXIMUM(invocation,max); - } - ++it_bin2_vector; - } - ++it_bin1_vector; - } - - out.precision(2); - out << "{\\Large \\bf P2P - message rate histogram}" << endl; - if(max <= 0.0) - { - out << "\\bigskip" << endl; - out << "\\bigskip" << endl; - out << "no values" << endl; - out << "\\newpage" << endl; - out << endl; - - return 0; - } - else - { - out << "\\bigskip" << endl; - out << endl; - out << "\\begin{help}" << endl; - out << "\\psset{xunit=0.5,yunit=0.25}" << endl; - out << "\\begin{pspicture}(25,33)" << endl; - out << " \\psgrid[subgriddiv=0,%" << endl; - out << " griddots=5,%" << endl; - out << " gridlabels=0,%" << endl; - out << " yunit=2](24,16)" << endl; - - it_bin1_vector = bin1_vector.begin(); - while(it_bin1_vector != bin1_vector.end()) - { - it_bin2_vector = bin2_vector.begin(); - while(it_bin2_vector != bin2_vector.end()) - { - /*p2p_value = gd_ptr->sum_container.get_P2P_new(1, 0, 0, *it_bin1_vector, *it_bin2_vector); - invocation = (double) p2p_value.get_invoc();*/ - invocation = InvocMap[*it_bin1_vector][*it_bin2_vector]; - if(invocation > 0.0) - { - gd_ptr->sum_container.get_color_gray(min, max, invocation, red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.48}{0.48}{" << (*it_bin1_vector - 0.5) << "}{" - << ((*it_bin2_vector * 2) - 1) << "}" << endl; - } - ++it_bin2_vector; - } - ++it_bin1_vector; - } - out << " \\psaxes[labels = no,axesstyle = axes,subticks=2,Ox=0,Oy=0,xylogBase=2,Dx=2,Dy=4]" - << "{->}(26,33)" - << endl; - for(i = 2; i <= 32; i += 2) - { - out << "\\psline{-}(-0.15," << (i - 1) << ")(0," << (i - 1) << ")" << endl; - if(i < 10) - { - out << " \\rput[r](-0.2," << (i - 1) << "){" << pow(2.0, (double) i) <<"}" << endl; - } - else if(i < 20) - { - out << " \\rput[r](-0.2," << (i - 1) << "){" << pow(2.0, (double) (i - 10)) << "K}"; - out << endl; - } - else if(i < 30) - { - out << " \\rput[r](-0.2," << (i - 1) << "){" << pow(2.0, (double) (i - 20)) << "M}"; - out << endl; - } - else - { - if(i == 32) - { - out << " \\rput[r](-0.2," << (i - 1) << "){$>$" << pow(2.0, (double) (i - 32)); - out << "G}" << endl; - } - else - { - out << " \\rput[r](-0.2," << (i - 1) << "){" << pow(2.0, (double) (i - 30)); - out << "G}" << endl; - } - } - } - for(i = 0; i <= 23; i++) - { - out << "\\psline{-}(" << ((double) i - 0.5) <<",-0.15)(" << ((double) i - 0.5); - out << ",0)" << endl; - if(i < 10) - { - out << " \\rput[r]{90}(" << ((double) i + 0.5) << ",-0.22,){"; - out << pow(2.0, (double) i) <<"}" << endl; - } - else if(i < 20) - { - out << " \\rput[r]{90}(" << ((double) i + 0.5) << ",-0.22,){"; - out << pow(2.0, (double) (i - 10)) << "K}" << endl; - } - else - { - if(i == 23) - { - out << " \\rput[r]{90}(" << ((double) i + 0.5) << ",-0.22,){$>$"; - out << pow(2.0, (double) (i - 21)) << "M}" << endl; - } - else - { - out << " \\rput[r]{90}(" << ((double) i + 0.5) << ",-0.22,){"; - out << pow(2.0, (double) (i - 20)) << "M}" << endl; - } - } - } - out << " \\rput{90}(-5,15){rate [byte/sec]}" << endl; - out << " \\rput{0}(13,-8){message length [byte]}" << endl; - - /******************* color scale for P2P - message rate histogram *******************/ - double factor = (max - min) / (double)range; - double temp = min; - for(i = 1; i <= range; i++) - { - gd_ptr->sum_container.get_color_gray(min, max, temp, red, green, blue); - out << " \\PstDrawNode{" << red << "}{" << green << "}{" << blue << "}" - << "{0.48}{0.48}{" << ((int) i - 1) << "}{" - << (-13) << "}" << endl; - out << " \\rput[r]{90}(" << ((int) i - 1) << "," << (-14.5) << "){" - << (uint64_t) temp << " \\#}" << endl; - temp += factor; - } - out << "\\end{pspicture}" << endl; - out << "\\end{help}" << endl; - out << endl; - out << "\\newpage" << endl; - out << endl; - out.precision(6); - } - - /**************************** P2P - message length histogram ****************************/ - max = 0.0; - it_bin1_vector = bin1_vector.begin(); - out << "\\def\\barData{"; - while(it_bin1_vector != bin1_vector.end()) - { - p2p_value = gd_ptr->sum_container.get_P2P(1, 0, 0, *it_bin1_vector, 0); - if(p2p_value.get_invoc() > 0) - { - out << endl; - invocation = log((double)p2p_value.get_invoc())/log(2.0); - max = MAXIMUM(invocation,max); - out << (*it_bin1_vector - 1) << " " << invocation; - } - ++it_bin1_vector; - } - - out << "}" << endl; - out << endl; - out << "{\\Large \\bf P2P - message length histogram}" << endl; - if(max <= 0.0) - { - out << "\\bigskip" << endl; - out << "\\bigskip" << endl; - out << "no values" << endl; - out << "\\newpage" << endl; - out << endl; - - return 0; - } - else - { - out << "\\bigskip" << endl; - out << endl; - out << "\\begin{help}" << endl; - out << "\\psset{xunit=0.5,yunit=0.6}" << endl; - out << "\\begin{pspicture}(25," << ((uint64_t) max) + 2 << ")" << endl; - out << " \\psgrid[subgriddiv=0,%" << endl; - out << " griddots=5,%" << endl; - out << " gridlabels=0,%" << endl; - out << " yunit=1](24," << ((uint32_t) max) + 1 << ")" << endl; - out << " \\psaxes[labels = no,axesstyle = axes,Ox=0,Oy=0,xylogBase=2,Dx=2,Dy=2]{->}(25," - << ((uint32_t) max) + 2 << ")" << endl; - out << " \\listplot[shadow=false,linecolor=blue,plotstyle=bar,barwidth=0.2cm," << endl; - out << " fillcolor=red,fillstyle=solid]{\\barData}" << endl; - out.precision(2); - for(i = 0; i <= ((uint32_t) max + 1); i += 2) - { - out << "\\psline{-}(-0.15," << i << ")(0," << i << ")" << endl; - if(i < 10) - { - out << " \\rput[r](-0.4," << i << "){" << pow(2.0, (double) i) <<"}" << endl; - } - else if(i < 20) - { - out << " \\rput[r](-0.4," << i << "){" << pow(2.0, (double) i) / KILO<< "K}"; - out << endl; - } - else if(i < 30) - { - out << " \\rput[r](-0.4," << i << "){" << pow(2.0, (double) i) / MEGA<< "M}"; - out << endl; - } - else - { - out << " \\rput[r](-0.4," << i << "){" << pow(2.0, (double) i) / GIGA; - out << "G}" << endl; - } - } - for(i = 0; i <= 24; i += 2) - { - out << "\\psline{-}(" << i <<",-0.15)(" << i; - out << ",0)" << endl; - if(i < 10) - { - out << " \\rput[r]{90}(" << i << ",-0.22,){"; - out << pow(2.0, (double) i) <<"}" << endl; - } - else if(i < 20) - { - out << " \\rput[r]{90}(" << i << ",-0.22,){"; - out << pow(2.0, (double) (i - 10)) << "K}" << endl; - } - else - { - if(i == 23) - { - out << " \\rput[r]{90}(" << i << ",-0.22,){$>$"; - out << pow(2.0, (double) (i - 20)) << "M}" << endl; - } - else - { - out << " \\rput[r]{90}(" << i << ",-0.22,){"; - out << pow(2.0, (double) (i - 20)) << "M}" << endl; - } - } - } - out.precision(6); - out << " \\rput{90}(-5," << ((uint32_t) ((max + 1.0) / 2)) << "){invocation[\\#]}" - << endl; - out << " \\rput{0}(12,-4){message length[byte]}" << endl; - out << "\\end{pspicture}" << endl; - out << "\\end{help}" << endl; - out << endl; - } - - } //my - - return 0; -} - -/*********************************** Collective Operation ***********************************/ - -int tex_collop(fstream& out, global_data* gd_ptr, bool sum) -{ - string chart_name; - double ticks; - double value; - int coll_type[4] = {OTF_COLLECTIVE_TYPE_ONE2ALL, OTF_COLLECTIVE_TYPE_ALL2ONE, - OTF_COLLECTIVE_TYPE_ALL2ALL, OTF_COLLECTIVE_TYPE_BARRIER}; - - vector<uint32_t> proc_vector; - CollOp_Value collop_value; - gd_ptr->sum_container.get_Process_Def_Key(1, proc_vector); - ticks = (double) gd_ptr->sum_container.get_ticks(1); - if(ticks < 1.0) - { - ticks = 1.0; - cerr << "Error in tex_collop. No ticks given for this trace." << endl; - } - - /* first dim. : 16 bins for processes - second dim. : 0 = one2all, 1 = all2one, 2 = all2all -> not used for barrier - third dim. : gd_ptr == false - 0 = value_sent, 1 = min_value_sent, 2 = max_value_sent, - 3 = value_receive, 4 = min_value_receive, - 5 = max_value_receive, 6 = number of processes - - gd_ptr == true - 0 = value_sent, 1 = value_sent², 2 = value_sent_standard degression, - 3 = value_receive, 4 = value_receive², - 5 = value_receive_standard degression, 6 = number of processes - - */ - double invoc[16][3][7]; - double length[16][3][7]; - double barrier[16][7]; - double help_invoc[16][7]; - double help_length[16][7]; - - string proc_name1[16]; - string proc_name2[16]; - - for(int j = 0; j < 16; j++) - { - proc_name1[j].assign(" "); - proc_name2[j].assign(" "); - - for(int l = 0; l < 3; l++) - { - for(int k = 0; k < 7; k++) - { - if(((k == 1) || (k == 4)) && !gd_ptr->var) - { - invoc[j][l][k] = (double)((uint64_t) - 1); - length[j][l][k] = (double)((uint64_t) - 1); - if(l == 0) - barrier[j][k] = (double)((uint64_t) - 1); - } - else - { - invoc[j][l][k] = 0.0; - length[j][l][k] = 0.0; - if(l == 0) - barrier[j][k] = 0.0; - } - } - } - } - - - int count = 16; // 15 is the first process group in value field and 0 is the last - double j = 0.0; - int help; - double time; - - /* 0 = one2all, 1 = all2one, 2 = all2all, 3 = barrier */ - double max1[4] = {0.0, 0.0, 0.0, 0.0}; - double max2[4] = {0.0, 0.0, 0.0, 0.0}; - - ticks = (double) gd_ptr->sum_container.get_ticks(1); - if(ticks < 1.0) - { - ticks = 1.0; - cerr << "Error in tex_p2p. No ticks given for this trace." << endl; - } - - - /* assign processes to 16 bins */ - - vector<uint32_t>::iterator it_vector = proc_vector.begin(); - help = (int) proc_vector.size(); - while(it_vector != proc_vector.end()) - { - - /* for all processes in current bin */ - for(j = 0.0; j < ((double) help / (double) count); j++) - { - - /* first process name in bin */ - if( 0.0 == j ) - { - proc_name1[16 - count].assign(gd_ptr->sum_container.get_Process_Def(1, *it_vector)); - } - - /* summ values to bin */ - - for(int l = 0; l <= 2; l++) - { - //send - - collop_value = gd_ptr->sum_container.get_CollOpType(1, *it_vector, coll_type[l]); - value = (double) collop_value.get_invoc_send(); - invoc[16 - count][l][0] += value; - if(gd_ptr->var && (proc_vector.size() > 16)) - { - invoc[16 - count][l][1] += value * value; - } - else - { - invoc[16 - count][l][1] = MINIMUM(invoc[16 - count][l][1],value); - invoc[16 - count][l][2] = MAXIMUM(invoc[16 - count][l][2],value); - } - max1[l] = MAXIMUM(max1[l], value); - value = (double) collop_value.get_length_send(); - length[16 - count][l][0] += value; - if(gd_ptr->var && (proc_vector.size() > 16)) - { - length[16 - count][l][1] += value * value; - } - else - { - length[16 - count][l][1] = MINIMUM(length[16 - count][l][1],value); - length[16 - count][l][2] = MAXIMUM(length[16 - count][l][2],value); - } - max2[l] = MAXIMUM(max2[l], value); - - //receive - - value = (double) collop_value.get_invoc_receive(); - invoc[16 - count][l][3] += value; - if(gd_ptr->var && (proc_vector.size() > 16)) - { - invoc[16 - count][l][4] += value * value; - } - else - { - invoc[16 - count][l][4] = MINIMUM(invoc[16 - count][l][4],value); - invoc[16 - count][l][5] = MAXIMUM(invoc[16 - count][l][5],value); - } - max1[l] = MAXIMUM(max1[l], value); - value = (double) collop_value.get_length_receive(); - length[16 - count][l][3] += value; - if(gd_ptr->var && (proc_vector.size() > 16)) - { - length[16 - count][l][4] += value * value; - } - else - { - length[16 - count][l][4] = MINIMUM(length[16 - count][l][4],value); - length[16 - count][l][5] = MAXIMUM(length[16 - count][l][5],value); - } - max2[l] = MAXIMUM(max2[l], value); - invoc[16 - count][l][6] += 1.0; - length[16 - count][l][6] += 1.0; - } - collop_value = gd_ptr->sum_container.get_CollOpType(1, *it_vector, coll_type[3]); - value = (double) collop_value.get_invoc_send(); - barrier[16 - count][0] += value; - if(gd_ptr->var && (proc_vector.size() > 16)) - { - barrier[16 - count][1] += value * value; - } - else - { - barrier[16 - count][1] = MINIMUM(barrier[16 - count][1],value); - barrier[16 - count][2] = MAXIMUM(barrier[16 - count][2],value); - } - time = (double) collop_value.get_time() / ticks; - barrier[16 - count][3] += time; - if(gd_ptr->var && (proc_vector.size() > 16)) - { - barrier[16 - count][4] += time * time; - } - else - { - barrier[16 - count][4] = MINIMUM(barrier[16 - count][4], time); - barrier[16 - count][5] = MAXIMUM(barrier[16 - count][5], time); - } - barrier[16 - count][6] += 1.0; - max1[3] = MAXIMUM(max1[3], value); - max2[3] = MAXIMUM(max2[3], time); - - ++it_vector; - } - - /* last process name in bin */ - - --it_vector; - proc_name2[16 - count].assign(gd_ptr->sum_container.get_Process_Def(1, *it_vector)); - ++it_vector; - - help -= (int) j; - if(count < 1) - cerr << "Error in tex_collop(). Wrong count1 value." << endl; - --count; - } - - out.precision(2); - for(int l = 0; l <= 2; l++) - { - if(max1[l] == 0.0) - { - switch(l) - { - case 0 : chart_name = "ONE2ALL(sum)";break; - case 1 : chart_name = "ALL2ONE (sum)";break; - case 2 : chart_name = "ALL2ALL (sum)";break; - default: cerr << "Error in tex_collop.Wrong value in switch statement. " << endl; - } - continue; - } - for(int k = 0; k < 16; k++) - { - for(int m = 0; m < 7; m++) - { - help_invoc[k][m] = invoc[k][l][m]; - help_length[k][m] = length[k][l][m]; - } - } - switch(l) - { - case 0 : chart_name = "ONE2ALL Invocation (sum)";break; - case 1 : chart_name = "ALL2ONE Invocation (sum)";break; - case 2 : chart_name = "ALL2ALL Invocation (sum)";break; - default: cerr << "Error in tex_collop.Wrong value in switch statement. " << endl; - } - bar_data(out, help_invoc, gd_ptr->var, (uint32_t) proc_vector.size()); - bar_chart((uint64_t) max1[l], out, proc_name1, proc_name2, (uint32_t) proc_vector.size(), chart_name, false, help_invoc,gd_ptr->var, sum); - - switch(l) - { - case 0 : chart_name = "ONE2ALL Message Length (sum)[in Byte]";break; - case 1 : chart_name = "ALL2ONE Message Length (sum)[in Byte]";break; - case 2 : chart_name = "ALL2ALL Message Length (sum)[in Byte]";break; - default: cerr << "Error in tex_collop.Wrong value in switch statement. " << endl; - } - bar_data(out, help_length, gd_ptr->var, (uint32_t) proc_vector.size()); - bar_chart((uint64_t) max2[l], out, proc_name1, proc_name2, (uint32_t) proc_vector.size(), chart_name, true, help_length, gd_ptr->var, sum); - } - - /******************************* Barrier *******************************/ - - if(gd_ptr->var && proc_vector.size()) - { - double max_help[2] = {max1[3],max2[3]}; - if(gd_ptr->var && (proc_vector.size() > 16)) - { - double help_lok; - for(int k = 0; k < 16; k++) - { - if((barrier[k][0] > 0) && (barrier[k][6] > 1)) - { - - help_lok = barrier[k][0] / barrier[k][6]; - barrier[k][2] = (barrier[k][1] -( barrier[k][6] * help_lok * help_lok)) / (barrier[k][6] - 1.0); - barrier[k][2] = sqrt(barrier[k][2]); - max1[3] = MAXIMUM(max1[3], max_help[0] + barrier[k][2]); - } - else - { - barrier[k][2] = 0; - } - if((barrier[k][3] > 0) && (barrier[k][6] > 1)) - { - help_lok = barrier[k][3] / barrier[k][6]; - barrier[k][5] = (barrier[k][4] - (barrier[k][6] * help_lok * help_lok)) / - (barrier[k][6] - 1.0); - barrier[k][5] = sqrt(barrier[k][5]); - max2[3] = MAXIMUM(max2[3], max_help[1] + barrier[k][5]); - } - else - { - barrier[k][5] = 0; - } - } - } - } - /************************ Barrier Invocation ************************/ - double help_barrier; - double test_barrier; - float pos; - - if(!gd_ptr->var && (proc_vector.size() > 16)) - pos = 0.6f; - else - pos = 0.5f; - if(max1[3] == 0.0) - { - return 0; - } - if(!gd_ptr->var && (proc_vector.size() > 16)) - { - out << "\\def\\bardataI" << endl; - out << "{" << endl; - for(int k = 0; k < 16; k++) - { - if(barrier[k][2] > 0) - out << (k + 0.5) << " " << (log(barrier[k][2])/log(2.0) + 1) << endl; - } - out << "}" << endl; - } - out << "\\def\\bardataII" << endl; - out << "{" << endl; - - for(int k = 0; k < 16; k++) - { - if(barrier[k][0] > 0) - { - help_barrier = barrier[k][0] / barrier[k][6]; - if(barrier[k][0] < 1) - out << (k + pos) << " " << help_barrier << endl; - else - out << (k + pos) << " " << (log(help_barrier)/log(2.0) + 1) << endl; - } - } - out << "}" << endl; - if(!gd_ptr->var && (proc_vector.size() > 16)) - { - out << "\\def\\bardataIII" << endl; - out << "{" << endl; - for(int k = 0; k < 16; k++) - { - if(barrier[k][1] > 0) - out << (k + 0.8) << " " << (log(barrier[k][1])/log(2.0) + 1) << endl; - } - out << "}" << endl; - } - - out << "{\\Large \\bf Barrier Invocation [sum]}" << endl; - out << endl; - out << "\\bigskip" << endl; - out << "\\bigskip" << endl; - out << "\\bigskip" << endl; - out << endl; - out << "\\begin{help}" << endl; - out << "\\psset{xunit=1,yunit=0.5}" << endl; - out << "\\begin{pspicture}(0,0)(16," << ((uint64_t) log(max1[3])/log(2.0) + 2) << ")" << endl; - out << " \\psaxes[labels=no,Oy=-1,ysubticks=2,ylogBase=2,Dy=2,ytickwidth=1pt," << endl; - out << " ysubtickwidth=1pt,xticksize=-1 " << ((uint64_t) log(max1[3])/log(2.0) + 2) - << ",yticksize=0 16,ysubticksize=1," << endl; - out << " yticklinestyle=dotted,ysubticklinestyle=dotted]{-}(0,0)(0,0)(16.1," - << ((uint64_t) log(max1[3])/log(2.0) + 2) << ")" << endl; - count = 1; - out << " \\rput[r](-0.2,0){0}" << endl; - uint64_t i; - for(i = 1; i <= ((uint64_t) max1[3])<<1; i <<= 1) - { - out << "\\psline{-}(-0.15," << count << ")(0," << count << ")" << endl; - if(i < KBYTE) - { - out << " \\rput[r](-0.2," << count << "){" << i <<"}" << endl; - } - else if(i < MBYTE) - { - out << " \\rput[r](-0.2," << count << "){" << (i / KILO) << "K}" << endl; - } - else if(i < GBYTE) - { - out << " \\rput[r](-0.2," << count << "){" << (i / MEGA) << "M}" << endl; - } - else - { - out << " \\rput[r](-0.2," << count << "){" << (i / GIGA) << "G}" << endl; - } - count += 1; - } - if(!gd_ptr->var && (proc_vector.size() > 16)) - { - out << " \\listplot[shadow=false,plotstyle=bar,barwidth=0.8," << endl; - out << " fillcolor=red,fillstyle=solid]{\\bardataI}" << endl; - out << " \\listplot[shadow=false,plotstyle=bar,barwidth=0.6," << endl; - out << " fillcolor=green,fillstyle=solid]{\\bardataII}" << endl; - out << " \\listplot[shadow=false,plotstyle=bar,barwidth=0.2," << endl; - out << " fillcolor=blue,fillstyle=solid]{\\bardataIII}" << endl; - } - else - { - out << " \\listplot[shadow=false,plotstyle=bar,barwidth=0.8," << endl; - out << " fillcolor=green,fillstyle=solid]{\\bardataII}" << endl; - } - - if(gd_ptr->var && (proc_vector.size() > 16)) - { - for(int k = 0; k < 16; k++) - { - if(barrier[k][0] > 0) - { - help_barrier = barrier[k][0] / barrier[k][6]; - out << "\\psframe[fillstyle=solid,fillcolor=lightgray](" << (k + 0.4) << ","; - if(help_barrier < barrier[k][2]) - out << "0"; - else - { - if((test_barrier = help_barrier - barrier[k][2]) < 1) - out << test_barrier; - else - out << log(test_barrier)/log(2.0) + 1; - } - out << ")(" << (k + 0.6) << ","; - test_barrier = help_barrier + barrier[k][2]; - if(test_barrier < 1) - out << test_barrier; - else - out << log(test_barrier)/log(2.0) + 1; - out << ")" << endl; - } - } - } - - for(int k = 0; k < 16; k++) - { - if(proc_name1[k].size() > 15) - { - proc_name1[k].resize(15); - } - if(proc_vector.size() <= 16) - { - out << " \\rput[r]{90}(" << (k + 0.5) << ",-0.2){" << proc_name1[k] << "}" << endl; - } - else - { - if(proc_name2[k].size() > 15) - { - proc_name2[k].resize(15); - } - out << " \\rput[r]{90}(" << (k + 0.2) << ",-0.2){" << proc_name1[k] << "}" << endl; - out << " \\rput[r]{90}(" << (k + 0.5) << ",-0.2){-}" << endl; - out << " \\rput[r]{90}(" << (k + 0.8) << ",-0.2){" << proc_name2[k] << "}" << endl; - k++; - } - } - if(!gd_ptr->var && (proc_vector.size() > 16)) - { - out << " \\fnode[framesize=0.2 0.2,fillstyle=solid,fillcolor=red,linecolor=black](0,-7){Y}" << endl; - out << " \\rput[l](0.2,-7.0){Maximum}" << endl; - out << " \\fnode[framesize=0.2 0.2,fillstyle=solid,fillcolor=green,linecolor=black](0,-7.7){Y}" << endl; - out << " \\rput[l](0.2,-7.7){Average}" << endl; - out << " \\fnode[framesize=0.2 0.2,fillstyle=solid,fillcolor=blue,linecolor=black](0,-8.4){Y}" << endl; - out << " \\rput[l](0.2,-8.4){Minimum}" << endl; - } - out << "\\end{pspicture}" << endl; - out << "\\end{help}" << endl; - out << "\\newpage" << endl; - - /************************ Barrier Duration ************************/ - - if(sum) return 0; - if(!gd_ptr->var && (proc_vector.size() > 16)) - { - out << "\\def\\bardataI" << endl; - out << "{" << endl; - for(int k = 0; k < 16; k++) - { - if(barrier[k][5] > 0) - out << (k + 0.5) << " " << (log10(barrier[k][5] * MEGA) + 1) << endl; - } - out << "}" << endl; - } - out << "\\def\\bardataII" << endl; - out << "{" << endl; - for(int k = 0; k < 16; k++) - { - if(barrier[k][3] > 0) - { - help_barrier = barrier[k][3] / barrier[k][6] * MEGA; - if(help_barrier < 1) - out << (k + pos) << " " << help_barrier << endl; - else - out << (k + pos) << " " << (log10(help_barrier) + 1) << endl; - } - } - out << "}" << endl; - if(!gd_ptr->var && (proc_vector.size() > 16)) - { - out << "\\def\\bardataIII" << endl; - out << "{" << endl; - for(int k = 0; k < 16; k++) - { - if(barrier[k][4] > 0) - out << (k + 0.8) << " " << (log10(barrier[k][4] * MEGA) + 1) << endl; - } - out << "}" << endl; - } - out << "{\\Large \\bf Barrier Duration (sum)[in seconds]}" << endl; - out << endl; - out << "\\bigskip" << endl; - out << "\\bigskip" << endl; - out << "\\bigskip" << endl; - out << endl; - out << "\\begin{help}" << endl; - out << "\\psset{xunit=1,yunit=0.5}" << endl; - out << "\\begin{pspicture}(0,0)(16," << ((uint64_t) log10(max2[3] * MEGA) + 3) << ")" << endl; - out << " \\psaxes[labels=no,Oy=-1,ysubticks=2,ylogBase=10,Dy=2,ytickwidth=1pt," << endl; - out << " ysubtickwidth=1pt,xticksize=-1 " - << ((uint64_t) log10(max2[3] * MEGA) + 3) - << ",yticksize=0 16,ysubticksize=1," << endl; - out << " yticklinestyle=dotted,ysubticklinestyle=dotted]{-}(0,0)(0,0)(16.1," - << ((uint64_t) log10(max2[3] * MEGA) + 3) << ")" << endl; - count = 1; - out << " \\rput[r](-0.2,0){0}" << endl; - double m; - for(m = 0.000001; m <= (max2[3]*100); m *= 10) - { - out << "\\psline{-}(-0.15," << count << ")(0," << count << ")" << endl; - if(m < 1) - { - switch(count) - { - case 1 : out.precision(6);break; - case 2 : out.precision(5);break; - case 3 : out.precision(4);break; - case 4 : out.precision(3);break; - case 5 : out.precision(2);break; - case 6 : out.precision(1);break; - } - out << " \\rput[r](-0.2," << count << "){" << m <<"}" << endl; - } - else if(m < KILO) - { - out << " \\rput[r](-0.2," << count << "){" << (uint64_t) m <<"}" << endl; - } - else if(m < MEGA) - { - out << " \\rput[r](-0.2," << count << "){" << (uint64_t) (m / KILO) << "K}" << endl; - } - else if(m < GIGA) - { - out << " \\rput[r](-0.2," << count << "){" << (uint64_t) (m / MEGA) << "M}" << endl; - } - else - { - out << " \\rput[r](-0.2," << count << "){" << (uint64_t) (m / GIGA) << "G}" << endl; - } - count += 1; - } - if(!gd_ptr->var && (proc_vector.size() > 16)) - { - out << " \\listplot[shadow=false,plotstyle=bar,barwidth=0.8," << endl; - out << " fillcolor=red,fillstyle=solid]{\\bardataI}" << endl; - out << " \\listplot[shadow=false,plotstyle=bar,barwidth=0.6," << endl; - out << " fillcolor=green,fillstyle=solid]{\\bardataII}" << endl; - out << " \\listplot[shadow=false,plotstyle=bar,barwidth=0.2," << endl; - out << " fillcolor=blue,fillstyle=solid]{\\bardataIII}" << endl; - } - else - { - out << " \\listplot[shadow=false,plotstyle=bar,barwidth=0.8," << endl; - out << " fillcolor=green,fillstyle=solid]{\\bardataII}" << endl; - } - - if(gd_ptr->var && (proc_vector.size() > 16)) - { - for(int k = 0; k < 16; k++) - { - if(barrier[k][3] > 0) - { - help_barrier = barrier[k][3] / barrier[k][6]; - out << "\\psframe[fillstyle=solid,fillcolor=lightgray](" << (k + 0.4) << ","; - if(help_barrier < barrier[k][5]) - out << "0"; - else - { - if((test_barrier = (help_barrier - barrier[k][5]) * MEGA) < 1) - out << test_barrier; - else - out << log10(test_barrier) + 1; - } - out << ")(" << (k + 0.6) << ","; - test_barrier = (help_barrier + barrier[k][5]) * MEGA; - if(test_barrier < 1) - out << test_barrier; - else - out << log10(test_barrier) + 1; - out << ")" << endl; - } - } - } - - for(int k = 0; k < 16; k++) - { - if(proc_name1[k].size() > 15) - { - proc_name1[k].resize(15); - } - if(proc_vector.size() <= 16) - { - out << " \\rput[r]{90}(" << (k + 0.5) << ",-0.2){" << proc_name1[k] << "}" << endl; - } - else - { - if(proc_name2[k].size() > 15) - { - proc_name2[k].resize(15); - } - out << " \\rput[r]{90}(" << (k + 0.2) << ",-0.2){" << proc_name1[k] << "}" << endl; - out << " \\rput[r]{90}(" << (k + 0.5) << ",-0.2){-}" << endl; - out << " \\rput[r]{90}(" << (k + 0.8) << ",-0.2){" << proc_name2[k] << "}" << endl; - k++; - } - } - if(!gd_ptr->var && (proc_vector.size() > 16)) - { - out << " \\fnode[framesize=0.2 0.2,fillstyle=solid,fillcolor=red,linecolor=black](0,-7){Y}" << endl; - out << " \\rput[l](0.2,-7.0){Maximum}" << endl; - out << " \\fnode[framesize=0.2 0.2,fillstyle=solid,fillcolor=green,linecolor=black](0,-7.7){Y}" << endl; - out << " \\rput[l](0.2,-7.7){Average}" << endl; - out << " \\fnode[framesize=0.2 0.2,fillstyle=solid,fillcolor=blue,linecolor=black](0,-8.4){Y}" << endl; - out << " \\rput[l](0.2,-8.4){Minimum}" << endl; - } - out << "\\end{pspicture}" << endl; - out << "\\end{help}" << endl; - - return 0; -} - -/***************************************** prod_tex *****************************************/ - -int prod_tex(int tex, global_data* gd_ptr, vector<string> counter_names, bool sum) -{ - fstream out((gd_ptr->filename_path + "_result.tex").c_str(), ios::out | ios::trunc); - out.setf(ios::fixed, ios::floatfield); - out.precision(6); - - tex_header(out, gd_ptr); - - if((tex == TEX_ALL) || (tex == TEX_FUNC) || (tex == TEX_ALLPLOT)) - tex_func(out, gd_ptr, counter_names, sum); - - out << "\\newpage" << endl; - - if((tex == TEX_ALL) || (tex == TEX_P2P) || (tex == TEX_ALLPLOT)) - tex_p2p(out, gd_ptr, tex, sum); - - out << "\\newpage" << endl; - - if((tex == TEX_ALL) || (tex == TEX_COLLOP) || (tex == TEX_ALLPLOT)) - tex_collop(out, gd_ptr, sum); - - tex_foot(out); - out.close(); - - return 0; -} diff --git a/externals/otf/tools/otfprofile/Prodtex.h b/externals/otf/tools/otfprofile/Prodtex.h deleted file mode 100644 index 6417732d878284fd0127dd2c52d80ea80f65f868..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/Prodtex.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#ifndef PRODTEX_H -#define PRODTEX_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <algorithm> -#include <cmath> -#include <map> -#if defined(HAVE_UNISTD_H) && HAVE_UNISTD_H -# include <unistd.h> -#endif - -#include "OTF_inttypes.h" - -#include "Handler.h" - - -using namespace std; - -typedef map<uint32_t,double> CountMap2; - -struct func_temp -{ - uint32_t func_id; - uint64_t invoc; - double incl_time; - CountMap2 count_map2; -}; - -struct count_temp -{ - double min; - double max; -}; - -int prod_tex(int tex, global_data* gd_ptr, vector<string> counter_names, bool sum); - -#endif /* PRODTEX_H */ diff --git a/externals/otf/tools/otfprofile/Summary.cpp b/externals/otf/tools/otfprofile/Summary.cpp deleted file mode 100644 index d16411660595fd4535c7a33cca8ae23923da74bc..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/Summary.cpp +++ /dev/null @@ -1,275 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#include "Summary.h" - - -using namespace std; - -/*********************** methodes of the class Process ***********************************/ - -/* fills the stack with functions, which have an enter event on this Process */ - -void Process::set_exclTime(uint32_t func, uint64_t time) -{ - exclt_str e_str; - e_str.func_id = func; - e_str.time = time; - e_str.diff_time = 0; - exclt_stack.push(e_str); -} - -/* returns the time, which has to differ from the leave time */ - -int Process::get_exclTime(uint32_t func, uint32_t process, uint64_t time, global_data* gd_ptr) -{ - if(time < gd_ptr->min_time) - { - exclt_stack.pop(); - return 0; - } - exclt_str e_str; - uint64_t incl_time; - uint64_t counter_incl_value, counter_excl_value; - - if ( exclt_stack.empty() == true) { - /* time for error output */ - /* more leave than enter records */ - cerr << "call stack on process " << process << " invalid: stray Leave " - << func << " at time stamp " << time << " == " << hex << time << dec << endl; - return 1; - } - - e_str = exclt_stack.top(); - if((e_str.func_id != func) && (func != 0)) - cerr << "\nFailure in the otf-file.The leaving function doesn't exist." << endl; - - ProcessCounterMap::iterator it_c; - Function_Def_Key f_def_key(1, e_str.func_id); - if(!gd_ptr->sum_container.find_Function(f_def_key)) - cerr << "\nError.Wrong function id saved on stack!" << endl; - - exclt_stack.pop(); - - incl_time = time - e_str.time; - if(!exclt_stack.empty()) - { - exclt_stack.top().diff_time += incl_time; - it_c = exclt_stack.top().p_counter_map.begin(); - ProcessCounterMap::iterator it_c_local; - while(it_c != exclt_stack.top().p_counter_map.end()) - { - it_c_local = e_str.p_counter_map.find(it_c->first); - if((it_c->second.valid == INVALID) || (it_c_local->second.valid == INVALID) - || (it_c_local == e_str.p_counter_map.end())) - { - it_c->second.valid = INVALID; - } - else - { - it_c->second.diff_value += it_c_local->second.second_value - - it_c_local->second.start_value; - } - ++it_c; - } - } - gd_ptr->sum_container.addvalues_Function(1,e_str.func_id, process, 1, - (incl_time - e_str.diff_time), incl_time); - - it_c = e_str.p_counter_map.begin(); - while(it_c != e_str.p_counter_map.end()) - { - if(it_c->second.second_value == 0 ) - gd_ptr->sum_container.addvalues_Counter(1, e_str.func_id, process, it_c->first, - 0, 0, INVALID); - else - { - counter_incl_value = it_c->second.second_value - it_c->second.start_value; - counter_excl_value = counter_incl_value - it_c->second.diff_value; - gd_ptr->sum_container.addvalues_Counter(1, e_str.func_id, process, - it_c->first,counter_excl_value, - counter_incl_value, VALID); - } - ++it_c; - } - return 0; -} - -int Process::set_counter(uint32_t counter, uint64_t time, uint64_t value, global_data* gd_ptr) -{ - if(exclt_stack.empty()) - return 0; - - ProcessCounterMap::iterator it_count = exclt_stack.top().p_counter_map.find(counter); - if(it_count == exclt_stack.top().p_counter_map.end()) - { - count_str c_str; - if(exclt_stack.top().time != time) - { - c_str.start_value = 0; - c_str.second_value = 0; - c_str.diff_value = 0; - c_str.start_time = 0; - c_str.second_time = 0; - c_str.valid = INVALID; - } - else - { - c_str.start_value = value; - c_str.second_value = 0; - c_str.diff_value = 0; - c_str.start_time = time; - c_str.second_time = 0; - c_str.valid = VALID; - } - exclt_stack.top().p_counter_map.insert(pair<uint32_t,count_str>(counter,c_str)); - } - else - { - if(it_count->second.valid == VALID) - { - it_count->second.second_value = value; - it_count->second.second_time = time; - } - } - return 0; -} - -/* counts the events of the different collective operations */ - -void Process::set_data_collective(uint32_t process, uint32_t collop, uint32_t type, bool root, - uint32_t procGroup, uint32_t sent, uint32_t received, - uint64_t duration, global_data* gd_ptr) -{ - - /* completely ignore in lite mode */ - if ( lite ) return; - - - uint32_t root_sent = 0; - uint32_t root_received = 0; - - if(type == OTF_COLLECTIVE_TYPE_BARRIER) - { - gd_ptr->sum_container.addvalues_CollOp(1, process, collop, 1, 0, 0, 0, duration); - } - else if(type == OTF_COLLECTIVE_TYPE_ALL2ALL) - { - root_sent = sent / gd_ptr->p_group_map[procGroup]; - root_received = received / gd_ptr->p_group_map[procGroup]; - gd_ptr->sum_container.addvalues_CollOp(1, process, collop, 1, 1, root_sent, root_received, duration); - } - else if(type == OTF_COLLECTIVE_TYPE_ONE2ALL) - { - if(root) { - root_sent = sent / gd_ptr->p_group_map[procGroup]; - gd_ptr->sum_container.addvalues_CollOp(1, process, collop, 1, 1, root_sent, received, duration); - } - else { - gd_ptr->sum_container.addvalues_CollOp(1, process, collop, 0, 1, sent, received, duration); - } - } - else if(type == OTF_COLLECTIVE_TYPE_ALL2ONE) - { - if(root) { - gd_ptr->sum_container.addvalues_CollOp(1, process, collop, 1, 1, sent, received, duration); - } else { - gd_ptr->sum_container.addvalues_CollOp(1, process, collop, 1, 0, sent, received, duration); - } - } - else - cerr << "\nError in otf-file, unknowen type in collective event." << endl; -} - - -/* collects the necessary information to calculate Mbyte per second by a send event*/ - -void Process::set_mbyte_per_sec( uint32_t sender, uint32_t receiver, uint64_t time, uint32_t tag, - bool valid_loc, global_data* gd_ptr ) -{ - - /* completely ignore in lite mode */ - if ( lite ) return; - - /* what is this good for again ???? */ - - receive_str r_str; - - r_str.valid = valid_loc; - r_str.receiver = receiver; - r_str.start_time = time; - r_str.comm_tag = tag; - timelist.push_back(r_str); - - list<receive_str>::iterator send_iter; -} - - -/* collects the necessary information to calculate Mbyte per second by a receive event*/ - -void Process::get_mbyte_per_sec(uint32_t sender, uint32_t receiver, uint64_t time, - uint64_t length, uint32_t tag, global_data* gd_ptr) -{ - - /* completely ignore in lite mode */ - if ( lite ) return; - - send_str s_str; - s_str.sender = sender; - s_str.comm_tag = tag; - s_str.end_time = time; - s_str.length = length; - - recv_map[sender].push_back(s_str); -} - - -void Process::calc_mbyte_per_sec(uint32_t sender, map<uint32_t, uint32_t>& proc_map, uint32_t* cpu2thread ,global_data** data_ptr) { - list<receive_str>::iterator send_iter; - list<receive_str>::iterator tmp_iter; - list<send_str>::iterator recv_iter; - - - /* completely ignore in lite mode */ - if ( lite ) return; - - - uint64_t dur; - uint32_t bin_1, bin_2; - - Process *proc; - for(send_iter = timelist.begin(); send_iter != timelist.end(); ++send_iter) { - proc = &data_ptr[cpu2thread[ proc_map[send_iter->receiver]] ]->p_map[send_iter->receiver]; - for(recv_iter = proc->recv_map[sender].begin(); recv_iter != proc->recv_map[sender].end(); ++recv_iter) - { - if( (recv_iter->sender == sender) && (recv_iter->comm_tag == send_iter->comm_tag) ){ - if(send_iter->valid) { - if(recv_iter->end_time <= send_iter->start_time) { - proc->recv_map[sender].erase(recv_iter); - --send_iter; - cerr << "Error, no time entry / no tag found by calculating MByte per second.\n" << endl; - break; - } - dur = recv_iter->end_time - send_iter->start_time; - bin_1 = data_ptr[0]->sum_container.get_bin_1(recv_iter->length); - bin_2 = data_ptr[0]->sum_container.get_bin_2((double) recv_iter->length / ((double) dur / - (double) data_ptr[0]->ticks)); - - data_ptr[cpu2thread[proc_map[sender]]]->sum_container.addvalues_P2P(1, sender, send_iter->receiver, - bin_1, bin_2, 1, recv_iter->length, dur); - proc->recv_map[sender].erase(recv_iter); - } else { - proc->recv_map[sender].erase(recv_iter); - } - tmp_iter = send_iter; - --send_iter; - timelist.erase(tmp_iter); - break; - } - } - } - -} - diff --git a/externals/otf/tools/otfprofile/Summary.h b/externals/otf/tools/otfprofile/Summary.h deleted file mode 100644 index bd564c382ea56fabcbe46ad4483d9837132f0971..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/Summary.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#ifndef SUMMARY_H -#define SUMMARY_H - -#include <iostream> -#include <string> -#include <map> -#include <set> -#include <stack> -#include <list> - - -#include "OTF_inttypes.h" -#include "otf.h" - -#include "Definitions.h" -#include "DataStructure.h" - -using namespace std; - - -/* global variable to switch operation mode, see '-lite' command line switch */ -extern bool lite; - - -struct global_data; - - -/******************************** class Process **************************************/ - -/* This class summarizes informations about a Process. - Informations are: -Point2Point: send and receive - -Collective operations: barrier, broadcast, - all2one and all2all - -Process identifier and Process name - -A stack which contains all entered functions - without an leaving event.This is useful to - determine the exclusive time of a function.*/ - -class Process -{ - public: - Process(); - void set_proc_start(uint64_t time); - void set_proc_end(uint64_t time); - void set_exclTime(uint32_t func, uint64_t time); - void set_mbyte_per_sec(uint32_t sender, uint32_t receiver, uint64_t time, uint32_t tag, bool valid_loc, - global_data* gd_ptr); - int set_counter(uint32_t counter, uint64_t time, uint64_t value, global_data* gd_ptr); - void set_data_collective(uint32_t process, uint32_t collop, uint32_t type, bool root, - uint32_t procGroup, uint32_t sent, uint32_t received, - uint64_t duration, global_data* gd_ptr); - uint64_t get_proc_start(); - uint64_t get_proc_end(); - int get_exclTime(uint32_t func, uint32_t process, uint64_t time, global_data* gd_ptr); - void get_mbyte_per_sec(uint32_t sender, uint32_t receiver, uint64_t time, - uint64_t length, uint32_t tag, global_data* gd_ptr); - bool get_stack_status(); - uint32_t get_stack_top_func_id(); - void calc_mbyte_per_sec(uint32_t sender, map<uint32_t,uint32_t>& proc_map, uint32_t* cpu2thread, - global_data** data_ptr); - void clear_recv_map(int i); - - private: - - bool proc_set; - uint64_t proc_start; - uint64_t proc_end; - - // attributes to get the exclusive time and count - struct count_str - { - uint64_t start_value; - uint64_t second_value; - uint64_t diff_value; - uint64_t start_time; - uint64_t second_time; - bool valid; - }; - typedef map<uint32_t,count_str> ProcessCounterMap; - struct exclt_str - { - uint32_t func_id; - uint64_t time; - uint64_t diff_time; - ProcessCounterMap p_counter_map; - }; - stack<exclt_str> exclt_stack; - - // attribute to get MByte per second - struct receive_str - { - uint32_t receiver; - uint32_t comm_tag; - uint64_t start_time; - bool valid; //necessary by time interval - }; - list<receive_str> timelist; - - struct send_str - { - uint32_t sender; - uint32_t comm_tag; - uint64_t end_time; - uint32_t length; - }; - - /* not used in lite mode */ - map<uint32_t, list<send_str> > recv_map; -}; - - -/* *** more types *** */ - -typedef map<uint32_t,Process> ProcessMap; -typedef map<uint32_t,uint32_t> ProcessGroupMap; // <GroupID,numberOfProcs> - -struct global_data -{ - string filename; - string filename_path; - string creator; - string version; - bool clear_temp; - bool prog; - int TOP_FUNC; - bool vis; //form of visualization - bool var; // show variance instaed of average - uint64_t prog_start; - uint64_t prog_end; - uint64_t min_time; - uint64_t max_time; - uint64_t ticks; - uint32_t num_cpu; - ProcessMap p_map; - ProcessGroupMap p_group_map; - Summary_Container sum_container; -}; - - - -/* *** inline methods *** */ - - -inline Process::Process() -{ - proc_start = 0; - proc_end = 0; - proc_set = false; -} - -inline void Process::set_proc_start(uint64_t ps) -{ - if(!proc_set) - { - proc_start = ps; - proc_set = true; - } -} - -inline void Process::set_proc_end(uint64_t pe) -{ - proc_end = pe; -} - -inline bool Process::get_stack_status() -{ - return exclt_stack.empty(); -} - -inline uint32_t Process::get_stack_top_func_id() -{ - return exclt_stack.top().func_id; -} - -inline uint64_t Process::get_proc_start() -{ - return proc_start; -} - -inline uint64_t Process::get_proc_end() -{ - return proc_end; -} - -inline void Process::clear_recv_map(int i) -{ - - recv_map[i].clear(); -} - -#endif /* SUMMARY_H */ diff --git a/externals/otf/tools/otfprofile/otfprofile.cpp b/externals/otf/tools/otfprofile/otfprofile.cpp deleted file mode 100644 index e3d6ab3f515161ed7a723a6e56f2e4f12a99fdc1..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfprofile/otfprofile.cpp +++ /dev/null @@ -1,709 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef _OPENMP -# include <omp.h> -#else -# define omp_get_thread_num() 0 -# define omp_get_num_threads() 1 -#endif - - -#if defined(HAVE_SYS_TIME_H) && HAVE_SYS_TIME_H -# include <sys/time.h> -#endif -#ifdef _WIN32 -# include <Winsock2.h> -#endif -#include <cassert> - -#include "OTF_inttypes.h" -#include "OTF_Platform.h" - -#include "Handler.h" -#include "Summary.h" -#include "Prodtex.h" -#include "CSVParse.h" - -using namespace std; - -#define HELPTEXT "" \ -" \n" \ -" otfprofile - generate a profile of a trace \n" \ -" in Latex or CSV format. \n" \ -" \n" \ -" options: \n" \ -" -h, --help show this help message \n" \ -" -b <x> readbuffer size \n" \ -" -f <x> max. number of filehandles to use \n" \ -" -i <file> specify an input trace name \n" \ -" -csv <file> specify an input csv-file trace name \n" \ -" (as produced by otfprofiler before), \n" \ -" don't use -i and -csv together \n" \ -" -o <path> specify the path for the output files \n" \ -" -tex <x> writes Latex output in different flavours: \n" \ -" (all,func,p2p,collop,none) \n" \ -" -notex disable Latex output \n" \ -" -nops disable Postscript output \n" \ -" -var also show statistic variance \n" \ -" -top <x> max. number of functions shown (default 50) \n" \ -" -progress show progress information \n" \ -" -sum reads only summarized information, no events \n" \ -" -omp <x> specify the number of threads which are used \n" \ -" while reading the otf-file parallel \n" \ -" Note: This option overrides the environment \n" \ -" variable OMP_NUM_THREADS, \n" \ -" only useful if compiled with OpenMP support \n" \ -" -lite ignore P2P and collective communication \n" \ -" (saves memory for highly parallel cases \n" \ -" \n" \ -" \n" \ - - -/* global variable to switch operation mode, see '-lite' command line switch */ -bool lite= false; - - -int main( int argc, const char** argv ) -{ - struct timeval tStart,tEnd; - - int i; - OTF_FileManager* manager; - OTF_Reader* reader; - OTF_HandlerArray* handlers; - int buffersize = 1024*1024; - int nfiles = 300; - string output_path("./"); - string output_dir; - char* file = NULL; - fstream out; - bool check = false; // if check == true then -i or -csv is set - bool csv_on = false; - vector<string> counter_names; - global_data* gd = new global_data; - bool sum = false; // if true -> read summary - - /* show how many events were read */ - uint64_t global_events = 0; - double global_percent = 0; - - /* what to read? */ - int tex = TEX_ALL; - bool status = false; - bool file_rename = false; - bool ps = true; - gd->TOP_FUNC = 50; - gd->var = false; - gd->vis = false; - gd->prog = false; - gd->prog_start = (uint64_t) - 1; - gd->prog_end = 0; - gd->min_time = 0; - gd->max_time = (uint64_t) - 1; - gd->ticks = 1; - gd->clear_temp = false; - uint64_t ret_read; - - int num_p = 1; - global_data** data_array; - uint32_t* cpu2thread; - - char *OMP_NUM_THREADS = getenv("OMP_NUM_THREADS"); - if(OMP_NUM_THREADS != NULL) { - num_p = atoi(OMP_NUM_THREADS); - if(num_p == 0) { - num_p = 1; - } - } - - /* global variable: bool lite */ - lite= false; - - - if ( 1 >= argc ) { - - cout << HELPTEXT; - return 1; - } - - for(i = 1; i < argc; i++) - { - if ((0 == strcmp("-b", argv[i])) && (i+1 < argc)) - { - buffersize = atoi(argv[i+1]); - ++i; - } - else if ((0 == strcmp("-tex", argv[i])) && (i+1 < argc)) - { - if (0 == strcmp("all", argv[i+1])) - tex = TEX_ALL; - else if (0 == strcmp("allplot", argv[i+1])) - tex = TEX_ALLPLOT; - else if (0 == strcmp("func", argv[i+1])) - tex = TEX_FUNC; - else if (0 == strcmp("p2p", argv[i+1])) - tex = TEX_P2P; - else if (0 == strcmp("collop", argv[i+1])) - tex = TEX_COLLOP; - else if (0 == strcmp("none", argv[i+1])) - tex = TEX_OFF; - else - cerr << "\nWrong argument given after -tex." << endl; - ++i; - } - else if ( 0 == strcmp("-notex", argv[i]) ) - { - tex= TEX_OFF; - } - else if ((0 == strcmp("-f", argv[i])) && (i+1 < argc)) - { - nfiles = atoi(argv[i+1]); - ++i; - } -#if 0 - else if (0 == strcmp("-c", argv[i]) && (i+1 < argc)) - { - i++; - int test_end; - while((0 != (test_end = strcmp("end", argv[i]))) && (i+1 < argc)) - { - string s(strdup(argv[i])); - transform(s.begin(), s.end(), s.begin(), ::toupper); - counter_names.push_back(s); - i++; - } - if(test_end != 0) - { - cerr << "Parameter -c : There was missing an \"end\"" << endl; - exit(1); - } - } -#endif /* 0 */ - else if ((0 == strcmp("-min", argv[i])) && (i+1 < argc)) - { - gd->min_time = atoi(argv[i+1]); - ++i; - } - else if ((0 == strcmp("-max", argv[i])) && (i+1 < argc)) - { - gd->max_time = atoi(argv[i+1]); - ++i; - } - else if (0 == strcmp("-progress", argv[i])) - { - status = true; - } - else if (0 == strcmp("--help", argv[i]) || 0 == strcmp("-h", argv[i])) - { - cout << HELPTEXT; - return 0; - } - else if ((0 == strcmp("-i", argv[i])) && (i+1 < argc)) - { - if(!check) - { - file = strdup(argv[i+1]); - check = true; - } - ++i; - } - else if ((0 == strcmp("-csv", argv[i])) && (i+1 < argc)) - { - if(!check) - { - file = strdup(argv[i+1]); - check = true; - csv_on = true; - } - ++i; - } - else if ((0 == strcmp("-o", argv[i])) && (i+1 < argc)) - { - output_path = string(strdup(argv[i+1])); - ++i; - } - else if ((0 == strcmp("-d", argv[i])) && (i+1 < argc)) - { - output_path = string(strdup(argv[i+1])); - file_rename = true; - ++i; - } - else if (0 == strcmp("-var", argv[i])) - { - gd->var = true; - } - else if (0 == strcmp("-vis", argv[i])) - { - gd->vis = true; - } - else if ((0 == strcmp("-top", argv[i])) && (i+1 < argc)) - { - gd->TOP_FUNC = atoi(argv[i+1]); - ++i; - } - else if (0 == strcmp("-sum", argv[i])) - { - sum = true; - } - else if (0 == strcmp("-nops", argv[i])) - { - ps = false; - } - else if (0 == strcmp("-omp", argv[i]) && (i+1 < argc)) - { -# ifdef _OPENMP - num_p = atoi(argv[i+1]); - ++i; -# else - cerr << "\nThe option \"-omp\" has no effect because you compiled without OpenMP-Support.\nInstall OpenMP and recompile otfprofile to use this option.\n" << endl; - ++i; -# endif - } - else if (0 == strcmp("-lite", argv[i])) - { - lite= true; - } - else - { - cerr << "ERROR: Unknown argument: " << argv[i] << endl;; - exit(1); - } - } - - if (nfiles < 1) - { - cerr << "ERROR: need at least one input, aborting" << endl; - exit(1); - } - - if(file == NULL) - { - cerr << "ERROR: no file given" << endl; - cerr << "To give a file, use \"-i filename\". " << endl; - exit(1); - } - -# ifdef _OPENMP - uint32_t num_threads = num_p; -# else - uint32_t num_threads = 1; -# endif - - gd->filename.assign(OTF_basename(file)); - output_dir = output_path; - if(!file_rename) - { - output_path.append(gd->filename); - } - gd->filename_path = output_path; - - if(csv_on) - { - Glob_Maps glob_maps; - parse_csv(gd->sum_container, file, glob_maps); - free(file); - } - else - { - manager= OTF_FileManager_open(nfiles); - assert(NULL != manager); - - handlers = OTF_HandlerArray_open(); - - reader = OTF_Reader_open(file, manager); - assert(NULL != reader); - - OTF_MasterControl* master = OTF_Reader_getMasterControl(reader); - assert(NULL != master); - uint32_t num_cpus = OTF_MasterControl_getrCount(master); - uint32_t num_files = OTF_MasterControl_getCount(master); - gd->num_cpu = num_cpus; - - if( (num_threads > num_files) && (num_threads <= num_cpus) ) { - cerr << "Warning: Number of working threads greater than number of files. That could reduce the performance." << endl; - } - - if(num_threads > num_cpus) { - num_threads = num_cpus; - cerr << "Remark: It is not possible to have more working threads than processes in the otf-file!" << endl; - } - - uint32_t current_reader = num_threads; -# ifdef _OPENMP - omp_set_num_threads(num_threads); -# endif - - /* get the list of processes that should be distributed over the analysis threads */ - - uint32_t* processlist; - uint32_t pos= 0; - processlist= (uint32_t*) malloc( num_cpus * sizeof(uint32_t) ); - assert( NULL != processlist ); - - for( uint32_t k= 0; k < num_files; k++ ) { - - OTF_MapEntry* entry; - entry= OTF_MasterControl_getEntryByIndex( master, k ); - assert( NULL != entry ); - - for( uint32_t m= 0; m < entry->n ; m++ ) { - - processlist[pos]= entry->values[m]; - ++pos; - } - } - - data_array = (global_data**) malloc(num_threads * sizeof(global_data*)); - cpu2thread = (uint32_t*) malloc(num_cpus * sizeof(uint32_t)); - - /* Definitons */ - OTF_Reader_setBufferSizes(reader, buffersize); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefCreator, OTF_DEFCREATOR_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) gd, OTF_DEFCREATOR_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefVersion, OTF_DEFVERSION_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) gd, OTF_DEFVERSION_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefTimerResolution, OTF_DEFTIMERRESOLUTION_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) gd, OTF_DEFTIMERRESOLUTION_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefFunction, OTF_DEFFUNCTION_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) gd, OTF_DEFFUNCTION_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefFunctionGroup, OTF_DEFFUNCTIONGROUP_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) gd, OTF_DEFFUNCTIONGROUP_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefProcess, OTF_DEFPROCESS_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) gd, OTF_DEFPROCESS_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefProcessGroup, OTF_DEFPROCESSGROUP_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) gd, OTF_DEFPROCESSGROUP_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefCollectiveOperation, OTF_DEFCOLLOP_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) gd, OTF_DEFCOLLOP_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefCounter, OTF_DEFCOUNTER_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) gd, OTF_DEFCOUNTER_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleFunctionSummary, OTF_FUNCTIONSUMMARY_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) gd, OTF_FUNCTIONSUMMARY_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleMessageSummary, OTF_MESSAGESUMMARY_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) gd, OTF_MESSAGESUMMARY_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleCollopSummary, OTF_COLLOPSUMMARY_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) gd, OTF_COLLOPSUMMARY_RECORD); - - /* read definitions */ - ret_read = OTF_Reader_readDefinitions(reader, handlers); - if( ret_read == OTF_READ_ERROR ) { - cerr << "Cannot read definition file. It seems to be damaged. Abort." << endl; - return 0; - } - - gd->sum_container.adddef_Bin(1); - - /* read statistics */ - if(sum) { - ret_read = OTF_Reader_readStatistics(reader, handlers); - if( ret_read == OTF_READ_ERROR ) { - cerr << "Cannot read statistics. The tracefile seems to be damaged. Abort." << endl; - return 0; - } - } - - OTF_Reader_close(reader); - OTF_HandlerArray_close(handlers); - - OTF_FileManager_close(manager); - - if(!sum) { - - global_data data = *gd; - - /* CPU-Verteilung ermitteln */ - cout << "Threads: " << num_threads << endl; - uint32_t *threads = (uint32_t*) malloc(num_threads * sizeof(uint32_t)); - - int index = 0; - for(uint32_t k=0; k<num_threads; k++) { - threads[k] = ( num_cpus / num_threads ) + - ( (uint32_t)k < (num_cpus % (uint32_t)num_threads) ? 1 : 0 ); - for(uint32_t i=0; i<threads[k]; i++) { - cpu2thread[index] = k; - index++; - } - } - -# ifdef _OPENMP -# pragma omp parallel firstprivate(data) private(manager, handlers, reader) -# endif - { - - data_array[omp_get_thread_num()] = &data; - - uint64_t events = 0; - uint64_t read; - uint64_t min; - uint64_t cur; - uint64_t max; - double percent; - bool ready = false; - map<uint32_t, uint32_t> invers_proc_map; - - uint32_t maxfiles = ( nfiles / omp_get_num_threads() ) + - ( (uint32_t)omp_get_thread_num() < (nfiles % (uint32_t)omp_get_num_threads()) ? 1 : 0 ); - - uint32_t start = 0; - uint32_t end = 0; -# ifdef _OPENMP - for(int k=0; k<omp_get_thread_num(); k++) { - start += threads[k]; - } -# endif - end = start + threads[omp_get_thread_num()] - 1; - - for(uint32_t i=0; i<num_cpus; i++) { - invers_proc_map[processlist[i]] = i; - } - - manager= OTF_FileManager_open(maxfiles); - assert(NULL != manager); - - handlers = OTF_HandlerArray_open(); - - reader = OTF_Reader_open(file, manager); - assert(NULL != reader); - - OTF_Reader_setProcessStatusAll(reader, 0); - for(uint32_t k=start; k<=end; k++) { - OTF_Reader_setProcessStatus(reader, processlist[k], 1); - } - - OTF_Reader_setBufferSizes(reader, buffersize); - - /* set the handler functions */ - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleEnter, OTF_ENTER_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) &data, OTF_ENTER_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleLeave, OTF_LEAVE_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) &data, OTF_LEAVE_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleCounter, OTF_COUNTER_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) &data, OTF_COUNTER_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleRecvMsg, OTF_RECEIVE_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) &data, OTF_RECEIVE_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleSendMsg, OTF_SEND_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) &data, OTF_SEND_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleCollectiveOperation, OTF_COLLOP_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) &data, OTF_COLLOP_RECORD); - - /* read events */ - cerr.setf(ios::fixed, ios::floatfield); - cerr.precision(2); - if(status) { -# ifdef _OPENMP -# pragma omp single nowait -# endif - { - gettimeofday(&tStart,0); - cerr << "\n starts reading the events" << endl; - cerr.setf(ios::fixed, ios::floatfield); - cerr.precision(2); - cerr << endl; - } - } - - OTF_Reader_setRecordLimit( reader, (uint64_t) 1000000 ); - while(current_reader > 0) { - read = OTF_Reader_readEventsUnsorted(reader, handlers); - if( read == OTF_READ_ERROR ) { - cerr << "Cannot read events. The tracefile seems to be damaged. Abort." << endl; - exit(0); - } - -# ifdef _OPENMP - if(status) { -# pragma omp barrier - } -# endif - if( (read <= 0) && (ready == false) ) { -# ifdef _OPENMP -# pragma omp critical(decrement) -# endif - { - current_reader--; - } - ready = true; - } - - if(ready == false) { - for(uint32_t k=start; k<=end; k++) { - Process *p = &(&data)->p_map[ processlist[k] ]; - p->calc_mbyte_per_sec(processlist[k], invers_proc_map, cpu2thread, data_array); - } - - if(status) { - events += read; - OTF_Reader_eventBytesProgress( reader, &min, &cur, &max ); - percent = 100.0 * ((double) (cur - min)) / ((double) (max - min)); -# ifdef _OPENMP -# pragma omp critical(progress) -# endif - { - global_events += read; - global_percent += percent; - } - } - } - - if ( status ) { -# ifdef _OPENMP -# pragma omp barrier -# endif - } - - if ( status && ready == false ) { -# ifdef _OPENMP -# pragma omp single nowait -# endif - { - global_percent += ( num_threads - current_reader ) * 100.0; - cerr << " " << (global_percent / (double) num_threads) << "% of all events read, events read: " << global_events << "\r"; - global_percent = 0; - } - } - } - - OTF_Reader_setRecordLimit( reader, (uint64_t) OTF_READ_MAXRECORDS ); - - OTF_Reader_close(reader); - OTF_HandlerArray_close(handlers); - OTF_FileManager_close(manager); - - set_time_sum_container(&data); - -# ifdef _OPENMP -# pragma omp barrier -# endif - for(uint32_t k=start; k<=end; k++) { - Process *p = &(&data)->p_map[ processlist[k] ]; - p->calc_mbyte_per_sec(processlist[k], invers_proc_map, cpu2thread, data_array); - } - -# ifdef _OPENMP -# pragma omp critical(merge) -# endif - { - gd->sum_container.mergeContainer(data.sum_container); - mergeProgTime(gd, &data); - } - -# ifdef _OPENMP -# pragma omp barrier -# endif - - } /* end parallel */ - - if(status) - { - cerr << "\n all events read" << endl; - - gettimeofday(&tEnd,0); - - cerr << "\n time used for profiling : " << - ((double) tEnd.tv_sec + (double) tEnd.tv_usec / 1000000) - - ( (double) tStart.tv_sec + (double) tStart.tv_usec / 1000000) << endl; - - cerr << "\n producing files..."; - } - - } // end !sum - free(file); - - out.setf(ios::fixed, ios::floatfield); - out.precision(6); - out.open((gd->filename_path + "_func.csv").c_str(), ios::out | ios::trunc); - gd->sum_container.csv_Function(out, 1); - out.close(); - out.open((gd->filename_path + "_p2p.csv").c_str(), ios::out | ios::trunc); - gd->sum_container.csv_P2P(out, 1); - out.close(); - out.open((gd->filename_path + "_collop.csv").c_str(), ios::out | ios::trunc); - gd->sum_container.csv_CollOp(out, 1); - out.close(); - out.open((gd->filename_path + "_data.csv").c_str(), ios::out | ios::trunc); - gd->sum_container.csv_Data(out, 1); - out.close(); - } - - if(tex != TEX_OFF) { - prod_tex(tex, gd, counter_names, sum); - - if(ps == true) { - string exe = "cd " + output_dir + "; latex -halt-on-error " + gd->filename + - "_result.tex > /dev/null 2>&1"; - int ret = system(exe.c_str()); - if(ret != 0) { - //cerr << " Warning: could not create ps-file! latex not installed." << endl; - } else { - exe = "cd " + output_dir + "; dvips " + gd->filename + "_result.dvi > /dev/null 2>&1"; - ret = system(exe.c_str()); - if(ret != 0) { - //cerr << " Warning: could not create ps-file! dvips not installed." << endl; - } - } - } - } - - cerr << "\tfinished." << endl; - - return 0; -} diff --git a/externals/otf/tools/otfshrink/Handler.cpp b/externals/otf/tools/otfshrink/Handler.cpp deleted file mode 100644 index b03bd88fb7a3991e3539705996ff5637ee50429f..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfshrink/Handler.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#include "Handler.h" - - -/* most of these hanlders act like copyhandlers, except handleDefProcess and handleDefProcessGroup */ - -int handleDefinitionComment (void *userData, uint32_t stream, const char *comment) { - - return ( 0 == OTF_Writer_writeDefinitionComment ( (OTF_Writer*) userData, stream, comment) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleDefTimerResolution (void *userData, uint32_t stream, uint64_t ticksPerSecond) { - - return ( 0 == OTF_Writer_writeDefTimerResolution ( (OTF_Writer*) userData, stream, ticksPerSecond) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleDefProcess (void *userData, uint32_t stream, uint32_t process, const char *name, uint32_t parent) { - - firstarg *first = (firstarg*) userData; - - if ( first->procMap.end() == first->procMap.find(process) ) { - return OTF_RETURN_OK; - } - - return ( 0 == OTF_Writer_writeDefProcess ( (OTF_Writer*) first->writer, stream, process, name, parent) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleDefProcessGroup (void *userData, uint32_t stream, uint32_t procGroup, const char *name, uint32_t numberOfProcs, const uint32_t *procs) { - - firstarg *first = (firstarg*) userData; - - uint32_t *mod_procs = new uint32_t[numberOfProcs]; - uint32_t mod_numberOfProcs = 0; - int ret; - - for(uint32_t i = 0; i < numberOfProcs; i++) { - if ( first->procMap.end() != first->procMap.find(procs[i]) ) { - mod_procs[mod_numberOfProcs] = procs[i]; - mod_numberOfProcs++; - } - - } - - if(mod_numberOfProcs < 1) { - delete[] mod_procs; - return OTF_RETURN_OK; - } - - ret = ( 0 == OTF_Writer_writeDefProcessGroup ( (OTF_Writer*) first->writer, stream, procGroup, name, - mod_numberOfProcs, mod_procs) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; - - delete[] mod_procs; - - return ret; - -} - -int handleDefFunction (void *userData, uint32_t stream, uint32_t func, const char *name, uint32_t funcGroup, uint32_t source) { - - return ( 0 == OTF_Writer_writeDefFunction ( (OTF_Writer*) userData, stream, func, name, funcGroup, source) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleDefFunctionGroup (void *userData, uint32_t stream, uint32_t funcGroup, const char *name) { - - return ( 0 == OTF_Writer_writeDefFunctionGroup ( (OTF_Writer*) userData, stream, funcGroup, name) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleDefCollectiveOperation (void *userData, uint32_t stream, uint32_t collOp, const char *name, uint32_t type) { - - return ( 0 == OTF_Writer_writeDefCollectiveOperation ( (OTF_Writer*) userData, stream, collOp, name, type) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleDefCounter (void *userData, uint32_t stream, uint32_t counter, const char *name, uint32_t properties, uint32_t counterGroup, const char *unit) { - - return ( 0 == OTF_Writer_writeDefCounter ( (OTF_Writer*) userData, stream, counter, name, properties, - counterGroup, unit) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleDefCounterGroup (void *userData, uint32_t stream, uint32_t counterGroup, const char *name) { - - return ( 0 == OTF_Writer_writeDefCounterGroup ( (OTF_Writer*) userData, stream, counterGroup, name) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleDefScl (void *userData, uint32_t stream, uint32_t source, uint32_t sourceFile, uint32_t line) { - - return ( 0 == OTF_Writer_writeDefScl ( (OTF_Writer*) userData, stream, source, sourceFile, line) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleDefSclFile (void *userData, uint32_t stream, uint32_t sourceFile, const char *name) { - - return ( 0 == OTF_Writer_writeDefSclFile ( (OTF_Writer*) userData, stream, sourceFile, name) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleDefCreator (void *userData, uint32_t stream, const char *creator) { - - return ( 0 == OTF_Writer_writeDefCreator ( (OTF_Writer*) userData, stream, creator) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleDefVersion (void *userData, uint32_t stream, uint8_t major, uint8_t minor, uint8_t sub, const char *string) { - - /* this is deprecated and not necessary at all */ - /*return ( 0 == OTF_Writer_writeOtfVersion ( (OTF_Writer*) userData, stream) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK;*/ - - return OTF_RETURN_OK; -} - -int handleDefFile (void *userData, uint32_t stream, uint32_t token, const char *name, uint32_t group) { - - return ( 0 == OTF_Writer_writeDefFile ( (OTF_Writer*) userData, stream, token, name, group) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} - -int handleDefFileGroup (void *userData, uint32_t stream, uint32_t token, const char *name) { - - return ( 0 == OTF_Writer_writeDefFileGroup ( (OTF_Writer*) userData, stream, token, name) ) - ? OTF_RETURN_ABORT : OTF_RETURN_OK; -} diff --git a/externals/otf/tools/otfshrink/Handler.h b/externals/otf/tools/otfshrink/Handler.h deleted file mode 100644 index e6cd9a75357aeaae8175825f326ec814e5863e2e..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfshrink/Handler.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#include <map> -#include <otf.h> - -using namespace std; - - -/* required as FirstHandlerArg later on */ -typedef struct { - OTF_Writer *writer; - map<int, bool> procMap; -} firstarg; - - -int handleDefinitionComment (void *userData, uint32_t stream, const char *comment); - -int handleDefTimerResolution (void *userData, uint32_t stream, uint64_t ticksPerSecond); - -int handleDefProcess (void *userData, uint32_t stream, uint32_t process, - const char *name, uint32_t parent); - -int handleDefProcessGroup (void *userData, uint32_t stream, uint32_t procGroup, - const char *name, uint32_t numberOfProcs, const uint32_t *procs); - -int handleDefFunction (void *userData, uint32_t stream, uint32_t func, const char *name, - uint32_t funcGroup, uint32_t source); - -int handleDefFunctionGroup (void *userData, uint32_t stream, uint32_t funcGroup, const char *name); - -int handleDefCollectiveOperation (void *userData, uint32_t stream, uint32_t collOp, - const char *name, uint32_t type); - -int handleDefCounter (void *userData, uint32_t stream, uint32_t counter, const char *name, - uint32_t properties, uint32_t counterGroup, const char *unit); - -int handleDefCounterGroup (void *userData, uint32_t stream, uint32_t counterGroup, const char *name); - -int handleDefScl (void *userData, uint32_t stream, uint32_t source, uint32_t sourceFile, uint32_t line); - -int handleDefSclFile (void *userData, uint32_t stream, uint32_t sourceFile, const char *name); - -int handleDefCreator (void *userData, uint32_t stream, const char *creator); - -int handleDefVersion (void *userData, uint32_t stream, uint8_t major, uint8_t minor, - uint8_t sub, const char *string); - -int handleDefFile (void *userData, uint32_t stream, uint32_t token, const char *name, uint32_t group); - -int handleDefFileGroup (void *userData, uint32_t stream, uint32_t token, const char *name); - diff --git a/externals/otf/tools/otfshrink/Makefile.am b/externals/otf/tools/otfshrink/Makefile.am deleted file mode 100644 index 825d5c53038b5dd680502e66a48e551d6643cda1..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfshrink/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib - -if AMBUILDBINARIES -bin_PROGRAMS = \ - otfshrink -endif - -otfshrink_LDADD = $(top_builddir)/otflib/libotf.la -otfshrink_DEPENDENCIES = $(otfaux_LDADD) -otfshrink_SOURCES = \ - Handler.h \ - otfshrink.cpp \ - Handler.cpp - diff --git a/externals/otf/tools/otfshrink/Makefile.in b/externals/otf/tools/otfshrink/Makefile.in deleted file mode 100644 index 4443cea5a5d178dbe11c8803e232b5c3e9496be4..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfshrink/Makefile.in +++ /dev/null @@ -1,605 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@AMBUILDBINARIES_TRUE@bin_PROGRAMS = otfshrink$(EXEEXT) -subdir = tools/otfshrink -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_otfshrink_OBJECTS = otfshrink.$(OBJEXT) Handler.$(OBJEXT) -otfshrink_OBJECTS = $(am_otfshrink_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) -am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CXXLD_0 = @echo " CXXLD " $@; -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(otfshrink_SOURCES) -DIST_SOURCES = $(otfshrink_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_builddir)/otflib -I$(top_srcdir)/otflib -otfshrink_LDADD = $(top_builddir)/otflib/libotf.la -otfshrink_DEPENDENCIES = $(otfaux_LDADD) -otfshrink_SOURCES = \ - Handler.h \ - otfshrink.cpp \ - Handler.cpp - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/otfshrink/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/otfshrink/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -otfshrink$(EXEEXT): $(otfshrink_OBJECTS) $(otfshrink_DEPENDENCIES) - @rm -f otfshrink$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(otfshrink_OBJECTS) $(otfshrink_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Handler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otfshrink.Po@am__quote@ - -.cpp.o: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS 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-binPROGRAMS - -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: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - 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-binPROGRAMS 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 \ - uninstall-binPROGRAMS - - -# 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/externals/otf/tools/otfshrink/otfshrink.cpp b/externals/otf/tools/otfshrink/otfshrink.cpp deleted file mode 100644 index 5b9bb43bc5f8ce96b161b80323a6dabccaaaf0be..0000000000000000000000000000000000000000 --- a/externals/otf/tools/otfshrink/otfshrink.cpp +++ /dev/null @@ -1,656 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Denis Huenich, Johannes Spazier -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <iostream> -#include <string> - -#include <string.h> -#include <stdlib.h> -#include <unistd.h> -#include <assert.h> -#include <stdio.h> - -#include "OTF_Platform.h" - -#include "Handler.h" - -#define MAX_L 10 -#define LIST_MODE 0 -#define RANGE_MODE 1 -#define TABLE_MODE 2 - -#define CLEAR_EVERYTHING free_all_pointers(ch_i, first, entries, writer, reader, \ - handlers, manager, master, new_master); - -#define HELPTEXT "" \ -" \n" \ -" otfshrink - creates a new otf file that only includes \n" \ -" specified processes \n" \ -" \n" \ -" options: \n" \ -" -h, --help show this help message \n" \ -" -i <file> specify the input trace file \n" \ -" -o <file> specify the output file \n" \ -" -l <list> a space-separated list of processes \n" \ -" to show, \n" \ -" e.g. -l 1 2 3-4 8-5 \n" \ -" -v <list> a space-separated list of processes \n" \ -" NOT to show, \n" \ -" see -l for exact syntax \n" \ -" -s <mode> display all selected processes, \n" \ -" no files are created (simulation mode), \n" \ -" modes: (l)ist, (r)ange or (t)able \n" \ -" defaut: range \n" \ -" \n" \ - -map<uint32_t, bool> cpuMap; - -int write_master(string input, string output, bool invers, bool show, int sim_mode); -int display_processes(firstarg *first, int sim_mode); -void free_all_pointers(char *ch_i, firstarg *first, OTF_MapEntry *entries, OTF_Writer *writer, - OTF_Reader *reader, OTF_HandlerArray *handlers, OTF_FileManager *manager, - OTF_MasterControl *master, OTF_MasterControl *new_master); - -int main (int argc, char* argv[]) { - - char *pwd = NULL; - bool enable = true; - bool invers_mode = true; - bool mode_set = false; - bool simulation = false; - int sim_mode = RANGE_MODE; - size_t found; - - string arg = "-l"; - string input_path; - string input_file; - string input_folder; - string output_file; - string output_folder; - string output_path; - - if ( argc <= 1 ) { - cout << HELPTEXT << endl; - return 0; - } - - /* check for parameter list */ - for ( int i = 1; i < argc; i++ ) { - if ( 0 == strcmp("-h", argv[i]) || 0 == strcmp("--help", argv[i]) ) { - cout << HELPTEXT << endl; - return 0; - - } else if ( 0 == strcmp("-l", argv[i]) ) { - bool is_hyphen = false; - string min; - string max; - uint32_t left; - uint32_t right; - - if ( ((i+1) >= argc) || ( argv[i+1][0] == '-') ) { - cerr << "At least one argument expected after " << arg << endl; - return 1; - } - - while ( (i+1) < argc ) { - if ( argv[i+1][0] == '-' ) break; - i++; - - is_hyphen = false; - min = ""; - max = ""; - for (uint32_t j = 0; j < strlen(argv[i]); j++) { - if ( argv[i][j] > 47 && argv[i][j] < 58 ) { - if ( is_hyphen ) { - max += argv[i][j]; - } else { - min += argv[i][j]; - } - - } else if ( (argv[i][j] == '-') && (is_hyphen == false) && (argv[i][j+1] != '\0') ) { - is_hyphen = true; - max = ""; - - } else { - cerr << "Error: Wrong argument after " << arg << endl; - return 1; - } - } - - sscanf( min.c_str(), "%u", &left ); - if( max != "") { - sscanf( max.c_str(), "%u", &right ); - } - - if ( ! is_hyphen ) { - right = left; - } - - if ( left > right ) { - int tmp = left; - left = right; - right = tmp; - } - - for ( uint64_t k = left; k <= right; k++ ) { - cpuMap[ (uint32_t)k ] = enable; - } - } - - enable = true; - arg = "-l"; - if ( ! mode_set ) { - invers_mode = false; - mode_set = true; - } - - } else if ( 0 == strcmp("-v", argv[i]) ) { - enable = false; - if ( ! mode_set ) { - invers_mode = true; - mode_set = true; - } - arg = "-v"; - strcpy(argv[i], "-l"); - i--; - - } else if ( 0 == strcmp("-i", argv[i]) ) { - if (i+1 >= argc) { - cerr << "Error: Option " << argv[i] << " expect exactly 1 argument." << endl; - return 1; - } - if ( argv[i+1][0] == '-' ) { - cerr << "Error: No argument given after " << argv[i] << endl; - return 1; - } - - i++; - input_path = argv[i]; - - } else if ( 0 == strcmp("-o", argv[i]) ) { - if (i+1 >= argc) { - cerr << "Error: Option " << argv[i] << " expect exactly 1 argument." << endl; - return 1; - } - if ( argv[i+1][0] == '-' ) { - cerr << "Error: No argument given after " << argv[i] << endl; - return 1; - } - - i++; - output_path = argv[i]; - - } else if ( 0 == strcmp("-s", argv[i]) ) { - simulation = true; - if ( (i+1) < argc ) { - if ( argv[i+1][0] != '-' ) { - i++; - if ( 0 == strcmp("l", argv[i]) || 0 == strcmp("list", argv[i]) ) { - sim_mode = LIST_MODE; - } else if ( 0 == strcmp("r", argv[i]) || 0 == strcmp("range", argv[i]) ) { - sim_mode = RANGE_MODE; - } else if ( 0 == strcmp("t", argv[i]) || 0 == strcmp("table", argv[i]) ) { - sim_mode = TABLE_MODE; - } else { - cerr << "Error: Wrong argument after " << argv[i-1] << endl; - return 1; - } - } - } - - } else { - cerr << "Error: Unknown argument " << argv[i] << endl; - return 1; - } - - } - - /* string operations to handle input and output path */ - /* check if -i was set */ - if ( input_path.empty() ) { - cerr << "Error: No input file given." << endl; - return 1; - } - - /* get current working directory */ - pwd = new char[OTF_PATH_MAX]; - *pwd = '\0'; - pwd = getcwd(pwd, OTF_PATH_MAX); - if ( pwd == NULL) { - cerr << "Error: Path length greater than the maximum." << endl; - delete[] pwd; - return 1; - } - - /* make absolute path - necessary to create a symbolic link later on */ - if (input_path[0] != '/') { - input_path = pwd + string("/") + input_path; - } - - if (output_path[0] != '/') { - output_path = pwd + string("/") + output_path; - } - - delete[] pwd; - - /* input strings */ - /* search for ".otf" and cut it off if found */ - found = input_path.find_last_of("."); - if (found != string::npos) { - if ( input_path.substr(found) == ".otf" ) { - input_path = input_path.erase(found); - } - } - - /* divide input path in file and folder */ - found = input_path.find_last_of("/"); - if (found != string::npos) { - input_folder = input_path.substr(0, found + 1); - input_file = input_path.substr(found + 1); - } - - /* output strings */ - /* search for ".otf" and cut it off if found */ - found = output_path.find_last_of("."); - if (found != string::npos) { - if ( output_path.substr(found) == ".otf" ) { - output_path = output_path.erase(found); - } - } - - /* divide output path in file and folder */ - found = output_path.find_last_of("/"); - if (found != string::npos) { - output_folder = output_path.substr(0, found + 1); - output_file = output_path.substr(found + 1); - } - - /* check if output directory exists */ - if ( access(output_folder.c_str(), F_OK) ) { - cerr << "Error: Directory " << output_folder << " does not exist!" << endl; - return 1; - } - - /* check if input and output path were identical */ - if ( input_path == output_path ) { - cerr << "Error: The input and output file cannot be indentical." << endl; - return 1; - } - - /* make output path if some information are missing */ - if ( output_file.empty() ) { - if ( output_folder.empty() ) { - output_path = input_folder + string("s_") + input_file; - } else { - output_path = output_folder + string("s_") + input_file; - } - } - - /*** end string operations ***/ - - /* create symbolic links, definiton file and master file */ - return write_master(input_path ,output_path, invers_mode, simulation, sim_mode); -} - -int write_master(string input, string output, bool invers, bool show, int sim_mode) { - - /* create symbolic links, definiton file and master file */ - - uint32_t num_args; - bool append = false; - char *ch_i = new char [MAX_L + 1]; - firstarg *first = new firstarg; - uint64_t read; - - string file; - string s_link; - - string file_suffix[4] = {".events", ".snaps", ".stats", ".marker"}; - - OTF_MapEntry *entries = NULL; - OTF_Writer *writer = NULL; - OTF_Reader *reader = NULL; - OTF_HandlerArray *handlers = NULL; - OTF_FileManager *manager = NULL; - OTF_MasterControl *master = NULL; - OTF_MasterControl *new_master = NULL; - - manager = OTF_FileManager_open(2); - master = OTF_MasterControl_new(manager); - OTF_MasterControl_read(master, input.c_str()); - - /* get number of entries in master file, on error abort */ - num_args = OTF_MasterControl_getCount(master); - if(num_args == 0) { - if ( access((input + ".otf").c_str(), F_OK) ) { - cerr << "Error while reading tracefile. File does not exist." << endl; - } else { - cerr << "Error while reading tracefile. No entries in file found." << endl; - } - CLEAR_EVERYTHING - return 2; - } - - /* modifies the MapEntries of otf masterfile according to entries in cpuMap*/ - entries = new OTF_MapEntry[num_args]; - for(uint32_t i = 0; i < num_args; i++) { - entries[i] = *(OTF_MasterControl_getEntry(master, i+1)); - - for(uint32_t j = 0; j < entries[i].n; j++) { - if ( cpuMap.end() == cpuMap.find(entries[i].values[j]) ) { - if ( ! invers ) { - entries[i].values[j] = 0; - } - } else { - if ( cpuMap[entries[i].values[j]] == 0 ) { - entries[i].values[j] = 0; - } - } - } - } - - /* create new empty master and symbolic links */ - new_master = OTF_MasterControl_new(manager); - for(uint32_t i = 0; i < num_args; i++) { - append = false; - for(uint32_t j = 0; j < entries[i].n; j++) { - if(entries[i].values[j] > 0) { - OTF_MasterControl_append(new_master, i+1, entries[i].values[j]); - first->procMap[ entries[i].values[j] ] = true; - append = true; - } - } - - /* if there is nothing to append or show_mode is active, don't create symbolic link */ - if ( ( ! append) || (show) ) { - continue; - } - - /* create symbolic links */ - sprintf(ch_i, "%x", i+1); - - for(int k = 0; k < 4; k++) { - - file = input + string(".") + ch_i + file_suffix[k] + string(".z"); - s_link = output + string(".") + ch_i + file_suffix[k] + string(".z"); - - if ( ! access(file.c_str(), F_OK) ) { - if ( ! access(s_link.c_str(), F_OK) ) { - if ( unlink(s_link.c_str()) ) { - cerr << "Error while removing symbolic link " << s_link << endl; - CLEAR_EVERYTHING - return 2; - } - } - if ( symlink( file.c_str(), s_link.c_str() ) ) { - cerr << "Error while creating symbolic link " << s_link << endl; - CLEAR_EVERYTHING - return 2; - } - } else { - file = input + string(".") + ch_i + file_suffix[k]; - s_link = output + string(".") + ch_i + file_suffix[k]; - - if ( ! access(file.c_str(), F_OK) ) { - if ( ! access(s_link.c_str(), F_OK) ) { - if ( unlink(s_link.c_str()) ) { - cerr << "Error while removing symbolic link " << s_link << endl; - CLEAR_EVERYTHING - return 2; - } - } - if ( symlink( file.c_str(), s_link.c_str() ) ) { - cerr << "Error while creating symbolic link " << s_link << endl; - CLEAR_EVERYTHING - return 2; - } - } else { - if ( k == 0 ) { - cerr << "Error: Could not find " << file << endl; - CLEAR_EVERYTHING - return 2; - } - } - } - } - } - - /* close original master, he is not needed anymore */ - OTF_MasterControl_close(master); - master = NULL; - - if (show) { - display_processes(first, sim_mode); - CLEAR_EVERYTHING - return 0; - } - - /* check if there is at least one process to show */ - if (OTF_MasterControl_getCount(new_master) < 1) { - cerr << "You exclude all processes! Master not wrote." << endl; - CLEAR_EVERYTHING - return 2; - } - - writer = OTF_Writer_open(output.c_str(), 0, manager); - reader = OTF_Reader_open(input.c_str(), manager); - assert(reader); - handlers = OTF_HandlerArray_open(); - - first->writer = writer; - - /* kind of copyhandler which replicate all definitons */ - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefinitionComment, OTF_DEFINITIONCOMMENT_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFINITIONCOMMENT_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefTimerResolution, OTF_DEFTIMERRESOLUTION_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFTIMERRESOLUTION_RECORD); - - /* this definition is not copied but modified */ - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefProcess, OTF_DEFPROCESS_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) first, OTF_DEFPROCESS_RECORD); - - /* this definition is not copied but modified */ - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefProcessGroup, OTF_DEFPROCESSGROUP_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) first, OTF_DEFPROCESSGROUP_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefFunction, OTF_DEFFUNCTION_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFFUNCTION_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefFunctionGroup, OTF_DEFFUNCTIONGROUP_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFFUNCTIONGROUP_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefCollectiveOperation, OTF_DEFCOLLOP_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFCOLLOP_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefCounter, OTF_DEFCOUNTER_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFCOUNTER_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefCounterGroup, OTF_DEFCOUNTERGROUP_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFCOUNTERGROUP_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefScl, OTF_DEFSCL_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFSCL_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefSclFile, OTF_DEFSCLFILE_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFSCLFILE_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefCreator, OTF_DEFCREATOR_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFCREATOR_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefVersion, OTF_DEFVERSION_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFVERSION_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefFile, OTF_DEFFILE_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFFILE_RECORD); - - OTF_HandlerArray_setHandler(handlers, - (OTF_FunctionPointer*) handleDefFileGroup, OTF_DEFFILEGROUP_RECORD); - OTF_HandlerArray_setFirstHandlerArg(handlers, - (void*) writer, OTF_DEFFILEGROUP_RECORD); - - read = OTF_Reader_readDefinitions (reader, handlers); - if( read == OTF_READ_ERROR ) { - cerr << "An error occurred while reading the tracefile. It seems to be damaged. Abort." << endl; - CLEAR_EVERYTHING - return 1; - } - - /* set the writer's master to the modified master instance */ - /* closing the writer at the end writes the new master file to harddisk */ - OTF_Writer_setMasterControl(writer, new_master); - - /* clear everything */ - CLEAR_EVERYTHING - - return 0; -} - -int display_processes(firstarg *first, int sim_mode) { - - map<int, bool>::iterator it; - - /* cout << "Note: You are in simulation mode at the moment. No files are created.\n" << endl; */ - if ( first->procMap.size() < 1) { - cout << "You exclude all processes!" << endl; - - return 0; - } - - cout << "You choose the following processes: " << endl; - if ( sim_mode == LIST_MODE ) { - for (it = first->procMap.begin(); it != first->procMap.end(); ++it) { - cout << it->first << endl; - } - - } else if ( sim_mode == RANGE_MODE ) { - it = first->procMap.begin(); - int cur = it->first; - int start = cur; - int end = 0; - for (it = ++it ; it != first->procMap.end(); ++it) { - if ( (cur + 1) == it->first) { - cur++; - } else { - end = cur; - if (end > start) { - cout << start << " - " << end << endl; - } else { - cout << start << endl; - } - cur = it->first; - start = cur; - end = 0; - } - } - if (end == 0) { - cout << start << " - " << cur << endl; - } - - } else if ( sim_mode == TABLE_MODE ) { - int i = 0; - for (it = first->procMap.begin(); it != first->procMap.end(); ++it) { - cout << it->first << "\t"; - i++; - if (i == 8) { - cout << endl; - i = 0; - } - } - if ( i > 0) { - cout << endl; - } - - } - - return 0; -} - -void free_all_pointers(char *ch_i, firstarg *first, OTF_MapEntry *entries, OTF_Writer *writer, - OTF_Reader *reader, OTF_HandlerArray *handlers, OTF_FileManager *manager, - OTF_MasterControl *master, OTF_MasterControl *new_master) { - - if(ch_i != NULL) { - delete[] ch_i; - ch_i = NULL; - } - - if(first != NULL) { - delete first; - first = NULL; - } - - if(entries != NULL) { - delete[] entries; - entries = NULL; - } - - /* new_master is free'd by writer instance */ - if(writer != NULL) { - OTF_Writer_close(writer); - writer = NULL; - new_master = NULL; - } - - if(reader != NULL) { - OTF_Reader_close(reader); - reader = NULL; - } - - - if(handlers != NULL) { - OTF_HandlerArray_close(handlers); - handlers = NULL; - } - - if(manager != NULL) { - OTF_FileManager_close(manager); - manager = NULL; - } - - if(master != NULL) { - OTF_MasterControl_close(master); - master = NULL; - } - - if(new_master != NULL) { - OTF_MasterControl_close(new_master); - new_master = NULL; - } -} - diff --git a/externals/otf/tools/vtf2otf/Handler.c b/externals/otf/tools/vtf2otf/Handler.c deleted file mode 100644 index a02aaa56fdf0e8bff5f4d1f848cb67765a0d84f0..0000000000000000000000000000000000000000 --- a/externals/otf/tools/vtf2otf/Handler.c +++ /dev/null @@ -1,1423 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <stdio.h> - -#include "OTF_inttypes.h" -#include "OTF_Platform.h" - -#include "otf.h" - -#ifdef HAVE_VTF3 -#include "vtf3.h" -#endif /* HAVE_VTF3 */ - -#include "Handler.h" -#include "Stack.h" - - -#ifdef __GNUC__ -#else /* __GNUC__ */ -#define __PRETTY_FUNCTION__ "<unspecified function>" -#endif /* __GNUC__ */ - - -#ifdef HAVE_VTF3 - - -int handleClstrregval( void *fcb, double time, int clstrtoken, - int clstrregarraydim, const int *clstrregtokenarray, - const int *clstrregvaluetypearray, - const void *clstrregvaluearray ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleComment( void *fcb, double time, const char *comment ) { - - - /** always write a VTF3 comment to an OTF DefinitionComment. a time stamp - in the VTF3 comment record is ignored it */ - OTF_Writer_writeDefinitionComment( ((fcbT*)fcb)->writer, 0, comment ); - - - /* old version: - if ( time == 0 ) - OTF_Writer_writeDefinitionComment( fcb->writer, 0, comment ); - else - - / * which process to write the EventComment to * / - - OTF_Writer_writeEventComment( fcb->writer, time, ??? , comment ); - */ - - return 0; -} - - -int handleCpuregval( void *fcb, double time, unsigned int cpuid, - int cpuregarraydim, const int *cpuregtokenarray, - const int *cpuregvaluetypearray, - const void *cpuregvaluearray ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefact( void *fcb, int activitytoken, - const char *activityname ) { - - - OTF_Writer_writeDefFunctionGroup( ((fcbT*)fcb)->writer, 0, - activitytoken + 1, activityname ); - - return 0; -} - - -int handleDefact_obsol( void *fcb, int activitytoken, - const char *activityname ) { - - - OTF_Writer_writeDefFunctionGroup( ((fcbT*)fcb)->writer, 0, - activitytoken + 1, activityname ); - - return 0; -} - - -int handleDefclkperiod( void *fcb, double clkperiod ) { - - - /* ' + 0.5' makes proper rounding */ - - OTF_Writer_writeDefTimerResolution( ((fcbT*)fcb)->writer, 0, - (uint64_t) ( 1.0 / clkperiod + 0.5 ) ); - - return 0; -} - - -int handleDefclstr( void *fcb, int clstrtoken, const char *clstrname, - int cpuidarraydim, const unsigned int *cpuidarray ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefclstrreg( void *fcb, int clstrregtoken, - int clstrregclasstoken, int valuetype, const void *valuebounds, - const char *clstrregname, const char *clstrregunit ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefclstrregclass( void *fcb, int clstrregclasstoken, - const char *clstrregclassname ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefcommunicator( void *fcb, int communicator, - int communicatorsize, int tripletarraydim, - const unsigned int *tripletarray ) { - - - uint32_t* procs; - uint32_t p; - uint32_t i; - uint32_t j; - char tmp[32]; - /* set first two bits to 1 */ - uint32_t mcommunicator= ((uint32_t) communicator) | 0xc0000000; - int existing; - - fcbT *fha= ((fcbT*)fcb); - - - if ( 0 > communicator ) { - - fprintf( stderr, "WARNING in '%s': " - "VTF3 communicator id '%i' < 0 invalid\n", "handleDefcommunicator", communicator ); - } - - /* add the mapping */ - existing= 1; - while( 1 == existing ) { - - existing= 0; - - for( i= 0; i < (uint32_t)fha->reservedIdsc; ++i ) { - - if( fha->reservedIds[i] == mcommunicator ) { - existing= 1; - ++mcommunicator; - break; - } - } - } - addHash( fha->pghash, (uint32_t) communicator, mcommunicator ); - - fha->reservedIds= (uint32_t *) realloc( fha->reservedIds, sizeof( uint32_t ) - * ( fha->reservedIdsc + 1 ) ); - fha->reservedIds[fha->reservedIdsc]= mcommunicator; - ++fha->reservedIdsc; - - - procs= (uint32_t*) malloc( communicatorsize * sizeof(uint32_t) ); - assert( procs ); - - p= 0; - for ( i= 0; i < (uint32_t)tripletarraydim; i++ ) { - - for ( j= tripletarray[3*i+0]; j <= tripletarray[3*i+1]; j += tripletarray[3*i+2] ) { - - assert( p < (uint32_t)communicatorsize ); - procs[p]= j + 1; - p++; - } - } - - assert( p == (uint32_t)communicatorsize ); - - fha->processgroups= ( ProcessGroup* ) realloc( fha->processgroups, - sizeof(ProcessGroup) * (fha->processgroupcount + 1) ); - assert( NULL != fha->processgroups ); - - sprintf( tmp, "communicator %u", mcommunicator& 0x3fffffff ); - fha->processgroups[fha->processgroupcount].id= mcommunicator; - fha->processgroups[fha->processgroupcount].size= communicatorsize; - fha->processgroups[fha->processgroupcount].procs= procs; - fha->processgroups[fha->processgroupcount].name= strdup( tmp ); - - fha->processgroupcount++; - - return 0; -} - - -int handleDefcpugrp( void *fcb, unsigned int cpugrpid, - int cpuorcpugrpidarraydim, const unsigned int *cpuorcpugrpidarray, - const char *cpugrpname ) { - - - uint32_t* procs; - uint32_t i; - int existing; - uint32_t tmp; - /* set first bit to 1 */ - uint32_t mpg= (uint32_t) cpugrpid | 0x80000000; - - fcbT *fha= ((fcbT*)fcb); - - - if ( ( 1 << 31 ) > (int)cpugrpid ) { - - fprintf( stderr, "WARNING in '%s': " - "VTF3 cpu group id '%u' < 2^31 invalid\n", "handleDefcpugrp", cpugrpid ); - } - - - /* add the mapping */ - existing= 1; - while( 1 == existing ) { - - existing= 0; - - for( i= 0; i < (uint32_t)fha->reservedIdsc; ++i ) { - - if( fha->reservedIds[i] == mpg ) { - existing= 1; - ++mpg; - break; - } - } - } - addHash( fha->pghash, (uint32_t) cpugrpid, mpg ); - - fha->reservedIds= (uint32_t *) realloc( fha->reservedIds, sizeof( uint32_t ) - * ( fha->reservedIdsc + 1 ) ); - fha->reservedIds[fha->reservedIdsc]= mpg; - ++fha->reservedIdsc; - - procs= (uint32_t*) malloc( cpuorcpugrpidarraydim * sizeof(uint32_t) ); - assert( procs ); - - for ( i= 0; i < (uint32_t)cpuorcpugrpidarraydim; i++ ) { - - if( 0 == (cpuorcpugrpidarray[i]&0x80000000) ) { - - procs[i]= cpuorcpugrpidarray[i] +1; - - } else { - - tmp= searchHash( fha->pghash, cpuorcpugrpidarray[i] ); - if( 0 != tmp ) { - - procs[i]= tmp; - - } else { - - procs[i]= cpuorcpugrpidarray[i]; - } - } - } - - fha->processgroups= ( ProcessGroup* ) realloc( fha->processgroups, - sizeof(ProcessGroup) * (fha->processgroupcount + 1) ); - assert( NULL != fha->processgroups ); - - fha->processgroups[fha->processgroupcount].id= mpg; - fha->processgroups[fha->processgroupcount].size= cpuorcpugrpidarraydim; - fha->processgroups[fha->processgroupcount].procs= procs; - fha->processgroups[fha->processgroupcount].name= strdup( cpugrpname ); - - fha->processgroupcount++; - - return 0; -} - - -int handleDefcpuname( void *fcb, unsigned int cpuid, - const char *cpuname ) { - - - int cpu = cpuid&0xffff; - int thread = (cpuid>>16)&0xffff; - - - if ( ((fcbT*)fcb)->threadnums[cpu] < thread ) { - - fprintf( stderr, - "WARNING: Thread has not been defined, record ignored\n" ); - - return 0; - } - - ((fcbT*)fcb)->processes[cpu][thread].name = strdup( cpuname ); - - return 0; -} - - -int handleDefcpureg( void *fcb, int cpuregtoken, int cpuregclasstoken, - int valuetype, const void *valuebounds, - const char *cpuregname, const char *cpuregunit ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefcpuregclass( void *fcb, int cpuregclasstoken, - const char *cpuregclassname ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -/* -int handleDefcreator( void *fcbout, const char *creator ) -{ - OTF_Writer_writeDefCreator( ((fcbT*)fcb)->writer, VTF32OTFCREATOR ); - - return 0; -} -*/ - - - -int handleDefglobalop( void *fcb, int globaloptoken, - const char* globalopname ) { - - - OTF_Writer_writeDefCollectiveOperation( ((fcbT*)fcb)->writer, - 0 /* uint32_t stream */, - globaloptoken + 1/* uint32_t collOp */, - globalopname /* const char* name */, - OTF_COLLECTIVE_TYPE_UNKNOWN /* uint32_t type */ ); - - return 0; -} - - - -int handleDefiofile( void *fcb, int iofiletoken, int communicator, - const char *iofilename ) { - - - OTF_Writer_writeDefFile( ((fcbT*)fcb)->writer, 0/*stream*/, - iofiletoken+1/*token (+1 because 0 would be an invalid otf-token)*/, - iofilename/*name*/, 1/*default group*/ ); - - - return 0; -} - - -int handleDefkparreg( void *fcb, int kparregtoken, - const char *kparregname ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefmsgname( void *fcb, int msgtype, int communicator, - const char *msgname ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefopenmpname( void *fcb, unsigned int nametoken, - const char *openmpname ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefopenmptype( void *fcb, unsigned int constructtypetoken, - const char *constructtypename ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefpattern( void *fcb, int activitytoken, int pattoken, - int patshptoken, double radius, int ratio, - int timesteparraydim, const double *timesteparray ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefpatternshape( void *fcb, int activitytoken, int patshptoken, - int patterntype, int patshptokenbref1, int patshptokenbref2 ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefredfunc_obsol( void *fcb, int redfunctoken, - const char *redfuncname ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefsamp( void *fcb, int sampletoken, int sampleclasstoken, - int iscpugrpsamp, unsigned int cpuorcpugrpid, int valuetype, - const void *valuebounds, int dodifferentiation, - int datarephint, const char *samplename, const char *sampleunit ) { - - - /* default setting */ - uint32_t properties; - - static int first= 1; - - if ( 1 == first ) { - - first = 0; - - /* temporarily disabled */ - /* - fprintf( stderr, "translation of performance counter " - "definitions not fully supported\n" ); - */ - } - - if ( datarephint == VTF3_DATAREPHINT_SAMPLE ) { - - properties = OTF_COUNTER_SCOPE_START; - - } else if ( datarephint == VTF3_DATAREPHINT_BEFORE ) { - - properties = OTF_COUNTER_SCOPE_LAST; - - } else { - - properties = OTF_COUNTER_SCOPE_START; /* standard value */ - - fprintf( stderr, "vtf2otf: in %s: counter type not yet supported," - "might not be translated correctly!!!\n", __PRETTY_FUNCTION__ ); - } - - if ( dodifferentiation ) { - - properties |= OTF_COUNTER_TYPE_ACC; - - } else { - - properties |= OTF_COUNTER_TYPE_ABS; - } - - OTF_Writer_writeDefCounter( ((fcbT*)fcb)->writer, 0, sampletoken + 1, - samplename, properties, sampleclasstoken + 1, sampleunit ); - - return 0; -} - - -int handleDefsampclass( void *fcb, int sampleclasstoken, - const char *sampleclassname ) { - - - OTF_Writer_writeDefCounterGroup( ((fcbT*)fcb)->writer, 0, - sampleclasstoken + 1, sampleclassname ); - - return 0; -} - - -int handleDefscl( void *fcb, int scltoken, int sclarraydim, - const int *sclfiletokenarray, const int *scllinepositionarray ) { - - - int i; - - - for( i = 0; i < sclarraydim; ++i ) { - - - OTF_Writer_writeDefScl( ((fcbT*)fcb)->writer, 0, scltoken, - sclfiletokenarray[i] + 1, scllinepositionarray[i] ); - } - - return 0; -} - - -int handleDefsclfile( void *fcb, int sclfiletoken, - const char *sclfilename ) { - - - OTF_Writer_writeDefSclFile( ((fcbT*)fcb)->writer, 0, sclfiletoken + 1, - sclfilename ); - - return 0; -} - - -int handleDefstate( void *fcb, int activitytoken, int statetoken, - const char *statename, int scltoken ) { - - - OTF_Writer_writeDefFunction( ((fcbT*)fcb)->writer, 0, ++statetoken, - statename, activitytoken + 1, scltoken ); - - return 0; -} - - -int handleDefstate_obsol( void *fcb, int activitytoken, - const char *activityname, unsigned int activityvalidity, - int statetoken, const char *statename ) { - - - OTF_Writer_writeDefFunction( ((fcbT*)fcb)->writer, 0, statetoken + 1, - statename, activitytoken + 1, 0 ); - - return 0; -} - - -int handleDefsyscpunames( void *fcb, int systemcpunamearraydim, - char * const *systemcpunamearray ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefsyscpunums( void *fcb, int systemcpunumberarraydim, - const int *systemcpunumberarray ) { - - - int a = 0; - int i = 0; - - - ((fcbT*)fcb)->processcount = 0; - - for( i = 0; i < systemcpunumberarraydim; i++) - for( a = 0; a < systemcpunumberarray[i]; a++) - ((fcbT*)fcb)->processcount++; - - /* create cpu array (needed for threadnums and carrying the names) */ - ((fcbT*)fcb)->processes = ( processT** ) malloc ( sizeof( processT* ) - * ((fcbT*)fcb)->processcount ); - ((fcbT*)fcb)->threadnums = (int*) malloc( sizeof( int ) - * ((fcbT*)fcb)->processcount ); - - for( i = 0; i < ((fcbT*)fcb)->processcount; i++) { - - - ((fcbT*)fcb)->threadnums[i] = 1; - ((fcbT*)fcb)->processes[i] = ( processT* ) malloc ( sizeof (processT) ); - ((fcbT*)fcb)->processes[i][0].stack = Stack_new(); - ((fcbT*)fcb)->processes[i][0].name = 0; - ((fcbT*)fcb)->processes[i][0].filepos= 0; - ((fcbT*)fcb)->processes[i][0].fileIObegin = (uint64_t) -1; /* invalid timestamp */ - ((fcbT*)fcb)->processes[i][0].fileIObufferpos = 0; - ((fcbT*)fcb)->processes[i][0].fileIObufferlen = 0; - } - - return 0; -} - - -int handleDefthreadnums( void *fcb, int threadnumarraydim, - const int *threadnumarray ) { - - - int i; - int a; - processT **processestmp; - - - if ( 0 == ((fcbT*)fcb)->processes ) { - - fprintf( stderr, "ERROR: Missing NCPU record\n" ); - exit(1); - } - - - /* copy threadnumarray */ - free( ((fcbT*)fcb)->threadnums ); - - ((fcbT*)fcb)->threadnums = (int*) malloc( sizeof( int ) - * threadnumarraydim ); - memcpy( ((fcbT*)fcb)->threadnums, threadnumarray, sizeof( int ) - * threadnumarraydim ); - - processestmp = ( processT** ) malloc ( sizeof( processT* ) - * ((fcbT*)fcb)->processcount ); - - for( i = 0; i < threadnumarraydim; ++i ) { - - processestmp[i] = ( processT* ) malloc ( sizeof (processT) - * threadnumarray[i]); - - processestmp[i][0].stack = ((fcbT*)fcb)->processes[i][0].stack; - processestmp[i][0].name = ((fcbT*)fcb)->processes[i][0].name; - processestmp[i][0].fileIObegin = (uint64_t) -1; - processestmp[i][0].filepos = 0; - processestmp[i][0].fileIObufferpos = 0; - processestmp[i][0].fileIObufferlen = 0; - /* remove pointers from original array (to prevent free errors later )*/ - ((fcbT*)fcb)->processes[i][0].name = 0; - ((fcbT*)fcb)->processes[i][0].stack = 0; - /* init the threads */ - for( a = 1; a < threadnumarray[i]; ++a ) { - - processestmp[i][a].stack = Stack_new(); - processestmp[i][a].name = 0; - processestmp[i][a].fileIObegin = (uint64_t) -1; /* invalid timestamp */ - processestmp[i][a].filepos = 0; - processestmp[i][a].fileIObufferpos = 0; - processestmp[i][a].fileIObufferlen = 0; - } - } - - /* delete old processarray */ - for( i = 0; i < ((fcbT*)fcb)->processcount; ++i ) { - - free( ((fcbT*)fcb)->processes[i] ); - } - - free( ((fcbT*)fcb)->processes ); - - ((fcbT*)fcb)->processes = processestmp; - ((fcbT*)fcb)->processcount = threadnumarraydim; - - return 0; -} - - -int handleDeftimeoffset( void *fcb, double timeoffset ) { - - - static int first= 1; - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleDefunmerged( void *fcb ) { - - - static int first= 1; - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -/* -int handleDefversion( void *fcbout, int versionnumber ) -{ - OTF_Writer_writeDefversion( (OTF_Writer*) fcbout, versionnumber, 0, 0 ); - - return 0; -} -*/ - - -int handleDownto( void *fcb, double time, int statetoken, - unsigned int cpuid, int scltoken ) { - - - StackEntryT entry; - - int cpu = (cpuid&0xffff); - int thread = (cpuid>>16)&0xffff; - - - ++cpuid; - ++statetoken; - - OTF_Writer_writeEnter( ((fcbT*)fcb)->writer, (uint64_t) time, statetoken, - cpuid, scltoken ); - - entry.state = statetoken; - - Stack_push( ((fcbT*)fcb)->processes[cpu][thread].stack, &entry ); - - return 0; -} - - -int handleUpfrom( void *fcb, double time, int statetoken, - unsigned int cpuid, int scltoken ) { - - - int cpu = cpuid&0xffff; - int thread = (cpuid>>16)&0xffff; - /* StackEntry entry; */ - - - ++cpuid; - ++statetoken; - - /* entry = */ Stack_pop( ((fcbT*)fcb)->processes[cpu][thread].stack ); - - OTF_Writer_writeLeave( ((fcbT*)fcb)->writer, (uint64_t) time, statetoken, - cpuid, scltoken ); - - return 0; -} - - -int handleUpto( void *fcb, double time, int statetoken, - unsigned int cpuid, int scltoken ) { - - - StackEntryT entry; - int cpu = cpuid&0xffff; - int thread = (cpuid>>16)&0xffff; - - - ++cpuid; - ++statetoken; - - entry = Stack_pop( ((fcbT*)fcb)->processes[cpu][thread].stack ); - - OTF_Writer_writeLeave( ((fcbT*)fcb)->writer, (uint64_t) time, entry.state, - cpuid, scltoken ); - - return 0; -} - - -int handleExchange( void *fcb, double time, unsigned int cpuid, - int exchangetype, int statetoken, int job, int scltoken ) { - - - if ( exchangetype == VTF3_EXCHANGETYPE_DOWNTO ) { - - return handleDownto( fcb, time, statetoken, cpuid, scltoken ); - - } else if ( exchangetype == VTF3_EXCHANGETYPE_UPTO ) { - - return handleUpto( fcb, time, statetoken, cpuid, scltoken ); - - } else if ( exchangetype == VTF3_EXCHANGETYPE_UPFROM ) { - - return handleUpfrom( fcb, time, statetoken, cpuid, scltoken ); - - } else { - - fprintf( stderr, "ERROR: Unknown exchange type\n"); - exit(1); - } - - return 0; -} - - -int handleExchange_obsol( void *fcb, double time, unsigned int cpuid, - int exchangetype, int statetoken, int activitytoken, - const char *activityname, unsigned int activityvalidity, int job ) { - - - static int first= 1; - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleFileiobegin( void *fcbx, double time, unsigned int cpuid, - int fileiotype, int iofiletoken, int bytescopied, int scltoken ) { - - - int cpu = (cpuid&0xffff); - int thread = (cpuid>>16)&0xffff; - uint32_t otfiotype; - fcbT* fcb= (fcbT*) fcbx; - processT* proc= &((fcbT*)fcb)->processes[cpu][thread]; - uint64_t duration; - - if( 0 == fcb->ioonly ) { - - if( VTF3_FILEIOTYPE_READ == fileiotype ) { - otfiotype= OTF_FILEOP_READ; - } else if ( VTF3_FILEIOTYPE_WRITE == fileiotype ) { - otfiotype= OTF_FILEOP_WRITE; - } else { - fprintf( stderr, "ERROR: fileiobegin: unknown fileiotype %i.skipping.\n", fileiotype ); - return 0; - } - - - /* re-read the extra information if there is nothing left */ - if( proc->fileIObufferpos >= proc->fileIObufferlen ) { - - readFileIOBuffer( cpuid, proc, fcb->outputFile ); - } - - - ++cpuid; - ++iofiletoken; - - if( proc->fileIObufferpos >= proc->fileIObufferlen ) { - duration= 0; - } else if ( time == proc->fileIObuffer[proc->fileIObufferpos] ) { - duration= proc->fileIObuffer[proc->fileIObufferpos+1]; - } else { - duration= 0; - } - - OTF_Writer_writeFileOperation( fcb->writer, time, iofiletoken, cpuid, - fcb->handleid, otfiotype, (uint64_t) bytescopied, duration, - (uint32_t) scltoken ); - - ++fcb->handleid; - ++proc->fileIObufferpos; - - - } else { - - /* 1 == fcb->ioonly */ - - if( proc->fileIObegin == (uint64_t) -1 ) { - - proc->fileIObegin= time; /* set starttimestamp */ - - } else { - - fprintf( stderr, "ERROR: fileiobegin after fileiobegin (without end in between). Overwriting.\n" ); - return 0; - - } - - } - - return 0; -} - - -int handleFileioend( void *fcbx, double time, unsigned int cpuid, - int fileiotype, int iofiletoken, int bytescopied, int scltoken ) { - - - int cpu = (cpuid&0xffff); - int thread = (cpuid>>16)&0xffff; - fcbT* fcb= (fcbT*) fcbx; - processT* proc= &((fcbT*)fcb)->processes[cpu][thread]; - - if( 0 == fcb->ioonly ) { - - /* ignore, because the starttime(begin record) and duration(extra-info) - are important */ - - } else { - - /* 1 == fcb->ioonly */ - - if( proc->fileIObegin != (uint64_t) -1 ) { - - if( proc->fileIObufferpos > 2045 ) writeFileIOBuffer( cpuid, proc, fcb->outputFile ); - - proc->fileIObuffer[proc->fileIObufferpos]= proc->fileIObegin; - proc->fileIObuffer[proc->fileIObufferpos+1]= time - proc->fileIObegin; - - proc->fileIObufferpos+= 2; - - } else { - - fprintf( stderr, "ERROR: fileioend with no fileiobegin. Ignoring.\n" ); - return 0; - - } - } - - return 0; -} - - -int handleGlobalop( void *fcb, double time, int globaloptoken, - unsigned int cpuid, int communicator, unsigned int rootcpuid, - int bytessent, int bytesreceived, double durationtimesteps, - int scltoken ) { - - - uint32_t tmp; - - ++cpuid; - - - /* map it */ - tmp= searchHash( ((fcbT*)fcb)->pghash, (uint32_t) communicator ); - if( 0 != tmp ) { - communicator= tmp; - } - - - if ( rootcpuid >= (unsigned int)((fcbT*)fcb)->processcount ) { - - /* invalid root cpu id => translate to '0' */ - rootcpuid= 0; - - } else { - - ++rootcpuid; - } - - OTF_Writer_writeCollectiveOperation( ((fcbT*)fcb)->writer, (uint64_t) time, - cpuid, globaloptoken + 1, communicator, rootcpuid, bytessent, bytesreceived, - (uint64_t) durationtimesteps, scltoken ); - - return 0; -} - - -int handleKparregbarsum( void *fcb, double time, unsigned int cpuid, - int kparregtoken, int seqn, int opasize, - const void *opastream, int scltoken ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleKparregbegin( void *fcb, double time, unsigned int cpuid, - int kparregtoken, int seqn, int numthreads, int scltoken ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleKparregend( void *fcb, double time, unsigned int cpuid, - int kparregtoken, int seqn, int opasize, - const void *opastream, int scltoken ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleMutexacquire( void *fcb, double time, unsigned int cpuid, - int enterstatetoken, int leavestatetoken, - int leavestatetokenisupfrom, double durationtimesteps, - int mutexsize, const void *mutex, int scltoken ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleMutexrelease( void *fcb, double time, unsigned int cpuid, - int enterstatetoken, int leavestatetoken, - int leavestatetokenisupfrom, double durationtimesteps, - int mutexsize, const void *mutex, int scltoken ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleOpenmpenter( void *fcb, double time, unsigned int cpuid, - unsigned int constructtypetoken, unsigned int nametoken, - int scltoken ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleOpenmpleave( void *fcb, double time, - unsigned int cpuid, int scltoken ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - -int handlePattern( void *fcb, double time, unsigned int cpuid, - int patorpatshptoken, double durationtimesteps, - int timesteparraydim, const double *timesteparray, - const int *patchindexarray ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleRecvmsg( void *fcb, double time, unsigned int receiver, - unsigned int sender, int communicator, int msgtype, - int msglength, int scltoken ) { - - - uint32_t tmp; - - if ( receiver == (uint32_t) -1 || sender == (uint32_t) -1 ) - fprintf( stderr, "cpuid is not supposed to be -1" ); - - /* map it */ - tmp= searchHash( ((fcbT*)fcb)->pghash, (uint32_t) communicator ); - if( 0 != tmp ) { - communicator= tmp; - } - - - ++receiver; - ++sender; - - OTF_Writer_writeRecvMsg( ((fcbT*)fcb)->writer, (uint64_t) time, receiver, - sender, communicator, msgtype, msglength, scltoken ); - - return 0; -} - - -int handleSamp( void *fcb, double time, unsigned int cpuorcpugrpid, - int samplearraydim, const int *sampletokenarray, - const int *samplevaluetypearray, const void *samplevaluearray ) { - - - int i; - uint64_t tmp; - uint32_t tmp2; - - /* group means first bit equals 1 */ - if ( (cpuorcpugrpid&0x80000000) == 0) { - - if ( cpuorcpugrpid == (uint32_t) -1 ) { - - fprintf( stderr, "cpuid is not supposed to be -1" ); - } - - ++cpuorcpugrpid; - } else { - - /* map it */ - tmp2= searchHash( ((fcbT*)fcb)->pghash, (uint32_t) cpuorcpugrpid ); - if( 0 != tmp2 ) { - cpuorcpugrpid= tmp2; - } - - } - - for( i = 0; i < samplearraydim; ++i ) { - - if ( samplevaluetypearray[i] == VTF3_VALUETYPE_FLOAT ) { - - tmp = (uint64_t) ( ((double*) samplevaluearray)[i] + 0.5f ); - } else { - - tmp = ( (uint64_t*) samplevaluearray )[i]; - } - - OTF_Writer_writeCounter( ((fcbT*)fcb)->writer, (uint64_t) time, - cpuorcpugrpid, sampletokenarray[i] + 1, tmp ); - } - - return 0; -} - - -int handleSendmsg( void *fcb, double time, unsigned int sender, - unsigned int receiver, int communicator, int msgtype, - int msglength, int scltoken ) { - - - uint32_t tmp; - - if ( receiver == (uint32_t) -1 || sender == (uint32_t) -1 ) - fprintf( stderr, "cpuid is not supposed to be -1" ); - - /* map it */ - tmp= searchHash( ((fcbT*)fcb)->pghash, (uint32_t) communicator ); - if( 0 != tmp ) { - communicator= tmp; - } - - - ++receiver; - ++sender; - - OTF_Writer_writeSendMsg( ((fcbT*)fcb)->writer, (uint64_t) time, sender, - receiver, communicator, msgtype, msglength, scltoken ); - - return 0; -} - - -int handleSrcinfo_obsol( void *fcb, double time, int activitytoken, - int statetoken, int scllineposition ) { - - - static int first= 1; - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - - -int handleUnrecognizable( void *fcb, double lastvalidtime, - int numberofunrecognizablechars, int typeofunrecognizablerecord, - const char *unrecognizablerecord ) { - - - static int first= 1; - - - if ( 1 == first ) { - - first= 0; - - fprintf( stderr, "%s: Record not implemented in OTF_\n", - __PRETTY_FUNCTION__ ); - } - - return 0; -} - -#endif /* HAVE_VTF3 */ diff --git a/externals/otf/tools/vtf2otf/Handler.h b/externals/otf/tools/vtf2otf/Handler.h deleted file mode 100644 index f48aa2b139d5a2405cdeabce4ebc1083003465f2..0000000000000000000000000000000000000000 --- a/externals/otf/tools/vtf2otf/Handler.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef VTF3TOOTF_HANDLER_H -#define VTF3TOOTF_HANDLER_H - -int handleClstrregval( void *fcbout, double time, int clstrtoken, - int clstrregarraydim, const int *clstrregtokenarray, - const int *clstrregvaluetypearray, - const void *clstrregvaluearray ); - -int handleComment( void *fcbout, double time, const char *comment ); - -int handleCpuregval( void *fcbout, double time, unsigned int cpuid, - int cpuregarraydim, const int *cpuregtokenarray, - const int *cpuregvaluetypearray, - const void *cpuregvaluearray ); - -int handleDefact( void *fcbout, int activitytoken, - const char *activityname ); - -int handleDefact_obsol( void *fcbout, int activitytoken, - const char *activityname ); - -int handleDefclkperiod( void *fcbout, double clkperiod ); - -int handleDefclstr( void *fcbout, int clstrtoken, const char *clstrname, - int cpuidarraydim, const unsigned int *cpuidarray ); - -int handleDefclstrreg( void *fcbout, int clstrregtoken, - int clstrregclasstoken, int valuetype, - const void *valuebounds, const char *clstrregname, - const char *clstrregunit ); - -int handleDefclstrregclass( void *fcbout, int clstrregclasstoken, - const char *clstrregclassname ); - -int handleDefcommunicator( void *fcbout, int communicator, - int communicatorsize, int tripletarraydim, - const unsigned int *tripletarray ); - -int handleDefcpugrp( void *fcbout, unsigned int cpugrpid, - int cpuorcpugrpidarraydim, - const unsigned int *cpuorcpugrpidarray, - const char *cpugrpname ); - -int handleDefcpuname( void *fcbout, unsigned int cpuid, - const char *cpuname ); - -int handleDefcpureg( void *fcbout, int cpuregtoken, int cpuregclasstoken, - int valuetype, const void *valuebounds, - const char *cpuregname, const char *cpuregunit ); - -int handleDefcpuregclass( void *fcbout, int cpuregclasstoken, - const char *cpuregclassname ); - -/* -int handleDefcreator( void *fcbout, const char *creator ); -*/ - -int handleDefglobalop( void *fcbout, int globaloptoken, - const char *globalopname ); - -int handleDefiofile( void *fcbout, int iofiletoken, int communicator, - const char *iofilename ); - -int handleDefkparreg( void *fcbout, int kparregtoken, - const char *kparregname ); - -int handleDefmsgname( void *fcbout, int msgtype, int communicator, - const char *msgname ); - -int handleDefopenmpname( void *fcbout, unsigned int nametoken, - const char *openmpname ); - -int handleDefopenmptype( void *fcbout, unsigned int constructtypetoken, - const char *constructtypename ); - -int handleDefpattern( void *fcbout, int activitytoken, int pattoken, - int patshptoken, double radius, int ratio, - int timesteparraydim, const double *timesteparray ); - -int handleDefpatternshape( void *fcbout, int activitytoken, int patshptoken, - int patterntype, int patshptokenbref1, int patshptokenbref2 ); - -int handleDefredfunc_obsol( void *fcbout, int redfunctoken, - const char *redfuncname ); - -int handleDefsamp( void *fcbout, int sampletoken, int sampleclasstoken, - int iscpugrpsamp, unsigned int cpuorcpugrpid, int valuetype, - const void *valuebounds, int dodifferentiation, - int datarephint, const char *samplename, - const char *sampleunit ); - -int handleDefsampclass( void *fcbout, int sampleclasstoken, - const char *sampleclassname ); - -int handleDefscl( void *fcbout, int scltoken, int sclarraydim, - const int *sclfiletokenarray, - const int *scllinepositionarray ); - -int handleDefsclfile( void *fcbout, int sclfiletoken, - const char *sclfilename ); - -int handleDefstate( void *fcbout, int activitytoken, int statetoken, - const char *statename, int scltoken ); - -int handleDefstate_obsol( void *fcbout, int activitytoken, - const char *activityname, unsigned int activityvalidity, - int statetoken, const char *statename ); - -int handleDefsyscpunames( void *fcbout, int systemcpunamearraydim, - char * const *systemcpunamearray ); - -int handleDefsyscpunums( void *fcbout, int systemcpunumberarraydim, - const int *systemcpunumberarray ); - -int handleDefthreadnums( void *fcbout, int threadnumarraydim, - const int *threadnumarray ); - -int handleDeftimeoffset( void *fcbout, double timeoffset ); - -int handleDefunmerged( void *fcbout ); - -/* doesn´t exist in otf -int handleDefversion( void *fcbout, int versionnumber ); -*/ -int handleDownto( void *fcbout, double time, int statetoken, - unsigned int cpuid, int scltoken ); - -int handleExchange( void *fcbout, double time, unsigned int cpuid, - int exchangetype, int statetoken, int job, int scltoken ); - -int handleExchange_obsol( void *fcbout, double time, unsigned int cpuid, - int exchangetype, int statetoken, int activitytoken, - const char *activityname, unsigned int activityvalidity, - int job ); - -int handleFileiobegin( void *fcbout, double time, unsigned int cpuid, - int fileiotype, int iofiletoken, int bytescopied, - int scltoken ); - -int handleFileioend( void *fcbout, double time, unsigned int cpuid, - int fileiotype, int iofiletoken, int bytescopied, - int scltoken ); - -int handleGlobalop( void *fcbout, double time, int globaloptoken, - unsigned int cpuid, int communicator, - unsigned int rootcpuid, int bytessent, int bytesreceived, - double durationtimesteps, int scltoken ); - -int handleKparregbarsum( void *fcbout, double time, unsigned int cpuid, - int kparregtoken, int seqn, int opasize, - const void *opastream, int scltoken ); - -int handleKparregbegin( void *fcbout, double time, unsigned int cpuid, - int kparregtoken, int seqn, int numthreads, int scltoken ); - -int handleKparregend( void *fcbout, double time, unsigned int cpuid, - int kparregtoken, int seqn, int opasize, - const void *opastream, int scltoken ); - -int handleMutexacquire( void *fcbout, double time, unsigned int cpuid, - int enterstatetoken, int leavestatetoken, - int leavestatetokenisupfrom, double durationtimesteps, - int mutexsize, const void *mutex, int scltoken ); - -int handleMutexrelease( void *fcbout, double time, unsigned int cpuid, - int enterstatetoken, int leavestatetoken, - int leavestatetokenisupfrom, double durationtimesteps, - int mutexsize, const void *mutex, int scltoken ); - -int handleOpenmpenter( void *fcbout, double time, unsigned int cpuid, - unsigned int constructtypetoken, unsigned int nametoken, int scltoken ); - -int handleOpenmpleave( void *fcbout, double time, unsigned int cpuid, - int scltoken ); - -int handlePattern( void *fcbout, double time, unsigned int cpuid, - int patorpatshptoken, double durationtimesteps, - int timesteparraydim, const double *timesteparray, - const int *patchindexarray ); - -int handleRecvmsg( void *fcbout, double time, unsigned int receiver, - unsigned int sender, int communicator, int msgtype, - int msglength, int scltoken ); - -int handleSamp( void *fcbout, double time, unsigned int cpuorcpugrpid, - int samplearraydim, const int *sampletokenarray, - const int *samplevaluetypearray, - const void *samplevaluearray ); - -int handleSendmsg( void *fcbout, double time, unsigned int sender, - unsigned int receiver, int communicator, int msgtype, - int msglength, int scltoken ); - -int handleSrcinfo_obsol( void *fcbout, double time, int activitytoken, - int statetoken, int scllineposition ); - -int handleUnrecognizable( void *fcbout, double lastvalidtime, - int numberofunrecognizablechars, - int typeofunrecognizablerecord, - const char *unrecognizablerecord ); - -int handleUpfrom( void *fcbout, double time, int statetoken, - unsigned int cpuid, int scltoken ); - -int handleUpto( void *fcbout, double time, int statetoken, - unsigned int cpuid, int scltoken ) ; - - -#endif /* VTF3TOOTF_HANDLER_H */ diff --git a/externals/otf/tools/vtf2otf/Hash.c b/externals/otf/tools/vtf2otf/Hash.c deleted file mode 100644 index 824ac2acb662cac4da5240fd267846e1b2ac2c97..0000000000000000000000000000000000000000 --- a/externals/otf/tools/vtf2otf/Hash.c +++ /dev/null @@ -1,130 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#include "Hash.h" - -#include <stdlib.h> -#include <memory.h> - -/* *** macros ****************************************/ -#ifndef sun - -#define HASH_GET_KEY(key) \ -{ \ - key += ~(key << 15); \ - key ^= (key >> 10); \ - key += (key << 3); \ - key ^= (key >> 6); \ - key += ~(key << 11); \ - key ^= (key >> 16); \ - key &= HASHSIZE - 1; \ -} - -#else /* sun */ - -/* stupid stupid gcc2.95 on sun */ - -uint32_t hash_get_key( uint32_t key ) { - - key += ~(key << 15); - key ^= (key >> 10); - key += (key << 3); - key ^= (key >> 6); - key += ~(key << 11); - key ^= (key >> 16); - key &= HASH_SIZE - 1; - - return key; -} - -#define HASH_GET_KEY(key) key= hash_get_key(key) - -#endif /* sun */ - - -Hash *initHash() { - - - Hash *ret= (Hash*) malloc( sizeof( Hash ) ); - memset( ret, 0, sizeof( Hash ) ); - - return ret; -} - - -void closeHash( Hash *hash ) { - - - int i; - - for( i= 0; i < HASHSIZE; ++i ) { - - if( NULL != hash->entrys[i].children ) { - free( hash->entrys[i].children ); - } - hash->entrys[i].children= NULL; - hash->entrys[i].childrenc= 0; - - } - - free( hash ); -} - - -uint32_t searchHash( Hash *hash, uint32_t src ) { - - - int i; - uint32_t key= src; - - if( NULL == hash ) { - return 0; - } - - HASH_GET_KEY( key ); - - if( src == hash->entrys[key].src ) { - return hash->entrys[key].dst; - } - - for( i= 0; i < hash->entrys[key].childrenc; ++i ) { - - if( src == hash->entrys[key].children[i].src ) { - return hash->entrys[key].children[i].dst; - } - } - - - return 0; -} - - -void addHash( Hash *hash, uint32_t src, uint32_t dst ) { - - - uint32_t key= src; - - HASH_GET_KEY( key ); - - /* free entry */ - if( 0 == hash->entrys[key].src ) { - - hash->entrys[key].src= src; - hash->entrys[key].dst= dst; - - } else { - - hash->entrys[key].children= (SubEntry*) realloc( - hash->entrys[key].children, sizeof( SubEntry ) * - (hash->entrys[key].childrenc + 1) ); - - hash->entrys[key].children[hash->entrys[key].childrenc].src= src; - hash->entrys[key].children[hash->entrys[key].childrenc].dst= dst; - - ++hash->entrys[key].childrenc; - } - - -} diff --git a/externals/otf/tools/vtf2otf/Hash.h b/externals/otf/tools/vtf2otf/Hash.h deleted file mode 100644 index 3b5160438e31e428df34691bbb4099e9ab331a96..0000000000000000000000000000000000000000 --- a/externals/otf/tools/vtf2otf/Hash.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef HASH_H -#define HASH_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include "OTF_inttypes.h" - -#define HASHSIZE 1024 - - -struct struct_SubEntry { - - uint32_t src; - uint32_t dst; -}; -typedef struct struct_SubEntry SubEntry; - - -struct struct_MainEntry { - - uint32_t src; - uint32_t dst; - - SubEntry *children; - int childrenc; -}; -typedef struct struct_MainEntry MainEntry; - - -struct struct_Hash { - - MainEntry entrys[HASHSIZE]; -}; -typedef struct struct_Hash Hash; - - -Hash *initHash( void ); -void closeHash( Hash *hash ); -uint32_t searchHash( Hash *hash, uint32_t src ); -void addHash( Hash *hash, uint32_t src, uint32_t dst ); - -#endif /* HASH_H */ diff --git a/externals/otf/tools/vtf2otf/Makefile.am b/externals/otf/tools/vtf2otf/Makefile.am deleted file mode 100644 index 72db9a5cd906d8beb261014cf085a94935254913..0000000000000000000000000000000000000000 --- a/externals/otf/tools/vtf2otf/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -INCLUDES = \ - -I$(top_builddir)/otflib -I$(top_srcdir)/otflib \ - $(VTF3_INCLUDE_LINE) - -if AMBUILDBINARIES -bin_PROGRAMS = \ - vtf2otf -endif - -vtf2otf_LDADD = $(top_builddir)/otflib/libotf.la $(VTF3_LIB_LINE) -vtf2otf_DEPENDENCIES = $(top_builddir)/otflib/libotf.la -vtf2otf_SOURCES = \ - Handler.h \ - Stack.h \ - Hash.h \ - vtf2otf.c \ - Handler.c \ - Stack.c \ - Hash.c - diff --git a/externals/otf/tools/vtf2otf/Makefile.in b/externals/otf/tools/vtf2otf/Makefile.in deleted file mode 100644 index da68dfbdc65da6a7bd0ab280e12a73d3dc3a09b3..0000000000000000000000000000000000000000 --- a/externals/otf/tools/vtf2otf/Makefile.in +++ /dev/null @@ -1,600 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -@AMBUILDBINARIES_TRUE@bin_PROGRAMS = vtf2otf$(EXEEXT) -subdir = tools/vtf2otf -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ - $(top_srcdir)/config/m4/ltoptions.m4 \ - $(top_srcdir)/config/m4/ltsugar.m4 \ - $(top_srcdir)/config/m4/ltversion.m4 \ - $(top_srcdir)/config/m4/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/config/m4/acinclude.debug.m4 \ - $(top_srcdir)/config/m4/acinclude.math.m4 \ - $(top_srcdir)/config/m4/acinclude.mpi.m4 \ - $(top_srcdir)/config/m4/acinclude.omp.m4 \ - $(top_srcdir)/config/m4/acinclude.pydev.m4 \ - $(top_srcdir)/config/m4/acinclude.swig.m4 \ - $(top_srcdir)/config/m4/acinclude.swig_python.m4 \ - $(top_srcdir)/config/m4/acinclude.vtf3.m4 \ - $(top_srcdir)/config/m4/acinclude.verbose.m4 \ - $(top_srcdir)/config/m4/acinclude.zlib.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_mpi.m4 \ - $(top_srcdir)/config/m4/acarchive/ax_openmp.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__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) -am_vtf2otf_OBJECTS = vtf2otf.$(OBJEXT) Handler.$(OBJEXT) \ - Stack.$(OBJEXT) Hash.$(OBJEXT) -vtf2otf_OBJECTS = $(am_vtf2otf_OBJECTS) -am__DEPENDENCIES_1 = -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(vtf2otf_SOURCES) -DIST_SOURCES = $(vtf2otf_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MATHLIB = @MATHLIB@ -MKDIR_P = @MKDIR_P@ -MPICC = @MPICC@ -MPILIBS = @MPILIBS@ -MPI_INCLUDE_DIR = @MPI_INCLUDE_DIR@ -MPI_INCLUDE_LINE = @MPI_INCLUDE_LINE@ -MPI_LIB_DIR = @MPI_LIB_DIR@ -MPI_LIB_LINE = @MPI_LIB_LINE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@ -OTF_VERSION_LIBRARY = @OTF_VERSION_LIBRARY@ -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@ -PYTHON = @PYTHON@ -PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ -PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ -PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ -PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ -PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -SWIG = @SWIG@ -SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@ -SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@ -VERSION = @VERSION@ -VTF3_INCLUDE_DIR = @VTF3_INCLUDE_DIR@ -VTF3_INCLUDE_LINE = @VTF3_INCLUDE_LINE@ -VTF3_LIB_DIR = @VTF3_LIB_DIR@ -VTF3_LIB_LINE = @VTF3_LIB_LINE@ -ZLIB_INCLUDE_DIR = @ZLIB_INCLUDE_DIR@ -ZLIB_INCLUDE_LINE = @ZLIB_INCLUDE_LINE@ -ZLIB_LIB_DIR = @ZLIB_LIB_DIR@ -ZLIB_LIB_LINE = @ZLIB_LIB_LINE@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -have_inttypes_h = @have_inttypes_h@ -have_stdint_h = @have_stdint_h@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sizeof_long = @sizeof_long@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -INCLUDES = \ - -I$(top_builddir)/otflib -I$(top_srcdir)/otflib \ - $(VTF3_INCLUDE_LINE) - -vtf2otf_LDADD = $(top_builddir)/otflib/libotf.la $(VTF3_LIB_LINE) -vtf2otf_DEPENDENCIES = $(top_builddir)/otflib/libotf.la -vtf2otf_SOURCES = \ - Handler.h \ - Stack.h \ - Hash.h \ - vtf2otf.c \ - Handler.c \ - Stack.c \ - Hash.c - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/vtf2otf/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tools/vtf2otf/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -vtf2otf$(EXEEXT): $(vtf2otf_OBJECTS) $(vtf2otf_DEPENDENCIES) - @rm -f vtf2otf$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(vtf2otf_OBJECTS) $(vtf2otf_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Handler.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Hash.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Stack.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vtf2otf.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS 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-binPROGRAMS - -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: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - 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-binPROGRAMS 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 \ - uninstall-binPROGRAMS - - -# 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/externals/otf/tools/vtf2otf/Stack.c b/externals/otf/tools/vtf2otf/Stack.c deleted file mode 100644 index f9733e63fa867e0f37f9d4f31fabc3bfdd149fbf..0000000000000000000000000000000000000000 --- a/externals/otf/tools/vtf2otf/Stack.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <stdio.h> -#include <stdlib.h> -#include <assert.h> - -#include "Stack.h" - - -StackT* Stack_new() { - - - StackT* ret = NULL; - - /* allocate memory for the stack */ - ret = (StackT*) malloc( sizeof( StackT ) ); - assert( ret != NULL ); - - ret->n = 0; - ret->s = 0; - ret->stack = 0; - - return ret; -} - -void Stack_push( StackT* stack, StackEntryT* entry ) { - - - /* realloc ? */ - if ( stack->n >= stack->s ) - { - stack->s= ( stack->s > 0 ) ? ( 2* stack->s ) : 10; - stack->stack= (StackEntryT*) realloc( stack->stack, - stack->s * sizeof(StackEntryT) ); - assert( NULL != stack->stack ); - } - - stack->stack[stack->n] = *entry; - - ++(stack->n); - - return; -} - -StackEntryT Stack_pop( StackT* stack ) { - - - if( stack->n < 1 ) - { - fprintf( stderr, "ERROR: Stack is empty\n" ); - exit( 1 ); - } - - --(stack->n); - - return stack->stack[stack->n]; -} - -void Stack_delete( StackT *stack ) { - - if ( 0 != stack ) { - - if ( 0 != stack->stack ) { - - free( stack->stack ); - } - - free( stack ); - } -} - - -void writeFileIOBuffer( int cpuid, processT* proc, const char* outputFile ) { - - - FILE *pf; - char file[128]; - - - sprintf( file, "%s.%i.io", outputFile, cpuid ); - - pf= fopen( file, "wb" ); - assert(pf); - - fwrite( proc->fileIObuffer, sizeof(uint64_t), proc->fileIObufferpos, pf ); - - proc->fileIObufferpos= 0; -} - - -void readFileIOBuffer( int cpuid, processT* proc, const char* outputFile ) { - - - FILE *pf; - char file[128]; - - - sprintf( file, "%s.%i.io", outputFile, cpuid ); - - pf= fopen( file, "rb" ); - if( NULL != pf ) { - - fseek( pf, proc->filepos * sizeof(uint64_t), SEEK_SET ); - - proc->fileIObufferlen= fread( proc->fileIObuffer, sizeof(uint64_t), FILEIOBUFFERSIZE, pf ); - - proc->fileIObufferpos= 0; - proc->filepos+= proc->fileIObufferlen; - - fclose( pf ); - } -} diff --git a/externals/otf/tools/vtf2otf/Stack.h b/externals/otf/tools/vtf2otf/Stack.h deleted file mode 100644 index 960e43c57c81a624b5b6ce98ebf4378965f3f94b..0000000000000000000000000000000000000000 --- a/externals/otf/tools/vtf2otf/Stack.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifndef _STACK_H -#define _STACK_H - -#include <assert.h> -#include "Hash.h" - -#include <OTF_Writer.h> - - -struct struct_StackEntry -{ - int state; -}; -typedef struct struct_StackEntry StackEntryT; - -struct struct_Stack -{ - /* Stack entries */ - StackEntryT* stack; - - /* Number of entries */ - int n; - - /* Size of the stack */ - int s; -}; -typedef struct struct_Stack StackT; - -#define FILEIOBUFFERSIZE 2048 -typedef struct { - char *name; - StackT *stack; - - uint64_t fileIObegin; /* writing - timestamp of the last beginfileio */ - - uint64_t filepos; /* reading - current position in the *.io file */ - - uint32_t fileIObufferpos; - uint32_t fileIObufferlen; /* reading - determines the end of the buffer */ - uint64_t fileIObuffer[FILEIOBUFFERSIZE]; /*1st= timestamp, 2nd= duration*/ -}processT; - -typedef struct { - uint32_t id; - uint32_t size; - uint32_t *procs; - char* name; -} ProcessGroup; - -typedef struct { - OTF_Writer* writer; - processT **processes; - int processcount; - int *threadnums; - ProcessGroup *processgroups; - unsigned int processgroupcount; - Hash *pghash; /* processgroup-mapping */ - uint32_t *reservedIds; - int reservedIdsc; - - char *outputFile; - - int ioonly; - - uint64_t handleid; /* needed for fileio */ -}fcbT; - - -StackT* Stack_new( void ); - -void Stack_delete( StackT *stack ); - -void Stack_push( StackT* stack, StackEntryT* entry ); - -StackEntryT Stack_pop( StackT* stack ); - - -/* write out the io buffer */ -void writeFileIOBuffer( int cpuid, processT* proc, const char* outputFile ); - -/* read from the io buffer */ -void readFileIOBuffer( int cpuid, processT* proc, const char* outputFile ); - -#endif /* _STACK_H */ diff --git a/externals/otf/tools/vtf2otf/vtf2otf.c b/externals/otf/tools/vtf2otf/vtf2otf.c deleted file mode 100644 index 85380726f38a57a1895b5a44c8fc869ad6a19507..0000000000000000000000000000000000000000 --- a/externals/otf/tools/vtf2otf/vtf2otf.c +++ /dev/null @@ -1,838 +0,0 @@ -/* - This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2010. - Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch -*/ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - - -#include <stddef.h> -#include <stdlib.h> -#include <string.h> -#include <stdio.h> -#include <unistd.h> - -#include "OTF_Platform.h" -#include "otf.h" - -#ifdef HAVE_VTF3 -#include "vtf3.h" -#endif /* HAVE_VTF3 */ - -#include "Handler.h" -#include "Stack.h" - -#define VTF32OTFCREATOR "vtf2otf" - -#define SHOW_HELPTEXT { \ - int l = 0; while( Helptext[l] ) { printf( "%s", Helptext[l++] ); } } - -static const char* Helptext[] = { -" \n", -" vtf2otf - Convert VTF3 trace files to OTF format. \n", -" \n", -" vtf2otf [Options] <input file name> \n", -" \n", -" Options: \n", -" -h, --help show this help message \n", -" -V show OTF version \n", -" -o <file> output file \n", -" -f <n> max count of filehandles \n", -" -n <n> output stream count \n", -" -b <n> size of the writer buffer \n", -" -z <n> use zlib compression \n", -" -io compute io events. This is necessary for getting \n", -" correct durations in IO-operations. Result of this \n", -" step is a file with extra information. This file \n", -" is used for creating correct duration-information in \n", -" a normal run. \n", -" If you do not have these extra-information-file, the \n", -" duration of every IO-operation will be zero. \n", -" \n", NULL }; - -int main (int argc, char **argv) { - - - char* inputFile = NULL; - char* outputFile = NULL; - unsigned int nstreams= 0; - unsigned int maxfilehandles = 250; - - void *fcbin; - fcbT fcb; - int nrectypes; - int *recordtypes; - int i; - int a; - VTF3_handler_t *handlers; - void **firsthandlerargs; - size_t bytesread; - OTF_FileManager* manager= NULL; - int buffersize = 1024 * 1024; - OTF_FileCompression compression= OTF_FILECOMPRESSION_UNCOMPRESSED; - char iofile[128]; - - fcb.ioonly= 0; - - /* argument handling */ - - if ( 1 >= argc ) { - - SHOW_HELPTEXT; - exit(0); - } - - for ( i = 1; i < argc; i++ ) { - - if ( ( 0 == strcmp( "-i", argv[i] ) ) && ( i+1 < argc ) ) { - - inputFile= argv[i+1]; - ++i; - - } else if ( ( 0 == strcmp( "-o", argv[i] ) ) && ( i+1 < argc ) ) { - - fcb.outputFile= strdup( argv[i+1] ); - - ++i; - - } else if ( ( 0 == strcmp( "-n", argv[i] ) ) && ( i+1 < argc ) ) { - - nstreams = atoi( argv[i+1] ); - ++i; - - } else if ( ( 0 == strcmp( "-f", argv[i] ) ) && ( i+1 < argc ) ) { - - maxfilehandles = atoi( argv[i+1] ); - ++i; - - } else if ( ( 0 == strcmp( "-b", argv[i] ) ) && ( i+1 < argc ) ) { - - buffersize = atoi( argv[i+1] ); - ++i; - - } else if ( 0 == strcmp( "-io", argv[i] ) ) { - - fcb.ioonly= 1; - - } else if ( ( 0 == strcmp( "-z", argv[i] ) ) && ( i+1 < argc ) ) { - - compression= atoi( argv [i+1] ); - ++i; - - } else if ( 0 == strcmp( "--help", argv[i] ) || - - 0 == strcmp( "-h", argv[i] ) ) { - - SHOW_HELPTEXT; - exit(0); - - } else if ( 0 == strcmp( "-V", argv[i] ) ) { - - printf( "%u.%u.%u \"%s\"\n", OTF_VERSION_MAJOR, OTF_VERSION_MINOR, - OTF_VERSION_SUB, OTF_VERSION_STRING); - exit( 0 ); - - } else { - - if ( '-' != argv[i][0] ) { - - inputFile= argv[i]; - - } else { - - fprintf( stderr, "ERROR: Unknown option '%s'\n", argv[i] ); - exit(1); - } - } - } - - /* check parameters */ - - if ( NULL == inputFile ) { - - printf( " no input file specified\n" ); - exit(1); - } - - if ( NULL == outputFile ) { - - /* - printf( " no output file specified\n" ); - exit(1); - */ - outputFile= strdup( "out.otf" ); - } - - if ( maxfilehandles < 1 ) { - - printf( " there must be at least 1 available filehandle\n" ); - exit(1); - } - - fcb.processes= NULL; - fcb.processcount= 0; - fcb.threadnums= 0; - fcb.processgroups= NULL; - fcb.processgroupcount= 0; - fcb.reservedIds= NULL; - fcb.reservedIdsc= 0; - fcb.pghash= initHash(); - fcb.handleid= 0; - -/* Open FileManager */ - if( 0 == fcb.ioonly ) { - manager= OTF_FileManager_open( maxfilehandles ); - assert( NULL != manager ); - - /* Open OTF Writer */ - fcb.outputFile= OTF_stripFilename( fcb.outputFile ); - fcb.writer = OTF_Writer_open( fcb.outputFile, nstreams, manager ); - OTF_Writer_setBufferSizes( fcb.writer, buffersize ); - OTF_Writer_setCompression( fcb.writer, compression ); - } - - /* Initialize VTF3. */ - (void) VTF3_InitTables (); - - /* Again, how many different record types do exist ? */ - nrectypes = VTF3_GetRecTypeArrayDim (); - - /* Allocate three auxiliary arrays for the record types, - the record handler entry point pointers and some data. */ - recordtypes = (int *) malloc ((size_t) nrectypes * sizeof (int)); - - handlers = (VTF3_handler_t *) malloc ((size_t) nrectypes * - sizeof (VTF3_handler_t)); - - firsthandlerargs = (void **) malloc ((size_t) nrectypes * - sizeof (void *)); - - /* Store the record types onto the appropriate array. - Pay attention, the caller does not know their ordering scheme. */ - (void) VTF3_GetRecTypeArray (recordtypes); - - /* What follows, this is the final handler table setup. */ - if( 0 == fcb.ioonly ) { - - for (i = 0; i < nrectypes; i++) - { - if ( VTF3_RECTYPE_CLSTRREGVAL == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleClstrregval; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_COMMENT == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleComment; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_CPUREGVAL == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleCpuregval; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFACT == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefact; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFACT_OBSOL == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefact_obsol; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFCLKPERIOD == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefclkperiod; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFCLSTR == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefclstr; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFCLSTRREG == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefclstrreg; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFCLSTRREGCLASS == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefclstrregclass; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFCOMMUNICATOR == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefcommunicator; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFCPUGRP == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefcpugrp; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFCPUNAME == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefcpuname; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFCPUREG == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefcpureg; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFCPUREGCLASS == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefcpuregclass; - firsthandlerargs[i] = &fcb; - continue; - } - /* if ( VTF3_RECTYPE_DEFCREATOR == recordtypes[i] ) - { - */ /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - /* handlers[i] = (VTF3_handler_t) handleDefcreator; - firsthandlerargs[i] = &fcb; - continue; - } - */ - if ( VTF3_RECTYPE_DEFGLOBALOP == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefglobalop; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFIOFILE == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefiofile; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFKPARREG == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefkparreg; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFMSGNAME == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefmsgname; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFOPENMPNAME == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefopenmpname; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFOPENMPTYPE == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefopenmptype; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFPATTERN == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefpattern; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFPATTERNSHAPE == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefpatternshape; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFREDFUNC_OBSOL == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefredfunc_obsol; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFSAMP == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefsamp; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFSAMPCLASS == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefsampclass; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFSCL == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefscl; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFSCLFILE == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefsclfile; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFSTATE == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefstate; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFSTATE_OBSOL == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefstate_obsol; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFSYSCPUNAMES == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefsyscpunames; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFSYSCPUNUMS == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefsyscpunums; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFTHREADNUMS == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefthreadnums; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFTIMEOFFSET == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDeftimeoffset; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFUNMERGED == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefunmerged; - firsthandlerargs[i] = &fcb; - continue; - } - /* if ( VTF3_RECTYPE_DEFVERSION == recordtypes[i] ) - { - */ /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - /* handlers[i] = (VTF3_handler_t) handleDefversion; - firsthandlerargs[i] = writer; - continue; - } - */ if ( VTF3_RECTYPE_DOWNTO == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDownto; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_EXCHANGE == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleExchange; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_EXCHANGE_OBSOL == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleExchange_obsol; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_FILEIOBEGIN == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleFileiobegin; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_FILEIOEND == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleFileioend; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_GLOBALOP == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleGlobalop; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_KPARREGBARSUM == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleKparregbarsum; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_KPARREGBEGIN == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleKparregbegin; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_KPARREGEND == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleKparregend; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_MUTEXACQUIRE == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleMutexacquire; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_MUTEXRELEASE == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleMutexrelease; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_OPENMPENTER == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleOpenmpenter; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_OPENMPLEAVE == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleOpenmpleave; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_PATTERN == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handlePattern; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_RECVMSG == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleRecvmsg; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_SAMP == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleSamp; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_SENDMSG == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleSendmsg; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_SRCINFO_OBSOL == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleSrcinfo_obsol; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_UNRECOGNIZABLE == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleUnrecognizable; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_UPFROM == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleUpfrom; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_UPTO == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleUpto; - firsthandlerargs[i] = &fcb; - continue; - } - } - - } else { - - /* 1 == fcb.ioonly */ - - for (i = 0; i < nrectypes; i++) - { - if ( VTF3_RECTYPE_DEFSYSCPUNUMS == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefsyscpunums; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_DEFTHREADNUMS == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleDefthreadnums; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_FILEIOBEGIN == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleFileiobegin; - firsthandlerargs[i] = &fcb; - continue; - } - if ( VTF3_RECTYPE_FILEIOEND == recordtypes[i] ) - { - /* Replace the predefined copy handler by our own one, - do not forget to redirect the first argument, too. */ - handlers[i] = (VTF3_handler_t) handleFileioend; - firsthandlerargs[i] = &fcb; - continue; - } - } - - } - - /* Open the input device */ - fcbin = VTF3_OpenFileInput ( inputFile, handlers, firsthandlerargs, 0); - - /* Free the auxiliary arrays. */ - (void) free (firsthandlerargs); - (void) free (handlers); - (void) free (recordtypes); - - if ( NULL == fcbin ) { - - fprintf( stderr, "cannot open input file '%s'\n", inputFile ); - exit( 1 ); - } - - /* Now push the operation to portion-wise process - the input file contents. */ - - if( 0 == fcb.ioonly ) { - - OTF_Writer_writeDefCreator( fcb.writer, 0, VTF32OTFCREATOR ); - - /* generate a standardfile group - vampir needs a filegroup(communicator) - group 0 would be invalid */ - - OTF_Writer_writeDefFileGroup( fcb.writer, 0, 1, "Default" ); - } - - do - { - bytesread = VTF3_ReadFileInputLtdBytes (fcbin, 50000); - } - while (bytesread != 0); - - if ( NULL == fcb.processes ) { - - fprintf( stderr, "ERROR: Missing NCPU record\n" ); - exit(1); - } - - /* create defprocess records with thread hierarchie */ - if( 0 == fcb.ioonly ) { - for( i = 0; i < fcb.processcount; i++ ) { - - OTF_Writer_writeDefProcess( fcb.writer, 0, i + 1, - fcb.processes[i][0].name, 0); - - for( a = 1; a < fcb.threadnums[i]; ++a ) { - - OTF_Writer_writeDefProcess( fcb.writer, 0, - (i + 1) + (a << 16), fcb.processes[i][a].name, i + 1); - } - } - } - - /* create defprocessgroup records */ - for( i= 0;i < (int)fcb.processgroupcount; ++i ) { - - if( 0 == fcb.ioonly ) { - OTF_Writer_writeDefProcessGroup( fcb.writer, - 0 /* uint32_t stream */, - fcb.processgroups[i].id /* uint32_t procGroup */, - fcb.processgroups[i].name /* const char* name */, - fcb.processgroups[i].size /* uint32_t numberOfProcs */, - fcb.processgroups[i].procs /* const uint32_t* procs */ ); - } - - free( fcb.processgroups[i].procs ); - free( fcb.processgroups[i].name ); - } - - free( fcb.processgroups ); - - - - /* free process-array */ - for( i = 0; i < fcb.processcount; ++i ) { - - for( a = 0; a < fcb.threadnums[i]; ++a ) { - - writeFileIOBuffer( i + (a<<16)/*cpuid*/, &fcb.processes[i][a], fcb.outputFile ); - - /* delete iofiles */ - if( 0 == fcb.ioonly ) { - - sprintf( iofile, "%s.%i.io", fcb.outputFile, i + (a<<16) ); - - unlink( iofile ); - } - - Stack_delete( fcb.processes[i][a].stack ); - - if ( 0 != fcb.processes[i][a].name ) { - - free( fcb.processes[i][a].name ); - } - } - - free( fcb.processes[i] ); - } - - free( fcb.processes ); - - /* Close all devices. */ - (void) VTF3_Close (fcbin); - - if( 0 == fcb.ioonly ) { - OTF_Writer_close( fcb.writer ); - OTF_FileManager_close( manager ); - } - - closeHash( fcb.pghash ); - - free( fcb.outputFile ); - - - return 0; -}