fast-dm-26/0000777000175000017500000000000010574242170007645 500000000000000fast-dm-26/README0000644000175000017500000000727710506750124010454 00000000000000fast-dm - a fast method for diffusion model analysis INTRODUCTION ------------ Stochastic Diffusion Models are used in cognitive science to analyse cognitive processes in fast binary decisions. It is assumed that the information supporting one and refuting the other decision can be described by a Wiener Diffusion process with constant drift over time. In the model, the decision process is terminated when the process exits from a given interval. The diffusion-model data analysis was introduced in psychology by Roger Ratcliff (1978). Ratcliff's diffusion model is specified by the following parameters: The distance of thresholds (a), the starting point (z), the drift rate (v), a non-decisional part of the response time (t0), and three so-called inter-trial variability parameters concerning the starting point (sz), the drift (eta), and the non- decisional response-time constant (st). Fast-dm estimates values for this parameters from response-time distributions for both alternative decisions. Fast-dm is based on a fast numerical approach for solving the Partial Differential Equation defining the above sketched diffusion model (cf. Voss & Voss, 2006). For the parameter estimation, the Kolmogorov-Smirnov method introduced by Voss, Rothermund, & Voss (2004) is used for the optimisation criterion. Fast-dm comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of fast-dm under the terms of the GNU General Public License. For more information about these matters, read the file COPYING of the source code distribution. Please mail any suggestions and bug reports to . REFERENCES ---------- Ratcliff, R., 1978. A theory of memory retrieval. Psychological Review, 85, 59-108. Ratcliff, R., Rouder, J. N., 1998. Modelling response times for two-choice decisions. Psychological Science 9 (5), 347--356. Voss, A., Rothermund, K., Voss, J., 2004. Interpreting the parameters of the diffusion model: An empirical validation. Memory & Cognition 32, 1206--1220. Voss, A., Voss, J., (2006). A Fast Numerical Algorithm for the Estimation of Diffusion-Model Parameters. Manuscript submitted for publication. Wagenmakers, E.-J., van der Maas, H. L. J., & Grasman, R. P. P. P., In Press. An ez-diffusion model for response time and accuracy. Psychonomic Bulletin & Review. INSTALLATION ------------ On Unix systems: Just type the following commands ./configure make On Windows systems: As usual, on a Windows system things are a little more complicated. The following steps may help you if you are using Microsoft's Visual Studio 7: (1) Create a new project. Choose a "win32 Console project", and make sure that the "empty project" check-box is selected. (2) Copy all "fast-dm" files in the new project directory. (3) Add the source code to the project. You need cdf.c, dataset.c, erf.c, experiment.c, EZ-diff.c, file.c, main.c, pde.c, phi.c, simplex.c, xmalloc.c, and fast-dm.h (4) In the project settings, select "compile as C-code" (and not C++). (5) Compile the project. INTERNALS --------- The program is split into several source files. The common header file for all of these is "fast-dm.h". main.c - main program for the fast-dm project EZ-diff.c - estimate some parameters using the EZ-model simplex.c - the downhill simplex method of Nelder and Mead cdf.c - compute the CDF for the diffusion model phi.c - the CDF and inverse CDF of the standard normal distribution pde.c - numerically solve the Fokker-Planck equation readdata.c - read the data file into memory file.c - read control and data files erf.c - Gaussian error function (only needed on MS Windows) plot-cdf.c - plot cumulative distribution functions fast-dm-26/configure.ac0000644000175000017500000000035510574241327012055 00000000000000AC_INIT(fast-dm, 26, voss@seehuhn.de) AC_CONFIG_SRCDIR(fast-dm.h) AM_INIT_AUTOMAKE([dist-zip]) AC_PROG_CC AC_CHECK_HEADER(papi.h,[have_papi=yes],[have_papi=no]) AM_CONDITIONAL(HAVE_PAPI, test x$have_papi = xyes) AC_OUTPUT([Makefile]) fast-dm-26/aclocal.m40000644000175000017500000007462010574242160011431 00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 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. # 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. # Copyright (C) 2002, 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_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # 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 # 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 7 # 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]) AC_SUBST([$1_FALSE]) 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 # 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 # 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], 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 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 case $depmode in 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 ;; none) break ;; esac # 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. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} 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]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 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 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; 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. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # 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.58])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 # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 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 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) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP 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 ]) ]) # 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_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # 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_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} 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 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .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 # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi 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, 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 4 # 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 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # 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 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 whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 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 3 # _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], [AC_FOREACH([_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 # 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_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR fast-dm-26/Makefile.am0000644000175000017500000000204510571555774011634 00000000000000## Process this file with automake to produce Makefile.in # Copyright 2006 Jochen Voss if HAVE_PAPI PAPI_PROGS = tune-params tune-local else PAPI_PROGS = endif bin_PROGRAMS = fast-dm noinst_PROGRAMS = plot-cdf construct-samples s2test $(PAPI_PROGS) fast_dm_SOURCES = main.c EZ-diff.c simplex2.c cdf.c phi.c pde.c \ experiment.c dataset.c container.c file.c xmalloc.c fast-dm.h fast_dm_LDADD = -lm plot_cdf_SOURCES = plot-cdf.c cdf.c phi.c pde.c xmalloc.c fast-dm.h plot_cdf_LDADD = -lm construct_samples_SOURCES = construct-samples.c cdf.c phi.c pde.c \ xmalloc.c fast-dm.h jvrandom.h construct_samples_LDADD = -lm s2test_SOURCES = s2test.c simplex2.c xmalloc.c fast-dm.h tune_params_SOURCES = tune-params.c cdf.c phi.c pde.c simplex2.c \ xmalloc.c fast-dm.h tune_params_LDADD = -lm -lpapi tune_local_SOURCES = tune-local.c measure.c measure.h cdf.c phi.c \ pde.c simplex2.c xmalloc.c fast-dm.h tune_local_LDADD = -llapack -lm -lpapi tune-local.c: tune-local.py ./tune-local.py EXTRA_DIST = MANUAL win32erf.c win32dir.c win32dir.h tune-local.py fast-dm-26/Makefile.in0000644000175000017500000005205610574242162011637 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # Copyright 2006 Jochen Voss srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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 = : bin_PROGRAMS = fast-dm$(EXEEXT) noinst_PROGRAMS = plot-cdf$(EXEEXT) construct-samples$(EXEEXT) \ s2test$(EXEEXT) $(am__EXEEXT_1) subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS TODO depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) @HAVE_PAPI_TRUE@am__EXEEXT_1 = tune-params$(EXEEXT) \ @HAVE_PAPI_TRUE@ tune-local$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_construct_samples_OBJECTS = construct-samples.$(OBJEXT) \ cdf.$(OBJEXT) phi.$(OBJEXT) pde.$(OBJEXT) xmalloc.$(OBJEXT) construct_samples_OBJECTS = $(am_construct_samples_OBJECTS) construct_samples_DEPENDENCIES = am_fast_dm_OBJECTS = main.$(OBJEXT) EZ-diff.$(OBJEXT) \ simplex2.$(OBJEXT) cdf.$(OBJEXT) phi.$(OBJEXT) pde.$(OBJEXT) \ experiment.$(OBJEXT) dataset.$(OBJEXT) container.$(OBJEXT) \ file.$(OBJEXT) xmalloc.$(OBJEXT) fast_dm_OBJECTS = $(am_fast_dm_OBJECTS) fast_dm_DEPENDENCIES = am_plot_cdf_OBJECTS = plot-cdf.$(OBJEXT) cdf.$(OBJEXT) phi.$(OBJEXT) \ pde.$(OBJEXT) xmalloc.$(OBJEXT) plot_cdf_OBJECTS = $(am_plot_cdf_OBJECTS) plot_cdf_DEPENDENCIES = am_s2test_OBJECTS = s2test.$(OBJEXT) simplex2.$(OBJEXT) \ xmalloc.$(OBJEXT) s2test_OBJECTS = $(am_s2test_OBJECTS) s2test_LDADD = $(LDADD) am_tune_local_OBJECTS = tune-local.$(OBJEXT) measure.$(OBJEXT) \ cdf.$(OBJEXT) phi.$(OBJEXT) pde.$(OBJEXT) simplex2.$(OBJEXT) \ xmalloc.$(OBJEXT) tune_local_OBJECTS = $(am_tune_local_OBJECTS) tune_local_DEPENDENCIES = am_tune_params_OBJECTS = tune-params.$(OBJEXT) cdf.$(OBJEXT) \ phi.$(OBJEXT) pde.$(OBJEXT) simplex2.$(OBJEXT) \ xmalloc.$(OBJEXT) tune_params_OBJECTS = $(am_tune_params_OBJECTS) tune_params_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(construct_samples_SOURCES) $(fast_dm_SOURCES) \ $(plot_cdf_SOURCES) $(s2test_SOURCES) $(tune_local_SOURCES) \ $(tune_params_SOURCES) DIST_SOURCES = $(construct_samples_SOURCES) $(fast_dm_SOURCES) \ $(plot_cdf_SOURCES) $(s2test_SOURCES) $(tune_local_SOURCES) \ $(tune_params_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ HAVE_PAPI_FALSE = @HAVE_PAPI_FALSE@ HAVE_PAPI_TRUE = @HAVE_PAPI_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ 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_alias = @build_alias@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @HAVE_PAPI_FALSE@PAPI_PROGS = @HAVE_PAPI_TRUE@PAPI_PROGS = tune-params tune-local fast_dm_SOURCES = main.c EZ-diff.c simplex2.c cdf.c phi.c pde.c \ experiment.c dataset.c container.c file.c xmalloc.c fast-dm.h fast_dm_LDADD = -lm plot_cdf_SOURCES = plot-cdf.c cdf.c phi.c pde.c xmalloc.c fast-dm.h plot_cdf_LDADD = -lm construct_samples_SOURCES = construct-samples.c cdf.c phi.c pde.c \ xmalloc.c fast-dm.h jvrandom.h construct_samples_LDADD = -lm s2test_SOURCES = s2test.c simplex2.c xmalloc.c fast-dm.h tune_params_SOURCES = tune-params.c cdf.c phi.c pde.c simplex2.c \ xmalloc.c fast-dm.h tune_params_LDADD = -lm -lpapi tune_local_SOURCES = tune-local.c measure.c measure.h cdf.c phi.c \ pde.c simplex2.c xmalloc.c fast-dm.h tune_local_LDADD = -llapack -lm -lpapi EXTRA_DIST = MANUAL win32erf.c win32dir.c win32dir.h tune-local.py all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu 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) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) construct-samples$(EXEEXT): $(construct_samples_OBJECTS) $(construct_samples_DEPENDENCIES) @rm -f construct-samples$(EXEEXT) $(LINK) $(construct_samples_LDFLAGS) $(construct_samples_OBJECTS) $(construct_samples_LDADD) $(LIBS) fast-dm$(EXEEXT): $(fast_dm_OBJECTS) $(fast_dm_DEPENDENCIES) @rm -f fast-dm$(EXEEXT) $(LINK) $(fast_dm_LDFLAGS) $(fast_dm_OBJECTS) $(fast_dm_LDADD) $(LIBS) plot-cdf$(EXEEXT): $(plot_cdf_OBJECTS) $(plot_cdf_DEPENDENCIES) @rm -f plot-cdf$(EXEEXT) $(LINK) $(plot_cdf_LDFLAGS) $(plot_cdf_OBJECTS) $(plot_cdf_LDADD) $(LIBS) s2test$(EXEEXT): $(s2test_OBJECTS) $(s2test_DEPENDENCIES) @rm -f s2test$(EXEEXT) $(LINK) $(s2test_LDFLAGS) $(s2test_OBJECTS) $(s2test_LDADD) $(LIBS) tune-local$(EXEEXT): $(tune_local_OBJECTS) $(tune_local_DEPENDENCIES) @rm -f tune-local$(EXEEXT) $(LINK) $(tune_local_LDFLAGS) $(tune_local_OBJECTS) $(tune_local_LDADD) $(LIBS) tune-params$(EXEEXT): $(tune_params_OBJECTS) $(tune_params_DEPENDENCIES) @rm -f tune-params$(EXEEXT) $(LINK) $(tune_params_LDFLAGS) $(tune_params_OBJECTS) $(tune_params_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EZ-diff.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/construct-samples.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/container.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dataset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/experiment.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/measure.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pde.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/phi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plot-cdf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s2test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplex2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tune-local.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tune-params.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @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) '$<'` uninstall-info-am: 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; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(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-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 -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(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) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(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) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && 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 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @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-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) 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-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-generic clean-noinstPROGRAMS ctags \ dist dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ \ dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am tune-local.c: tune-local.py ./tune-local.py # 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: fast-dm-26/configure0000755000175000017500000044437110574242162011506 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for fast-dm 26. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 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=: # 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 # PATH needs CR # 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 # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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.) as_nl=' ' 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 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. 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 # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF 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 : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF 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 : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. 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" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); 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 } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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 fi echo >conf$$.file 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 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=: 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 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='fast-dm' PACKAGE_TARNAME='fast-dm' PACKAGE_VERSION='26' PACKAGE_STRING='fast-dm 26' PACKAGE_BUGREPORT='voss@seehuhn.de' ac_unique_file="fast-dm.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP GREP EGREP HAVE_PAPI_TRUE HAVE_PAPI_FALSE LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false # 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_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=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_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=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 ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 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'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. 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 case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } 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 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 .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # 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 -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | 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 .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } 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 fast-dm 26 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/fast-dm] --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 _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of fast-dm 26:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 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 fast-dm configure 26 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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 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 fast-dm $as_me 26, which was generated by GNU Autoconf 2.61. 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=. 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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$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 ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_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=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac 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=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac 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 && echo "$as_me: caught signal $ac_signal" 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'; { (exit 1); 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 # 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 # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 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. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 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,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 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 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`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. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } 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 am__api_version="1.9" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } 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. # 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. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS 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 { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$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' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # 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". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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 $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`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 echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } 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='fast-dm' VERSION='26' 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"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # 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_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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out 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. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 | *.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 { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 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 case $depmode in 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 ;; none) break ;; esac # 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. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} 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 { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=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 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&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 echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # 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 { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # 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 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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 ac_count=`expr $ac_count + 1` 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 fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else 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 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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 ac_count=`expr $ac_count + 1` 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 fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF 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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_papi_h+set}" = set; then { echo "$as_me:$LINENO: checking for papi.h" >&5 echo $ECHO_N "checking for papi.h... $ECHO_C" >&6; } if test "${ac_cv_header_papi_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_papi_h" >&5 echo "${ECHO_T}$ac_cv_header_papi_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking papi.h usability" >&5 echo $ECHO_N "checking papi.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking papi.h presence" >&5 echo $ECHO_N "checking papi.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: papi.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: papi.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: papi.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: papi.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: papi.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: papi.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: papi.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: papi.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: papi.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: papi.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: papi.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: papi.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: papi.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: papi.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: papi.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: papi.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------ ## ## Report this to voss@seehuhn.de ## ## ------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for papi.h" >&5 echo $ECHO_N "checking for papi.h... $ECHO_C" >&6; } if test "${ac_cv_header_papi_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_papi_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_papi_h" >&5 echo "${ECHO_T}$ac_cv_header_papi_h" >&6; } fi if test $ac_cv_header_papi_h = yes; then have_papi=yes else have_papi=no fi if test x$have_papi = xyes; then HAVE_PAPI_TRUE= HAVE_PAPI_FALSE='#' else HAVE_PAPI_TRUE='#' HAVE_PAPI_FALSE= fi ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_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" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`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. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_PAPI_TRUE}" && test -z "${HAVE_PAPI_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_PAPI\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_PAPI\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $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} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## 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=: # 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 # PATH needs CR # 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 # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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.) as_nl=' ' 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 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. 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 # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. 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" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); 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 } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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 fi echo >conf$$.file 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 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=: 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 # 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 fast-dm $as_me 26, which was generated by GNU Autoconf 2.61. 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 cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ fast-dm config.status 26 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 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' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. 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 ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) 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. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$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 if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); 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") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim HAVE_PAPI_TRUE!$HAVE_PAPI_TRUE$ac_delim HAVE_PAPI_FALSE!$HAVE_PAPI_FALSE$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 81; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _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 fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[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 || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$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 "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; 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 || 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" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`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 || 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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;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 $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; 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. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /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 || 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 || 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 case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`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 || 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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # 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 || { (exit 1); exit 1; } fi fast-dm-26/AUTHORS0000644000175000017500000000012610476631300010626 00000000000000Jochen Voss Andreas Voss fast-dm-26/COPYING0000644000175000017500000004312210532451262010614 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. fast-dm-26/ChangeLog0000644000175000017500000010767210574241304011346 00000000000000commit 1a60e29053c3f91d3ae9cf5d261c43c5548487e9 Author: Jochen Voss Date: Thu Mar 1 00:23:15 2007 +0000 minor fixes commit 5217c724da3ab1eb5746e87371617b7b5b8a7e53 Author: Jochen Voss Date: Wed Feb 28 23:59:02 2007 +0000 New implementation of tune-local. commit c6a93434be739e4d794b64fc28b69e96950b3232 Author: Jochen Voss Date: Wed Feb 28 23:43:39 2007 +0000 tune-local.c: consider all parameters again commit 0018c17dd0ff7ef68fc3a9e0ca3ccf5336bdf6a0 Author: Jochen Voss Date: Tue Feb 27 14:28:39 2007 +0000 new prerelase version 25.90 commit d81b3f1ca3081c0f36c218841ab903997e6ad441 Author: Jochen Voss Date: Tue Feb 27 14:26:32 2007 +0000 cdf.c: new discretisation parameter values commit 960fcd4fbd0479fad424b02402e0defc02277b65 Author: Jochen Voss Date: Wed Feb 21 15:15:44 2007 +0000 fast-dm: rename old TUNE_DTERR to new TUNE_DT0 commit f831e2020dfdd263a5822f1098a583cc6deda7a7 Author: Jochen Voss Date: Tue Feb 20 22:03:41 2007 +0000 fast-dm/pde2.c: new file (currently unused) This is an alternative implementation of the PDE solver, which does the LU factorisation only once and then uses this repeatedly. Unfortunately the code is slower than the old version in pde.c. commit 2f2d4875d6db19e4c29032f7a715310a046c9caa Author: Jochen Voss Date: Tue Feb 20 21:18:09 2007 +0000 pde.c: minor speed optimisations in solve_tridiag() commit 768ef4157a3097aa8dfe41367dd5bf83a30ab996 Author: Jochen Voss Date: Sun Feb 18 23:24:17 2007 +0000 fast-dm/tune-params.c: switch to use simplex2, start tuning again commit 29727535db124b5d92deed88187dc38cce9232db Author: Jochen Voss Date: Mon Jan 22 17:04:10 2007 +0000 fast-dm release 25 commit b7918cbf7451894b9e157042c452ffdf13103195 Author: Jochen Voss Date: Mon Jan 22 16:58:43 2007 +0000 fast-dm/main.c: fix the default initial value for sv commit e9e73dd4c7578a462ff9dd81703f43eb6753ed8f Author: Jochen Voss Date: Thu Jan 18 13:58:39 2007 +0000 prepare for fast-dm release 25 commit 8b7e75420f1046d682b71bac92027ab59af24e2d Author: Jochen Voss Date: Thu Jan 18 13:54:28 2007 +0000 main.c: use new default values for the optimisation commit b9b3a715ed45de429384071cc03bbb1124d74083 Author: Jochen Voss Date: Tue Jan 16 19:16:35 2007 +0000 simplex2.c: fiddle a bit more with the simplex algorithm commit 9f5ccaa1af36c19404ff15212d9c5eddcf3ed90f Author: Jochen Voss Date: Tue Jan 16 13:51:23 2007 +0000 use the new simplex2 function for fast-dm commit e563246986b2a9aa26254e3f1d91b633f9d71e53 Author: Jochen Voss Date: Tue Jan 16 13:22:16 2007 +0000 simplex2.c: faithfully implement the simplex variant from numerical receipes This changes the mechanism for the acceptance of reflections and extended reflections slightly to exactly reflect the description at http://www.research.ibm.com/infoecon/paps/html/amec99_bundle/node8.html commit 93be2f837a39f8a8db4edd310df8d3a40b9df445 Author: Jochen Voss Date: Tue Jan 16 12:37:53 2007 +0000 Add a new simplex implementation with 2-valued objective function. The new simplex method uses lexicographical ordering, i.e. a value (a1,a2) is considered bettter than (b1,b2) if either a1 Date: Tue Jan 16 12:33:35 2007 +0000 xmalloc.c: remove unused include statement commit 50d12a77ebf8674cc1b1680f68e24208d575f560 Author: Jochen Voss Date: Tue Jan 16 12:33:00 2007 +0000 simplex.c: minor bug fix commit 6c106550621e3e4b8552ee555491c98745bf2c7f Author: Jochen Voss Date: Mon Nov 27 21:59:22 2006 +0000 fast-dm release 24 commit d1b85aa0fe853edd7ef7a9ee73cc68c805e4a26b Author: Jochen Voss Date: Mon Nov 27 21:54:31 2006 +0000 Don't abort the whole run on encountering an invalid data file. experiment.c (experiment_get_dataset): if an error in a data file is found, just emit a message and try the next file instead. file.c: new function 'file_message' to emit non-fatal error messages. commit 7a3a45d8410251aa16c0ab0d3678e6a56007d156 Author: Jochen Voss Date: Mon Nov 27 21:51:57 2006 +0000 TODO: simplex fails for less than 2 variables commit 1a39ae5acb0a037cf405c67fda87c90084125bfb Author: Jochen Voss Date: Mon Nov 27 21:51:11 2006 +0000 main.c: give CPU time only up to 0.1 seconds commit 44bde76928f1c5a69c7ec0870dc2ba8795326314 Author: Jochen Voss Date: Wed Nov 22 09:07:05 2006 +0000 fast-dm/experiment.c: add missing newline after warning message commit 49831cba5ed0121733494f717a755faa6d84fced Author: Jochen Voss Date: Tue Nov 21 10:56:31 2006 +0000 Rearrange the directory structure. Move old pde/src/ to new fast-dm/. Move old pde/tex/ to new pde/VV06/. New directory pde/VV06b/. commit 1ccfa38973739fa3a4f78950b4001f2fe29c609e Author: Jochen Voss Date: Thu Nov 16 21:46:16 2006 +0000 Fast-dm release 23. This is the fast-dm version described in the article "Fast-dm: A Free Program for Efficient Diffusion Model Analysis". Changes include: * update the ChangeLog and NEWS files * update the MANUAL * swap the names of the "log" and "save" commands commit 210eb9e15d44e2b94afd44dbb451d7d65587a324 Author: Jochen Voss Date: Sun Nov 12 21:21:17 2006 +0000 pde/src/MANUAL: minor fixes commit 384c8d2cc2fa31b585ae0b00fc988e3d0ff2aa05 Author: Jochen Voss Date: Sun Nov 12 16:29:19 2006 +0000 construct-samples.c: allow to construct several samples in one run commit 43f97d9c6040405c5ad5c88d51920a5ac131c421 Author: Jochen Voss Date: Fri Nov 10 18:20:05 2006 +0000 minor fixes commit ba9a8cd2e5fe8f864549c7c85525e6a0fa23d8e1 Author: Jochen Voss Date: Fri Nov 10 18:19:50 2006 +0000 dataset.c: new function dataset_print_commands commit ed5b1d99b40e685acde0752f494af6fc6203677f Author: Jochen Voss Date: Fri Nov 10 15:24:47 2006 +0000 experiment.c: allow 1 as the new minimal precision commit f418c2e9280fce4e1c02174cc54cfab02a701b70 Author: Jochen Voss Date: Fri Nov 10 15:14:19 2006 +0000 experiment.c: allow 1 as the new minimal precision commit 0ec0603a4708f05b2110470ba0263a60451bf1a7 Author: Jochen Voss Date: Fri Nov 10 15:12:00 2006 +0000 main.c: add a free version of T_to_p commit 97bc03f389eb527d6454e1d87c968c9ed06a523f Author: Jochen Voss Date: Fri Nov 10 13:47:07 2006 +0000 fast-dm release 22 commit fb7b24bbc38591611aa814d829c5eebd5a1c01cd Author: Jochen Voss Date: Fri Nov 10 13:36:10 2006 +0000 tab2.ctl: slightly higher precision, write a summary commit c8261567fdb31d0723249290477367723a81525f Author: Jochen Voss Date: Fri Nov 10 13:34:48 2006 +0000 experiment.c: use nicer headings for the summary file commit 62a9013ebdb3003111651bc919062ab6e5d4a1f4 Author: Jochen Voss Date: Fri Nov 10 13:31:33 2006 +0000 main.c: new implementation of T_to_p commit ac037302e3e2c075be641d467b4b545a735787a9 Author: Jochen Voss Date: Fri Nov 10 13:15:27 2006 +0000 TODO: one item done commit e14f5da872e3489b98780352b585e234d615bbaa Author: Jochen Voss Date: Fri Nov 10 12:22:10 2006 +0000 misc. fixes and clean-ups commit 5da0fe4881dfef87e165bfaf146eaff2e3d7e6a1 Author: Jochen Voss Date: Wed Nov 8 17:06:50 2006 +0000 use * instead of %d in file name templates commit dfb1f299aecdd4297369d73405acd50d22772ec5 Author: Jochen Voss Date: Wed Nov 8 15:09:46 2006 +0000 files.c: new file (get data file names) commit efc2024b214b9aa02430573bd8b734c33d166ee5 Author: Jochen Voss Date: Wed Nov 8 15:08:43 2006 +0000 container.c: new function 'array_sort' commit 5a970248aae213127ffbaee556e5034bf854178d Author: Jochen Voss Date: Wed Nov 8 15:08:20 2006 +0000 xmalloc.c: new function 'xstrndup' commit 23db2d1a6419db87bd44ef163bfc93874d69025d Author: Jochen Voss Date: Wed Nov 8 13:08:34 2006 +0000 Update the MS Windows compatibility hacks. New files "win32dir.c" and "win32dir.h", containing a dirent implementation for MS Windows. Rename old "erc.c" to new "win32erf.c" for consistency. commit efe053b581bafbbd796502a40123b99c7d9056ac Author: Jochen Voss Date: Mon Nov 6 12:54:20 2006 +0000 prepare for fast-dm release 19 commit d67ce1090f16f1d044df1a99f49ff9ab62fa4660 Author: Jochen Voss Date: Wed Nov 1 13:45:50 2006 +0000 Makefile.am: add a dependency to "jvrandom.h" commit 2f8eb25a35a8e15496bd0f147f4144eb71dd857f Author: Jochen Voss Date: Wed Nov 1 13:45:14 2006 +0000 construct-samples.c: allow to generate random samples as well as regular ones The new command line option "-r" generates randomised samples. Without "-r" the programm still generates regular samples from the 1/N-quantiles of the distribution. Also fix the "-p" (precision) option and clean up the code. commit 77df65709c7f482604f5e2d16a30e34b1e431d97 Author: Jochen Voss Date: Wed Nov 1 13:42:50 2006 +0000 experiment.c: cosmetic fix commit e1d80b841d307a773b90e770f9def94130961387 Author: Jochen Voss Date: Mon Oct 30 11:33:56 2006 +0000 pde/src/compare: new target (compare results with Joachim) commit 319e8d29a5b8531a2ce9221c8db66511e266e767 Author: Jochen Voss Date: Sun Oct 29 19:34:23 2006 +0000 prepare for fast-dm release 18 commit c24071f3ccf04a3b3523f6713212bb94bceaf023 Author: Jochen Voss Date: Sun Oct 29 19:26:51 2006 +0000 Allow to fix the parameter "z". commit e84b7f8256f0c0ee3ad231a01f7adf772aa98664 Author: Jochen Voss Date: Sun Oct 29 18:20:18 2006 +0000 pde/src/main.c: fix logic error in find_best_log_p commit c622553c246a540311fa7dbfe73cf2a364879681 Author: Jochen Voss Date: Mon Oct 16 20:26:27 2006 +0100 prepare for fast-dm release 17 commit 7e81b8b3437863f3e7f99668d4c450d89128e241 Author: Jochen Voss Date: Mon Oct 16 20:24:54 2006 +0100 Continue the code review for the file "main.c". Minor bug fix in 'find_best_log_p'. Clean up the code, new function 'KS_get_z'. commit 12a24c8eb509a570c02a291e279a1fe6c1e091eb Author: Jochen Voss Date: Tue Oct 10 20:53:14 2006 +0100 fast-dm release 16 commit 33358457ab2fa3d825ac91e4a71962e899f2c427 Author: Jochen Voss Date: Tue Oct 10 20:51:33 2006 +0100 fast-dm: minor fixes commit 6321c591fa184c70608b168caeee2e6f7a825908 Author: Jochen Voss Date: Tue Oct 10 20:49:38 2006 +0100 fast-dm: add a manual, minor fixes The new file MANUAL contains beginnings of the Fast-DM Users' guide. Also I started the code review of the file "main.c": there are some more comments now, and the code is simplified and cleaned up a bit. commit 80fa71ad758238b6c1df25c5e1e533837e8260ac Author: Jochen Voss Date: Tue Oct 10 10:28:59 2006 +0100 pde/src/main.c: ignore missing data sets. commit edfce3f53402946cf50f505f9a1543b8d3412b21 Author: Andreas Voss Date: Sun Oct 8 13:11:27 2006 +0200 pde/src/main.c: fix freeing of the KS_stat structures commit 67845c8cf5d3800aeb0dd8586f9f0fab0188df85 Author: Jochen Voss Date: Sat Oct 7 18:28:34 2006 +0100 fast-dm release 15 commit d0fa1eee22095a27ccbf3d35db08b09c3c30abb8 Author: Jochen Voss Date: Sat Oct 7 18:23:45 2006 +0100 Continue the fast-dm code review. Review of "experiment.c" is finished, some fixes in "main.c" started. commit e1fdf9c1d1c992053c414fab2805b1c43ff19d6c Author: Jochen Voss Date: Sat Oct 7 14:06:38 2006 +0100 First part of a code review. Do a code review of "dataset.c" (complete) and "experiment.c" (partial). Clean up the code, fix another memory leak, rename some functions, ... commit 4a7b1877bcbe199cfc08b0f3e51445c9df4a91fb Author: Andreas Voss Date: Fri Oct 6 15:44:30 2006 +0200 minor fixes commit 1a99e25147780e946486faa660521551bfedc575 Author: Jochen Voss Date: Fri Oct 6 11:38:13 2006 +0100 tune-params: major updates commit 46a8bb6db5877d3258bcff60df99933469d425da Author: Jochen Voss Date: Fri Oct 6 11:36:55 2006 +0100 plot-cdf: minor fix commit 1a82c0a717a2ab7d9e45cab295c99e08e62ece2c Author: Jochen Voss Date: Fri Oct 6 11:36:05 2006 +0100 construct-samples: add -p command line option commit 2072d0374b2aabcd56b4907b0895c7e6cd7be1db Author: Andreas Voss Date: Fri Oct 6 11:29:07 2006 +0200 fix two memory leaks commit 451beb2f629f7e09b01439b4a4b2a0d060c7c9ac Author: Andreas Voss Date: Thu Oct 5 11:26:34 2006 +0200 minor fixes commit 0665778c1e9f86f322448694c363795b023cc113 Author: Jochen Voss Date: Wed Oct 4 21:40:03 2006 +0100 fast-dm release 14 commit c3aa0539efe1a5297fcf64a1a742ddccb0314fa4 Author: Jochen Voss Date: Wed Oct 4 20:31:58 2006 +0100 fast_dm: major clean-up commit c468d7f3dee7bd3aeef6d1b025399a60811010ed Author: Jochen Voss Date: Wed Oct 4 18:08:57 2006 +0100 compilation fixes commit 3287dabccc064a065ac7e8a1d5ba3ceff230215c Merge: ba6439c... e28b2e0... Author: Jochen Voss Date: Wed Oct 4 17:15:28 2006 +0100 Merge branch 'master' into save Conflicts: pde/src/experiment.c pde/src/main.c commit ba6439cb41090379d1a0833cff02e5151df59374 Author: Andreas Voss Date: Wed Oct 4 11:11:54 2006 +0200 fast-dm: first complete implementation of the save command commit e28b2e07b46ace07604de93dd380b78c03b33270 Author: Jochen Voss Date: Fri Sep 29 18:40:03 2006 +0100 Allow to set the precision in the control file. commit aa6d831bf6e0f54682b1a8e5e8252325d3bb406d Author: Jochen Voss Date: Fri Sep 29 18:24:30 2006 +0100 main.c: Fix the return value of 'find_best_log_p' commit f8f6470c0dfa4fa107315f95e151fecfc693bb0f Author: Jochen Voss Date: Fri Sep 29 18:21:24 2006 +0100 Initial support for global save files. commit 7162a6330946a15cc68256ae9bad92e91535ba59 Author: Jochen Voss Date: Fri Sep 29 01:26:06 2006 +0100 pde/src/cdf.c: set_precision: better parameter values. The new values in set_precision are obtained by new numerical experiments, using tune-params. The values seem to work at least for precisions between 2 und 4. commit 68f4b6b8757cae11f515b68185e95f1fee8b62ed Merge: f67159b... ca70d18... Author: Jochen Voss Date: Thu Sep 28 17:20:21 2006 +0100 Merge branch 'master' of voss@seehuhn.de:/srv/git/bruder commit f67159baeada9864a685d7e84cd99a2f9288c176 Author: Jochen Voss Date: Thu Sep 28 17:20:14 2006 +0100 fast-dm: allow to set the precision at run-time commit ca70d186458a2ab37ef894adbb3722851fe62492 Author: Andreas Voss Date: Fri Sep 15 14:51:37 2006 +0200 pde/src/main.c: implement handling of experimental conditions commit 80f4e934f73554aa9d70bf7a9240623cad5d8b6b Author: Jochen Voss Date: Wed Sep 27 21:14:40 2006 +0100 pde/src/xx.py: read the precision value from the command line. commit 8b212657381ff2dd6e98ed93a695f4e7a17fc053 Author: Jochen Voss Date: Wed Sep 27 21:56:10 2006 +0200 fast-dm: additional comments and assorted fixes commit 3e955b9466d40989b7e4b23137ce0b61079853db Author: Jochen Voss Date: Tue Sep 26 18:36:39 2006 +0200 prepare for fast-dm release 11 commit 048df0587f6fc9eaa0c4d4efef78ed3fe2ed8755 Author: Jochen Voss Date: Tue Sep 26 18:32:27 2006 +0200 fast-dm: assorted fixes Add some descriptions for global functions written by Andreas. Use _snprintf instead of snprintf on Windows. Make 'file_error' behave like fprintf and use this to get better error messages. commit 071f96ce20bf872946d508e5eb69478674c344b0 Author: Jochen Voss Date: Tue Sep 26 00:15:09 2006 +0200 fast-dm: minor fixes commit 9ba62ebab1239e013c16535ecd0354e87e048a1d Author: Andreas Voss Date: Mon Sep 25 15:17:48 2006 +0200 pde/src/README: update description and MS Windows compilation instructions commit 6b83f694f7daef1774ce33676c87586e465c78a1 Author: Jochen Voss Date: Sun Sep 24 21:28:57 2006 +0200 prepare for fast-dm release 10 commit d4ee029e4eb19d24197a7fc2d3ec35e2739ec378 Author: Jochen Voss Date: Sun Sep 24 21:26:13 2006 +0200 Complete the transition to experiment control files. This commit gets rid of the old "readdata.c" file. Fast-dm is now completely controlled by an experiment control file, recompilation is not normally necessary any more. commit f887ea0fee577846400d8d7dcd85564039060415 Author: Jochen Voss Date: Sun Sep 24 15:05:32 2006 +0200 Continue the implentationh of experiment control files. xmalloc.c: new file, safe memory allocation dataset.c: new file, will replace the old readdata.c eventually. Most things are already moved over. experiment.c: add more code to construct a 'struct dataset' on reading a data file. commit 2fedf58b8a58a9a6c2bde01441f1b70f4b2c5115 Author: Jochen Voss Date: Sun Sep 24 00:45:27 2006 +0200 pde/src/experiment.c: new file commit b108dee7ae3f0bb6a8e184b119ec7d5c23447ebc Author: Jochen Voss Date: Sun Sep 24 00:43:24 2006 +0200 pde/src/readdata.c: minor fix commit da15ff286d718110a6d737631ac3dcb94c3eb54c Author: Jochen Voss Date: Sun Sep 24 00:42:57 2006 +0200 pde/src/file.c: minor fixes commit 43ebe116272c7d5fab0e5c36cb46087618f2ebf5 Author: Jochen Voss Date: Sat Sep 23 18:06:38 2006 +0100 rename old "pde.h" to new "fast-dm.h" commit d32987ad94e0642cb1dbe32048a777c8a84a8bd7 Author: Jochen Voss Date: Sat Sep 23 18:01:57 2006 +0100 file.c: new file, read control and data files This patch introduces a new 'struct file' to represent a line-based input file. "file.c" contains code to sequentially read the input lines and to break them into words. commit 048a380d552f37f2ac52d592d30e8d78cf4a73f6 Author: Jochen Voss Date: Sun Sep 17 00:36:17 2006 +0100 finalise table 2 for the paper commit 577bc1fbf9e4cb9deffbfb261434905b1d645043 Author: Jochen Voss Date: Sat Sep 16 23:34:02 2006 +0100 finalise table 1 for the paper commit 74034f410bca4d6dfcc5a2350c9fc159de0d5bcc Author: Jochen Voss Date: Sat Sep 16 23:04:59 2006 +0100 prepare for fast-dm release 9 commit 2c2d770b3b0b9d0a3c4428a2c9f86d6219c59e54 Author: Jochen Voss Date: Sat Sep 16 22:31:43 2006 +0100 prepare for generation of table 2 in the paper commit 017567617f827cb0879d44561137de8256f56389 Author: Jochen Voss Date: Sat Sep 16 20:33:15 2006 +0100 pde/src/cdf.c: cosmetic fix commit 8b82e4e293c6f2b11415c658e178273600e072e2 Author: Jochen Voss Date: Sat Sep 16 20:23:10 2006 +0100 Settle on a final set of tuning parameters for the paper. commit e601e1ef323b310c97da88f0b40fb0b5a70c52d6 Author: Jochen Voss Date: Sat Sep 16 20:22:08 2006 +0100 pde/src/simplex.c: change the evaluation order of the initial simplex. Change the order of function evaluations for the initial simplex, so that the given base point is evaluated first. Now you can abort the search even after the first function evaluation without loosing quality. commit 4d67d279098ccd0d5fc36d723b46f23b50af4a48 Author: Jochen Voss Date: Sat Sep 16 19:53:14 2006 +0100 Generated the final "exact" data sets for table 1 of the paper. commit c825a0dc01dd8a807fed1127c8f1d6e1d5ee9b4d Author: Jochen Voss Date: Sat Sep 16 19:15:19 2006 +0100 pde/src/EZ-diff.c: bug fix, the case v=0 failed previously commit 19cb2b042c69458c61a5845e1383d5b111263561 Author: Jochen Voss Date: Sat Sep 16 03:02:03 2006 +0100 work on the tuning parameter search commit 9af4f19fcf4f5738f4b3b45c0e1f3acb4ecdfe5f Author: Jochen Voss Date: Sat Sep 16 00:23:47 2006 +0100 pde/src/tune-params.c: improve the score function and also consider t0 commit cd0a2bcdffcc0e17b802a046ada1fb03530f12e8 Author: Jochen Voss Date: Fri Sep 15 22:28:14 2006 +0100 Add .info files for the table 1 data. commit ead9dba818dbedb740203fc34931480e3c6cbb15 Author: Jochen Voss Date: Fri Sep 15 22:23:28 2006 +0100 Rename the data files for table 1. commit 80ac50a4e5ff76003a382c6fdcbfa7faa560fdd4 Author: Jochen Voss Date: Fri Sep 15 22:15:22 2006 +0100 pde/src/t1-analyse.sh: reflect changes in the TeX file commit 30ee4c5f1bc5fb44c7e7273c819cd6672b3e0d61 Author: Jochen Voss Date: Fri Sep 15 17:34:45 2006 +0100 pde/src/: regenerate fast-dm data files for table 1 commit e4d5f17c91530a766aae796be9190e9e11b1a9ff Author: Jochen Voss Date: Fri Sep 15 17:25:57 2006 +0100 pde/src/: regenerate data files for table 1 commit dca26c30fd940e3366544da4fcff7a312b7e3856 Author: Jochen Voss Date: Fri Sep 15 15:16:54 2006 +0100 Change the default precision to 4 again. commit 7bb8b698098520908ffaa4f43ee6fac132ed981b Author: Jochen Voss Date: Fri Sep 15 15:15:34 2006 +0100 Use a new set of parameters for the simulations in the paper. commit f0c436a96f8b69f600065de29663b6905a86c90a Author: Jochen Voss Date: Thu Sep 14 23:09:08 2006 +0100 pde/src: add more stuff to generate table 1 commit 29ffcb28a0069fc0faa06dc20d2153dcae6a64b9 Author: Jochen Voss Date: Thu Sep 14 22:28:26 2006 +0100 pde/src: prepare to generate table 1 commit 809e75b5c679f7658f0f4a3a0efb6f70e7bb967a Author: Jochen Voss Date: Thu Sep 14 01:58:27 2006 +0100 minor fixes for fast-dm release 8 commit a4762aa27d5860fea864319d8f2c6723a186e59c Author: Jochen Voss Date: Thu Sep 14 01:24:57 2006 +0100 pde/src/construct-samples.c: new file commit c2ec770c70fecc5fde3b1e3e67633ab4794daba8 Author: Jochen Voss Date: Wed Sep 13 02:07:38 2006 +0100 prepare for fast-dm release 7 commit ea7b1c963a8add5216f793e125ac6a8b4ee6c963 Author: Jochen Voss Date: Wed Sep 13 01:20:09 2006 +0100 pde/src/cdf.c: make the remaining parameters tunable Continue the attempt to find good values. commit e2175baff3c551b51e4187d99645ca70e777b65d Author: Jochen Voss Date: Tue Sep 12 22:21:54 2006 +0100 minor fixes commit ca939b4a38a2a95089cca1413987f10f1447c3af Author: Jochen Voss Date: Tue Sep 12 20:40:14 2006 +0100 pde/src/tune-params.c: use the PAPI performace library commit 0061fca58e6f8b8031c2574061339d0309f3782e Author: Jochen Voss Date: Tue Sep 12 15:32:03 2006 +0100 pde/src/tune-params.c: new file Start looking for good parameters systematically. commit 8ed468e5a36f924e31895b8797eacd56df6f7cb4 Author: Jochen Voss Date: Tue Sep 12 15:30:34 2006 +0100 pde/src/plot-cdf.c: bug fix (add forgotten F_delete call) commit 5b304be6415a696efd247baf9bff84861121842c Author: Jochen Voss Date: Tue Sep 12 15:29:52 2006 +0100 pde/src/simplex.c: comment fix commit c5dcca7d9eed646479aa2879b0358c53dbf45950 Author: Jochen Voss Date: Tue Sep 12 11:58:49 2006 +0100 pde/src/pde.h: split out tunable parameters from pde.c and cdf.c. This introduces the defines TUNE_PDE_DT_MIN, TUNE_PDE_DT_MAX, TUNE_PDE_DT_SCALE, and TUNE_DZ. commit c2487eb7db9b2adc9de8d39c68251dab887b1bd2 Author: Jochen Voss Date: Tue Sep 12 11:56:32 2006 +0100 pde/src/TODO: new file commit cd6d8b7973ddcc8fb78c221057dbcd77f0614125 Author: Jochen Voss Date: Mon Sep 11 22:38:48 2006 +0100 pde/src/main.c: remove misplaced \n in output commit f44ab8620a73fe88b95c60c6b8427143d1456571 Author: Jochen Voss Date: Mon Sep 11 21:26:14 2006 +0100 consistently use the order "a z v terr sz sv st" for the parameters commit 8cd8c5bbecc35f50e5ffccec327f498a77d3842f Author: Jochen Voss Date: Mon Sep 11 19:32:51 2006 +0100 Prepare for fast-dm release 6. pde/src/configure.ac: update version string pde/src/ChangeLog: new entries commit ce4186d910041301e3cb6aa82b45447b7bd33a2b Author: Jochen Voss Date: Mon Sep 11 18:11:20 2006 +0100 clean up the source, minor fixes commit b7b6f7c9e3a62be393d2a30e31dea94e9bc8edf4 Author: Andreas Voß Date: Mon Sep 11 17:17:15 2006 +0200 pde/src/EZ-diff.c: new file, EZ-model to initalise the simplex method commit 65fe11183275611e0b4cac88ff1be6166099fcf6 Author: Jochen Voss Date: Mon Sep 11 15:13:32 2006 +0100 pde/src/plot-cdf.c: MS Windows compatibility fixes commit 687db8523af3612ca29a7ec3e9ff22eede51ee7c Author: Jochen Voss Date: Sun Sep 10 14:19:53 2006 +0100 Prepare for fast-dm release 4. pde/src/ChangeLog: add the changelog entries from the git revision control system. pde/src/configure.ac: increase the version string to 4. commit fc9787e16a71269da0c19d338a5762bc07d82611 Author: Jochen Voss Date: Sun Sep 10 13:46:28 2006 +0100 pde/src/plot-cdf.c: use getopt to set parameters commit 73ec73a9aba7e1e097ff4f7914756040a4be95cf Author: Jochen Voss Date: Sun Sep 10 13:45:46 2006 +0100 pde/src/cdf.c: don't fail on rounding errors commit 03d7e5c112db684a9d4496fc3b3752593aa9bf4c Author: Jochen Voss Date: Sat Sep 9 13:42:29 2006 +0100 pde/src/fast-dm: doc fixes commit 6d0d24769a56300481f4909567f15f89010d759c Author: Jochen Voss Date: Sat Sep 9 13:15:41 2006 +0100 pde/src/fast-dm: clean up the source a bit commit 8533f94dfec359489abc96bef0d6f77eecffb3a8 Author: Jochen Voss Date: Sat Sep 9 12:54:12 2006 +0100 Rename old "pde/src/ks-pde.c" to new "pde/src/cdf.c". commit 41e4a1945eac3db78440d4e499e74af9e9235515 Author: Jochen Voss Date: Fri Sep 8 22:21:07 2006 +0100 pde/src/fast-dm: move 'get_KS' into "main.c" commit b51e232539f37b3aaf68847c8480aa509fffa621 Author: Jochen Voss Date: Fri Sep 8 21:54:03 2006 +0100 remove the old compare-methods target commit fc2331e54c8117c14b2398165b4e4874b55efe6c Author: Jochen Voss Date: Fri Sep 8 21:33:04 2006 +0100 pde/src/plot-cdf: new target commit 728fb4c27c96ebe1e2fe5163d2cc53cff620d06f Author: Jochen Voss Date: Thu Sep 7 13:57:41 2006 +0100 pde/src/ks-pde.c: always use 'terr' instead of 't_err'. commit 1a852064152f024d6915af4dbf47d9f8660d82d0 Author: Jochen Voss Date: Thu Sep 7 13:56:28 2006 +0100 pde/src/: cosmetic fixes commit 4e7a69c76ebf2e1b65ee9fc86ad6b6f7c426fc0c Author: Jochen Voss Date: Thu Sep 7 13:06:02 2006 +0100 pde/src/ks-pde.c: minor fixes commit 9b38e10418e46842531bc5ddf50cdd40d555401a Author: Jochen Voss Date: Thu Sep 7 12:19:05 2006 +0100 bruder/pde/: rename the project to fast-dm commit 205be5925c6c5a44323ed346bceb136393f06a95 Author: Jochen Voss Date: Wed Sep 6 12:21:13 2006 +0100 pde/src/configure.ac: increase the version string to 3 commit 6a502736163244c1c375892ac158087c0df57c56 Author: Jochen Voss Date: Wed Sep 6 12:16:53 2006 +0100 windows compatibility fixes commit 46dede97319d3650f4d685882fc4d880971dcaa5 Author: Jochen Voss Date: Sun Sep 3 22:28:36 2006 +0100 pde/src/compare-methods.c: cosmetic white space fix commit 03fe11b10d8f24acc685bb6ce93d739ffb1db902 Author: Jochen Voss Date: Sun Sep 3 21:44:36 2006 +0100 [pde/src/] cosmetric fixes Increase the version string to "2". Make the methods to compute the positive and negative part of the CDF mor similar to each other. Split out the functions 'Phi' and 'Phi_inverse' into a new source file "phi.c". commit 2d6f488ba3fce578660461e633dda0759f2b60c0 Author: Jochen Voss Date: Sun Sep 3 19:36:03 2006 +0100 pde/src/: switch the project to autoconf/automake commit 35cfaa822712ab8caa5d0911ced7d978c5feb4e7 Author: Jochen Voss Date: Sat Aug 26 23:16:42 2006 +0100 pde/src/ks-pde.c: help the compiler optimisation a bit (was svn revision 7202) commit 8503ecf765da4c6ecb75e62fe91b66203908404a Author: Jochen Voss Date: Sat Aug 26 22:47:30 2006 +0100 pde/src: clean up and rearrange the source files, no functional changes (was svn revision 7201) commit 6b31aec0d5e4af8f485f1d0e773fb1a1cbed2a65 Author: Jochen Voss Date: Sat Aug 26 21:45:15 2006 +0100 pde/src/compare-methods.c: new program (was svn revision 7200) commit 35def816029761f4e05119c663ba0c1229aafed1 Author: Jochen Voss Date: Sat Aug 26 21:44:22 2006 +0100 pde/src/erf.c: cosmetic fixes (was svn revision 7199) commit 48e03db969f2f07c14b82ec91196d197b1c4dae2 Author: Jochen Voss Date: Sat Aug 26 21:43:21 2006 +0100 put all sources under the GPL (was svn revision 7198) commit 1fef32834d089ce4445e801b0796e0a6a84bf061 Author: Jochen Voss Date: Thu Jul 27 18:20:34 2006 +0100 pde/src/: minor Windows compatibility fixes (was svn revision 7152) commit 8e714816c3bb4d67505d5937ab535afeec9a4baf Author: Jochen Voss Date: Thu Jul 27 17:52:09 2006 +0100 pde/src/main.c: improve robustness against rounding errors (was svn revision 7151) commit 3bd84e647e5539568b81369311f4b77a2b978be8 Author: Jochen Voss Date: Tue Jul 25 00:41:20 2006 +0100 pde/src/main.c: white space fixes (was svn revision 7144) commit 848fca9369a4569e29d2a5c62a4eda6852bb0e3c Author: Jochen Voss Date: Tue Jul 25 00:28:59 2006 +0100 pde/src/main.c: cosmetic changes (was svn revision 7143) commit 52c5145c133768d2d2f64b30f603be3479d19770 Author: Jochen Voss Date: Tue Jul 25 00:14:53 2006 +0100 pde/src/main.c, pde/src/integrate.tex: clean up the integration routines (was svn revision 7142) commit 5337fdaa4995bcb5b4bf28c5b609486f96d0e261 Author: Jochen Voss Date: Mon Jul 24 21:00:17 2006 +0100 pde/src/main.c: check for sv<0 (was svn revision 7141) commit c9583e35055226809f934e477471529bece75b0b Author: Jochen Voss Date: Sun Jul 9 22:01:04 2006 +0100 pde/src/main.c: bug fixes (was svn revision 7138) commit 9a4e4e5ac7b58046309dc6fbb92537097b2d767b Author: Jochen Voss Date: Sun Jul 9 21:32:43 2006 +0100 pde/src/main.c: fix a memory leak (thanks, valgrind) (was svn revision 7137) commit 57e64d536e7f1b072c80d166c98d024ee7852746 Author: Jochen Voss Date: Sun Jul 9 21:26:32 2006 +0100 pde/src/main.c: implement handling of p_sv (still buggy) (was svn revision 7136) commit b8ae770a3455e49788136f635667cd1ec399bd83 Author: Jochen Voss Date: Thu Jul 6 23:24:55 2006 +0100 pde/src/main.c: bug fix in the integration routine (was svn revision 7134) commit 974f5c7dedfc0f482a38df44b2505c40003ed23a Author: Jochen Voss Date: Thu Jul 6 22:49:54 2006 +0100 pde/src/main.c: implement a new, faster integration routine. (was svn revision 7133) commit 296f78869935feccbc3fd1378c79917e4dfdd558 Author: Jochen Voss Date: Thu Jul 6 15:29:10 2006 +0100 pde/src: bug fixes (was svn revision 7132) commit 077898ee834e73ce167cfc04774717a29803e14d Author: Jochen Voss Date: Wed Jul 5 23:47:11 2006 +0100 pde/src: implement variability in t_err (not yet tested) (was svn revision 7131) commit a66d3c121e145d2de9a9d15340c34e02be21ba52 Author: Jochen Voss Date: Wed Jul 5 22:05:26 2006 +0100 pde/src: cosmetic fixes and rearrangements. (was svn revision 7130) commit ccd44ddf0d09a84de8b75462194fe7c4a8c06865 Author: Jochen Voss Date: Sun Jul 2 20:27:04 2006 +0100 pde/src: updates by Andreas (was svn revision 7125) commit f0962d4d43ef3aa20ef8b10165ceec43de8553b0 Author: Jochen Voss Date: Sun Jul 2 19:35:14 2006 +0100 pde/src: Add emacs local variables to customise indentation. (was svn revision 7123) commit 1480ab4feb809e3dbae1cbbf89e06879169ca5d4 Author: Jochen Voss Date: Sun Jul 2 19:34:28 2006 +0100 pde/src/main.c: Bug fixes for variability in z. (was svn revision 7122) commit f610757911ee1cbdb9da9e8499adefc284a4ab9f Author: Jochen Voss Date: Sun Jul 2 16:25:59 2006 +0100 bruder/pde/src: improve the case with variability in z (was svn revision 7121) commit 4e62c5c7c4afc7654eb4d41e5b79d8f130a02af5 Author: Jochen Voss Date: Sat Jul 1 11:41:28 2006 +0100 bruder/pde/src: continue work on the variablity estimation (was svn revision 7119) commit 74fbfb0f86741f2d613383e73f80eb6c9e93df01 Author: Jochen Voss Date: Wed Jun 28 23:02:38 2006 +0100 main.c: implement variability in z (was svn revision 7118) commit 366581aad11f4a862d5d04b1c56356657a0a0709 Author: Jochen Voss Date: Wed Jun 28 19:44:05 2006 +0100 clean up the files a bit (was svn revision 7116) commit 1eec059971e242c5292ec5d840759121e0242d84 Author: Jochen Voss Date: Tue Jun 27 22:01:28 2006 +0100 findsteps.c: minor fixes (was svn revision 7113) commit 364d79a320fc552c51e1f503e9cb1cc01c97f3b7 Author: Jochen Voss Date: Tue Jun 27 21:50:45 2006 +0100 pde.c: cosmetic fixes (was svn revision 7112) commit a6952b9647521595c78c716153c1b9e998c3d5e8 Author: Jochen Voss Date: Tue Jun 27 21:39:12 2006 +0100 pde.c: solve_tridiag: bug fix, tested this time (was svn revision 7111) commit f77ee92c81780b2d506bcfc909ae5b7c6645e67d Author: Jochen Voss Date: Tue Jun 27 20:58:28 2006 +0100 pde.c: bug fix (solving the tridiag SLE) (was svn revision 7110) commit d81403d6de0f207c4239b426324a880be71f6063 Author: Jochen Voss Date: Tue Jun 27 19:24:01 2006 +0100 bug fixes (was svn revision 7109) commit 6377134e423dda820b18c53d250048d0e56e70f1 Author: Jochen Voss Date: Tue Jun 27 19:14:27 2006 +0100 Rename bruder/src/pde/ to bruder/pde/src/ . (was svn revision 7108) fast-dm-26/INSTALL0000644000175000017500000002243210532451262010613 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 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. 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' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' 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 option `--target=TYPE' 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 causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `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. fast-dm-26/NEWS0000644000175000017500000000156510574241161010266 00000000000000release 26 (9 March 2007) * minor optimisations release 25 (20 January 2007) * minor bug fixes and optimisations release 24 (28 November 2006) * cosmetic fixes release 23 (16 November 2006) * the names of the "log" and "save" commands were swapped * new control file format (use "*" in templates instead of "%d") * allow 1.0 as the new minimal precision * assorted fixes release 19 (6 November 2006): * construct samples can now generate random samples (command line option -r) release 18 (29 October 2006): * allow to fix the parameter z * output the distance between empirical and theoretical CDF as a p value release 17 (16 October 2006): * introduce experiment control files * support for experimental conditions * support for z depending on experimental conditions * beginning of a user manual in the file "MANUAL" release 9 (17 September 2006): * first public release fast-dm-26/TODO0000644000175000017500000000067110553126065010256 00000000000000errors: - optimising less than 2 parameters (other than z) does not work feature requests: - Auswahl des Schätzalgoritmus (ks; Chi) über die Exp. Datei. z.B. "method ks" - Einfügen von Ausreisserkriterien für die Reaktionszeiten: "upper 5.0" "lower 0.1" - Umskalieren der Parameter für die Optimierung auf einen Wertebereich von minus unendlich bis plus unendlich. - Evtl. Sinnvollere Gruppierung der Parameter in der Ausgabe? fast-dm-26/depcomp0000755000175000017500000003710010532451263011136 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" 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. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # 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,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$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" ;; 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 mecanism 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 in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: fast-dm-26/install-sh0000755000175000017500000002202110532451262011560 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2005-05-14.22 # 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. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= 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: -c (ignored) -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. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; 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 for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi 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 "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # 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: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # 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 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $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 "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 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. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit 0 } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: fast-dm-26/missing0000755000175000017500000002540610532451262011165 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # 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' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` 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 [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -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 [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -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 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: fast-dm-26/construct-samples.c0000644000175000017500000001255210571555774013436 00000000000000/* construct-samples.c - construct sample data for the article * * Copyright (C) 2006 Jochen Voss, Andreas Voss. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #include #include #include #ifndef _WIN32 #include #endif #include #include #include #include "fast-dm.h" #include "jvrandom.h" static int find_slot(double target, const double *value, int l, int r) { int m = (l+r)/2; if (m == l) { return l; } else if (value[m] > target) { return find_slot(target, value, l, m); } else { return find_slot(target, value, m, r); } } int main (int argc, char **argv) { struct F_calculator *fc; const char *outname; double para[p_count], z, precision; double *F; double **Fs, Fs_min, Fs_max; double t_min, t_max, dt; int random_flag = 0; int optc, i, j, N, s_size, s_count; outname = NULL; para[p_a] = 1.0; z = 0.5; para[p_v] = 0.0; para[p_t0] = 0.3; para[p_sz] = 0.0; para[p_sv] = 0.0; para[p_st0] = 0.0; precision = 4; s_size = 100; s_count = 1; #ifndef _WIN32 while ((optc = getopt (argc, argv, "a:z:v:t:Z:V:T:n:N:o:p:r")) != -1) { switch (optc) { case 'a': para[p_a] = atof (optarg); break; case 'z': z = atof (optarg); break; case 'v': para[p_v] = atof (optarg); break; case 't': para[p_t0] = atof (optarg); break; case 'Z': para[p_sz] = atof (optarg); break; case 'V': para[p_sv] = atof (optarg); break; case 'T': para[p_st0] = atof (optarg); break; case 'n': s_size = atoi (optarg); if (s_size<1 || s_size>1000000) { fprintf(stderr, "invalid sample size\n"); exit(1); } break; case 'N': s_count = atoi (optarg); if (s_count<1 || s_count>1000000) { fprintf(stderr, "invalid number of samples\n"); exit(1); } break; case 'o': outname = optarg; break; case 'p': precision = atof (optarg); break; case 'r': random_flag = 1; break; default: fprintf(stderr, "unknown option character '%c'\n", optc); break; } } #endif if (s_count>1 && ! random_flag) { fprintf (stderr, "generating multiple samples requires -r\n"); exit(1); } if (s_count>1 && (!outname || !strchr(outname,'%'))) { fprintf (stderr, "generating multiple samples file output\n"); fprintf (stderr, "and the name must contain a %%d template\n"); exit(1); } fprintf (stderr, "%d %s sample%s of size %d\n", s_count, random_flag?"random":"deterministic", s_count!=1?"s":"", s_size); fprintf (stderr, " a = %g\n", para[p_a]); fprintf (stderr, " z = %g\n", z); fprintf (stderr, " v = %g\n", para[p_v]); fprintf (stderr, " t0 = %g\n", para[p_t0]); fprintf (stderr, " sz = %g\n", para[p_sz]); fprintf (stderr, " sv = %g\n", para[p_sv]); fprintf (stderr, " st0 = %g\n", para[p_st0]); fprintf (stderr, " precision = %g\n", precision); /* get the F-values for the samples */ Fs = xnew(double *, s_count); Fs_min = 1; Fs_max = 0; if (random_flag) init_noise(time(NULL)); for (j=0; j Fs_max) Fs_max = Fs[j][i]; if (Fs[j][i] < Fs_min) Fs_min = Fs[j][i]; } } else { for (i=0; i Fs_min) t_min -= 0.1; /* get a table of F-values */ N = (t_max-t_min)/0.001 + 0.5; dt = (t_max-t_min)/N; F = xnew(double, N+1); F_start (fc, b_upper); for (i=0; i<=N; ++i) { double t = t_min+i*dt; if (t < 0) continue; F[i] = F_get_val (fc, t, z); } F_start (fc, b_lower); for (i=N; i>=0; --i) { double t = -(t_min+i*dt); if (t < 0) continue; F[i] = F_get_val (fc, t, z); } F_delete (fc); for (j=0; j= 0, fabs(t)); } if (outname) fclose(out); } for (j=0; j #include #include #include #include #include "fast-dm.h" /********************************************************************** * struct F_calculator: * Store information to calculate the cumulative distribution function F. * * Usage: * 1) Allocate a F_calculator structure with the 'F_new' function below. * This initialises the appropriate method for the given variabilities. * 2) Set the initial condition for the PDE with 'F_start' * 3) Get an array of computed values at time t with 'F_get_F'. * The field 'F_calculator.N' gives the length of the array. * 4) Get the z-value associated with array element 'i' using * the function 'F_get_z'. */ struct F_calculator { int N; int plus; void *data; void (*start) (struct F_calculator *, enum boundary); void (*delete) (struct F_calculator *); const double *(*get_F) (struct F_calculator *, double t); double (*get_z) (const struct F_calculator *, int i); }; /********************************************************************** * parameters to control the precision of the CDF computation */ double TUNE_PDE_DT_MIN; double TUNE_PDE_DT_MAX; double TUNE_PDE_DT_SCALE; double TUNE_DZ; double TUNE_DV; double TUNE_DT0; static int precision_set = 0; void set_precision (double p) /* Try to achieve an accuracy of approximately 10^{-p} for the CDF. */ { TUNE_PDE_DT_MIN = pow(10, -0.612679*p-1.37112); TUNE_PDE_DT_MAX = pow(10, -1.91219*p+5.13757); TUNE_PDE_DT_SCALE = pow(10, -0.809802*p+1.62977); TUNE_DZ = pow(10, -0.455458*p-0.467368); TUNE_DV = pow(10, -0.931667*p+1.00676); TUNE_DT0 = pow(10, -1.07081*p+0.651143); precision_set = 1; } /********************************************************************** * plain: no variability */ struct F_plain_data { double a, v, terr; /* parameters (except z) */ double dz; /* z step-size */ double t; /* time corresponding to the vector F */ double *F; /* state at time t */ }; static void F_plain_start (struct F_calculator *fc, enum boundary plus) { struct F_plain_data *data = fc->data; double a = data->a; double v = data->v; int N = fc->N; int i; fc->plus = plus; data->t = 0; data->F[0] = plus ? 1 : 0; for (i=1; iF[i] = 1 - z/a; } else { data->F[i] = (exp(-2*v*z)-exp(-2*v*a)) / (1-exp(-2*v*a)); } } data->F[N] = plus ? 1 : 0; } static void F_plain_delete (struct F_calculator *fc) { struct F_plain_data *data = fc->data; xfree (data->F); xfree (data); xfree (fc); } static const double * F_plain_get_F (struct F_calculator *fc, double t) { struct F_plain_data *data = fc->data; if (t > data->t) { double terr = data->terr; if (t > terr) { double t0 = data->t - terr; double t1 = t - terr; if (t0 < 0) t0 = 0; advance_to (fc->N, data->F, t0, t1, data->dz, data->v); } data->t = t; } return data->F; } static double F_plain_get_z (const struct F_calculator *fc, int i) { struct F_plain_data *data = fc->data; return i * data->dz; } static struct F_calculator * F_plain_new (const double *para) /* Allocate a new 'struct F_calculator' (without variabilities). */ { struct F_calculator *fc; struct F_plain_data *data; int N; N = 2*(int)(para[p_a]*0.5/TUNE_DZ+0.5); if (N<4) N = 4; /* N must be even, otherwise the case sz == a fails */ fc = xnew (struct F_calculator, 1); fc->N = N; fc->plus = -1; data = xnew (struct F_plain_data, 1); data->a = para[p_a]; data->v = para[p_v]; data->terr = para[p_t0]; data->dz = para[p_a]/N; data->t = 0; data->F = xnew (double, N+1); fc->data = data; fc->start = F_plain_start; fc->delete = F_plain_delete; fc->get_F = F_plain_get_F; fc->get_z = F_plain_get_z; return fc; } /********************************************************************** * sz: variability in z */ struct F_sz_data { struct F_calculator *base_fc; /* gives the values we average over */ double *avg; /* the computed averages */ int k; /* the average involves 2*k+1 cells */ double q; /* unused part of the outermost cells */ double f; /* scale factor for the integration */ }; static void F_sz_start (struct F_calculator *fc, enum boundary plus) { struct F_sz_data *data = fc->data; fc->plus = plus; F_start (data->base_fc, plus); } static void F_sz_delete (struct F_calculator *fc) { struct F_sz_data *data = fc->data; F_delete (data->base_fc); xfree (data->avg); xfree (data); xfree (fc); } static const double * F_sz_get_F (struct F_calculator *fc, double t) { struct F_sz_data *data = fc->data; const double *F; double tmp, q, f; int i, j, m; F = F_get_F (data->base_fc, t); m = 2*data->k; q = data->q; f = data->f; if (m >= 3) { for (i=0; i<=fc->N; ++i) { tmp = F[i] * 0.5*(1-q)*(1-q); tmp += F[i+1] * (1-0.5*q*q); for (j=i+2; javg[i] = tmp * f; } } else { /* m == 2 */ for (i=0; i<=fc->N; ++i) { tmp = F[i] * 0.5*(1-q)*(1-q); tmp += F[i+1] * (1-q*q); tmp += F[i+2] * 0.5*(1-q)*(1-q); data->avg[i] = tmp * f; } } /* m == 1 is impossible here */ return data->avg; } static double F_sz_get_z (const struct F_calculator *fc, int i) { struct F_sz_data *data = fc->data; return F_get_z (data->base_fc, i+data->k); } static struct F_calculator * F_sz_new (const double *para) /* Allocate a new 'struct F_calculator' (with sv == 0 and st == 0). * * This function can deal with variabilities in z. * If 'sz == 0', it just returns the result of 'F_plain_new'. */ { struct F_calculator *base_fc; struct F_calculator *fc; struct F_sz_data *data; double tmp, dz; int N, k; base_fc = F_plain_new (para); if (para[p_sz] == 0) return base_fc; N = base_fc->N; dz = F_get_z (base_fc, 1) - F_get_z (base_fc, 0); tmp = para[p_sz]/(2*dz); k = ceil(tmp) + 0.5; assert (2*k <= N); fc = xnew (struct F_calculator, 1); fc->N = N-2*k; fc->plus = -1; data = xnew (struct F_sz_data, 1); data->base_fc = base_fc; data->avg = xnew (double, fc->N+1); data->k = k; data->q = k - tmp; data->f = dz/para[p_sz]; fc->data = data; fc->start = F_sz_start; fc->delete = F_sz_delete; fc->get_F = F_sz_get_F; fc->get_z = F_sz_get_z; return fc; } /********************************************************************** * sv: variability in v */ struct F_sv_data { int nv; /* number of points in integration */ struct F_calculator **base_fc; /* F_calculators for different v */ double *avg; }; static void F_sv_start (struct F_calculator *fc, enum boundary plus) { struct F_sv_data *data = fc->data; int j; fc->plus = plus; for (j=0; jnv; ++j) F_start (data->base_fc[j], plus); } static void F_sv_delete (struct F_calculator *fc) { struct F_sv_data *data = fc->data; int j; for (j=0; jnv; ++j) F_delete (data->base_fc[j]); xfree (data->base_fc); xfree (data->avg); xfree (data); xfree (fc); } static const double * F_sv_get_F (struct F_calculator *fc, double t) { struct F_sv_data *data = fc->data; const double *F; double *avg = data->avg; int i, j; F = F_get_F(data->base_fc[0], t); for (i=0; i<=fc->N; ++i) avg[i] = F[i]; for (j=1; jnv; ++j) { F = F_get_F(data->base_fc[j], t); for (i=0; i<=fc->N; ++i) avg[i] += F[i]; } for (i=0; i<=fc->N; ++i) avg[i] /= data->nv; return avg; } static double F_sv_get_z (const struct F_calculator *fc, int i) { struct F_sv_data *data = fc->data; return F_get_z (data->base_fc[0], i); } static struct F_calculator * F_sv_new (const double *para) /* Allocate a new 'struct F_calculator'. * * This initialises the PDE and prepares most things for the * calculation. The initial condition for the returned 'struct * F_calculator' has to be set using 'F_start'. * * This function can deal with variabilities in all parameters. * If 'sv == 0', it just return the result of 'F_st_new'. */ { struct F_calculator **base_fc; struct F_calculator *fc; struct F_sv_data *data; double para2 [p_count]; int nv, j; if (para[p_sv] == 0) return F_sz_new (para); nv = para[p_sv]/TUNE_DV + 0.5; if (nv < 3) nv = 3; memcpy (para2, para, p_count*sizeof(double)); para2[p_sv] = 0; base_fc = xnew (struct F_calculator *, nv); for (j=0; jN = base_fc[0]->N; fc->plus = -1; data = xnew (struct F_sv_data, 1); data->nv = nv; data->base_fc = base_fc; data->avg = xnew (double, fc->N+1); fc->data = data; fc->start = F_sv_start; fc->delete = F_sv_delete; fc->get_F = F_sv_get_F; fc->get_z = F_sv_get_z; return fc; } /********************************************************************** * st: variability in terr */ struct F_st_data { struct F_calculator *base_fc; double st; /* variability of terr */ int M; /* number of stored grid lines */ double start; /* t-value of first stored grid line */ double dt; /* t-spacing of stored grid lines */ double *values; /* array: stored grid lines (length M*(N+1)) */ int base; /* first grid line starts at pos. base*(N+1) */ double *avg; /* the computed average (size N+1) */ }; static void F_st_start (struct F_calculator *fc, enum boundary plus) { struct F_st_data *data = fc->data; fc->plus = plus; F_start (data->base_fc, plus); data->start = -DBL_MAX; } static void F_st_delete (struct F_calculator *fc) { struct F_st_data *data = fc->data; F_delete (data->base_fc); xfree (data->values); xfree (data->avg); xfree (data); xfree (fc); } static double * F_st_get_row (const struct F_calculator *fc, int j) /* Get a pointer to one of the stored grid lines. * The value j is the grid line index (range 0, ..., M-1). * The returned value is a pointer to an array of length N+1. */ { const struct F_st_data *data = fc->data; int M = data->M; int N = fc->N; return data->values + ((data->base + j)%M)*(N+1); } static const double * F_st_get_F (struct F_calculator *fc, double t) { struct F_st_data *data = fc->data; double a, b, dt; double q, r, *avg, *row; int M, N, keep; int i, j, m; a = t - 0.5*data->st; b = t + 0.5*data->st; dt = data->dt; M = data->M; N = fc->N; /* how many of the precalculated rows can we keep? */ if (a - M*dt < data->start) { int shift = (a - data->start)/dt; assert (shift >= 0); keep = M - shift; data->start += shift*dt; data->base = (data->base+shift)%M; } else { data->start = a; keep = 0; } /* compute new rows as needed */ for (j=keep; j<=M; ++j) { const double *F = F_get_F (data->base_fc, data->start+j*dt); row = F_st_get_row (fc, j); memcpy (row, F, (N+1)*sizeof(double)); } /* compute the average over the rows from a to b */ { double tmp = (b - data->start)/dt; m = ceil (tmp) + 0.5; if (m >= M) m = M-1; /* protect against rounding errors */ q = (a - data->start)/dt; r = m - tmp; } avg = data->avg; if (m >= 3) { row = F_st_get_row (fc, 0); for (i=0; i<=N; ++i) avg[i] = row[i] * 0.5*(1-q)*(1-q); row = F_st_get_row (fc, 1); for (i=0; i<=N; ++i) avg[i] += row[i] * (1-0.5*q*q); for (j=2; jdata; return F_get_z (data->base_fc, i); } static struct F_calculator * F_st_new (const double *para) /* Allocate a new 'struct F_calculator' (with sv == 0). * * This function can deal with variabilities in z and t. * If 'st == 0', it just return the result of 'F_sz_new'. */ { struct F_calculator *base_fc; struct F_calculator *fc; struct F_st_data *data; double dt; int M, N; base_fc = F_sv_new (para); if (para[p_st0] == 0) return base_fc; M = para[p_st0]/TUNE_DT0 + 1.5; if (M < 3) M = 3; dt = para[p_st0]/(M-2); N = base_fc->N; fc = xnew (struct F_calculator, 1); fc->N = N; fc->plus = -1; data = xnew (struct F_st_data, 1); data->st = para[p_st0]; data->base_fc = base_fc; data->M = M; /* data->start is set in F_st_start */ data->dt = dt; data->values = xnew (double, M*(N+1)); data->base = 0; data->avg = xnew (double, N+1); fc->data = data; fc->start = F_st_start; fc->delete = F_st_delete; fc->get_F = F_st_get_F; fc->get_z = F_st_get_z; return fc; } /********************************************************************** * externally visible routines */ struct F_calculator * F_new (const double *para) { assert (precision_set); return F_st_new (para); } void F_delete (struct F_calculator *fc) /* Free a 'struct F_calculator' and all associated resources. * 'fc' must have been allocated by 'F_new'. After 'F_delete' is * called, 'fc' cannot be used any longer. */ { fc->delete (fc); } void F_start (struct F_calculator *fc, enum boundary b) /* Set the initial condition for the PDE. * If 'b' is 'b_upper', prepare to calculate the CDF for hitting a, * otherwise prepare to calculate the CDF for hitting 0. */ { fc->start (fc, b); } int F_get_N (const struct F_calculator *fc) { return fc->N; } double F_get_z (const struct F_calculator *fc, int i) /* Get the z-value corresponding to index i. */ { return fc->get_z (fc, i); } const double * F_get_F (struct F_calculator *fc, double t) /* Get the array of CDF values at time t for all grid points z. * 'F_start' must be used for initialisation before calling 'F_get_F'. * Between calls of 'F_start' the calls to 'F_get_F' must have * increasing values of 't'. */ { return fc->get_F (fc, t); } double F_get_val (struct F_calculator *fc, double t, double z) /* Get the value of the CDF for the parameters given when creating fc. * The function Uses linear interpolation for z-values between the grid points. * Don't use this function for parameter fitting, since it is not very fast * (use 'F_get_F' instead). */ { const double *F; double z0, z1; double p, x; int N = fc->N; int i; F = F_get_F (fc, t); if (N == 0) { x = F[0]; } else { z0 = F_get_z (fc, 0); z1 = F_get_z (fc, N); i = N*(z-z0)/(z1-z0); if (i < N) { z0 = F_get_z (fc, i); z1 = F_get_z (fc, i+1); p = (z1-z) / (z1-z0); x = p*F[i] + (1-p)*F[i+1]; } else { x = F[N]; } } return x; } /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/phi.c0000644000175000017500000000272010511761337010510 00000000000000/* phi.c - the CDF and inverse CDF of the standard normal distribution * * Copyright (C) 2006 Jochen Voss. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #ifdef _WIN32 #define _USE_MATH_DEFINES #endif #include #include "fast-dm.h" double Phi (double x) /* The distribution function of the standard normal distribution. */ { return 0.5*(1+erf (x/M_SQRT2)); } double Phi_inverse (double y) /* The inverse of Phi, calculated using the bisection method */ { double l, r; if (y<=0.5) { l = -1; while (Phi(l)>=y) l -= 1; r = l+1; } else { r = 0; while (Phi(r) 1e-8); return 0.5*(l+r); } /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/pde.c0000644000175000017500000000614010571555774010514 00000000000000/* pde.c - numerically solve the Fokker-Planck equation * * Copyright (C) 2006 Jochen Voss, Andreas Voss. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #include #include "fast-dm.h" static void solve_tridiag(int N, const double *rhs, double *res, double left, double mid, double right) /* Solve an (N-1)x(N-1) tridiagonal system of linear equations. * * The matrix has 'mid' on the diagonal, 'left' on the subdiagonal and * 'right' on the superdiagonal. The vectors 'res' and 'rhs' have * lenght N+1 but only the inner N-1 elements are considered, elements * 0 and N of the vectors are ignored. */ { double *tmp, p, old_res, old_tmp; int i; tmp = xnew(double, N); /* step 1: solving forward */ tmp[1] = old_tmp = right / mid; res[1] = old_res = rhs[1] / mid; for (i=2; i0; --i) res[i] -= tmp[i]*res[i+1]; xfree (tmp); } static void make_step (int N, double *vector, double dt, double dz, double v) /* Advance the numerical solution of the PDE by one step in time, * using the Crank-Nicolson scheme. The time step size is 'dt', the * space grid size is 'dz'. */ { double *tmp_vector; double left, mid, right; int i; tmp_vector = xnew (double, N+1); left = (1-dz*v) / (2*dz*dz); mid = -1 / (dz*dz); right = (1+dz*v) / (2*dz*dz); tmp_vector[1] = (dt*left * vector[0] + (1+0.5*dt*mid) * vector[1] + 0.5*dt*right * vector[2]); for (i=2; i TUNE_PDE_DT_MAX) dt = TUNE_PDE_DT_MAX; if (t0 + dt >= t1) { dt = t1 - t0; done = 1; } make_step (N, vector, dt, dz, v); t0 += dt; } while (! done); } /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/xmalloc.c0000644000175000017500000000372710553673135011403 00000000000000/* xmalloc.c - memory allocation with error checking * * Copyright (C) 1998, 2003 Jochen Voss * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include "fast-dm.h" static void fatal (const char *message) { fprintf (stderr, "error: %s, aborting\n", message); abort (); } void * xmalloc (size_t size) /* Like 'malloc', but check for shortage of memory. For positive * sizes 'xmalloc' never returns 'NULL'. */ { void *ptr; if (size == 0) return NULL; ptr = malloc (size); if (ptr == NULL) fatal ("memory exhausted"); return ptr; } void * xrealloc (void *ptr, size_t newsize) /* Like 'realloc', but check for shortage of memory. For positive * sizes 'xrealloc' never returns 'NULL'. */ { if (newsize == 0) { if (ptr) free (ptr); return NULL; } ptr = ptr ? realloc (ptr, newsize) : malloc(newsize); if (ptr == NULL) fatal ("memory exhausted"); return ptr; } void xfree (void *ptr) /* Like 'free', but ignores NULL pointers. */ { if (ptr) free (ptr); } char * xstrdup (const char *s) { char *ptr; ptr = strdup (s); if (ptr == NULL) fatal ("memory exhausted"); return ptr; } char * xstrndup (const char *s, size_t n) { char *ptr; ptr = xmalloc(n+1); memcpy(ptr, s, n); ptr[n] = '\0'; return ptr; } fast-dm-26/fast-dm.h0000644000175000017500000001641310571555774011310 00000000000000/* fast-dm.h - global header file for the PDE project * * Copyright (C) 2006 Jochen Voss, Andreas Voss. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #include #if __GNUC__ >= 3 #define jv_pure __attribute__ ((pure)) #define jv_const __attribute__ ((const)) #define jv_noreturn __attribute__ ((noreturn)) #define jv_malloc __attribute__ ((malloc)) #define jv_printf __attribute__ ((format (printf, 1, 2))) #define jv_fprintf __attribute__ ((format (printf, 2, 3))) #define jv_must_check __attribute__ ((warn_unused_result)) #define jv_unused __attribute__ ((unused)) #else #define jv_pure /* no pure */ #define jv_const /* no const */ #define jv_noreturn /* no noreturn */ #define jv_malloc /* no malloc */ #define jv_printf /* no printf */ #define jv_fprintf /* no printf */ #define jv_must_check /* no warn_unused_result */ #define jv_unused /* no unused */ #endif /* windows compatibility hacks */ #ifdef _WIN32 /* provided in "win32erf.c" */ extern double erf (double x); #define snprintf _snprintf #endif /* from "xmalloc.c" */ extern void *xmalloc (size_t size) jv_malloc; #define xnew(T,N) ((T *)xmalloc((N)*sizeof(T))) extern void *xrealloc (void *ptr, size_t newsize); #define xrenew(T,OLD,N) ((T *)xrealloc(OLD,(N)*sizeof(T))) extern void xfree (void *ptr); extern char *xstrdup (const char *s) jv_malloc; extern char *xstrndup (const char *s, size_t n) jv_malloc; /* from "container.c" */ struct set { int used, alloc; char **item; }; extern struct set *new_set (void); extern void delete_set (struct set *set); extern int set_item (struct set *set, const char *item, int add); struct dict; extern struct dict *new_dict (void); extern void delete_dict (struct dict *dict); extern void dict_add (struct dict *dict, const char *key, const char *value); extern const char *dict_lookup (const struct dict *dict, const char *key); extern void dict_clear (struct dict *dict); struct array { int used, alloc; char **entry; }; extern struct array *new_array (void); extern void delete_array (struct array *array); extern void array_clear (struct array *array); extern int array_find (struct array *array, const char *str); extern void array_append (struct array *array, const char *str); extern void array_sort (struct array *array); /* from "file.c" */ extern struct array *file_names_find (const char *pattern); extern char *file_names_replace_star(const char *template, const char *key); struct file; extern struct file *new_file (const char *fname); extern void delete_file (struct file *file); extern void file_error (struct file *file, const char *format, ...) jv_fprintf jv_noreturn; extern void file_message (struct file *file, const char *format, ...) jv_fprintf; extern const char *file_name (const struct file *file); extern int file_read (struct file *file, const char *const**w_ptr, int *n_ptr); /* from "dataset.c" */ enum parameter_index { p_a, p_v, p_t0, p_sz, p_sv, p_st0, p_count }; struct samples { double *plus_data, *minus_data; int plus_alloc, minus_alloc; int plus_used, minus_used; }; extern struct samples *new_samples (void); extern void delete_samples (struct samples *s); extern void samples_add_sample (struct samples *samples, double t, int res); extern void samples_sort (struct samples *samples); struct dataset { char *fname, *logname, *key; double precision; /* commands for initialisation */ int cmds_used, cmds_alloc; struct cmds { enum cmd { c_copy_param, c_copy_const, c_run } cmd; int arg1, arg2; } *cmds; /* names of the parameters optimised by the simplex algorithm */ struct array *param; /* names of the z-parameters optimised by direct search */ struct array *z; /* constants for initialisation of fixed parameters */ int consts_used, consts_alloc; double *consts; /* reaction time date, split by experimental condition */ int samples_used, samples_alloc; struct samples **samples; char **samples_name; }; extern struct dataset *new_dataset (void); extern void delete_dataset (struct dataset *dataset); extern void dataset_print (const struct dataset *dataset); extern void dataset_print_commands (const struct dataset *dataset); extern int dataset_samples_idx (struct dataset *dataset, const char *name, int add); extern int dataset_add_const (struct dataset *dataset, double x); extern int dataset_add_param (struct dataset *dataset, const char *name); extern int dataset_add_z (struct dataset *dataset, const char *name); extern void dataset_add_cmd (struct dataset *dataset, enum cmd cmd, int arg1, int arg2); extern void dataset_save_result (const struct dataset *datatset, const double *x, const double *z, double p, double time); /* from "experiment.c" */ struct experiment; extern struct experiment *new_experiment (const char *fname); extern void delete_experiment (struct experiment *li); extern void experiment_print (const struct experiment *li); extern struct dataset *experiment_get_dataset (struct experiment *li); extern void experiment_log (struct experiment *ex, const struct dataset *ds, double *values, double *z, double p, double time); /* from "pde.c" */ extern void advance_to (int N, double *vector, double t0, double t1, double dz, double v); /* from "phi.c" */ extern double Phi (double x); extern double Phi_inverse (double y); /* from "cdf.c" */ extern double TUNE_PDE_DT_MIN; extern double TUNE_PDE_DT_MAX; extern double TUNE_PDE_DT_SCALE; extern double TUNE_DZ; extern double TUNE_DV; extern double TUNE_DT0; extern void set_precision (double p); struct F_calculator; enum boundary { b_lower=0, b_upper=1 }; extern struct F_calculator *F_new (const double *para); extern void F_delete (struct F_calculator *fc); extern void F_start (struct F_calculator *fc, enum boundary); extern int F_get_N (const struct F_calculator *fc); extern double F_get_z (const struct F_calculator *fc, int i); extern const double *F_get_F (struct F_calculator *fc, double t); extern double F_get_val (struct F_calculator *fc, double t, double z); /* from "simplex.c" */ extern double simplex (int n, double *x, const double *eps, double size_limit, void *data, double (*fn)(const double *x, void *data)); /* from "simplex2.c" */ extern void simplex2(int n, const double *eps, double size_limit, void (*fn)(const double *x, double res[2], void *data), double *x_ret, double *fn_ret, void *data); /* from "EZ-diff.c" */ extern int EZ_par (const struct samples *data, double *a, double *v, double *t0); /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/jvrandom.h0000644000175000017500000003001110511761337011547 00000000000000/* jvrandom.h - random number generation * * This file combines the Mersenne Twister random number generator by * Takuji Nishimura and Makoto Matsumoto with the Ziggurat method as * described by George Marsaglia and Wai Wan Tsang. * * The Mersenne Twister code "mt19937ar.c" was downloaded from the * Mersenne Twister home page at * http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html . * The code coming from "mt19937ar.c" is Copyright (C) 1997 - 2002, * Makoto Matsumoto and Takuji Nishimura and can be distributed under * the following BSD-style license: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the * following disclaimer in the documentation and/or other * materials provided with the distribution. * * 3. The names of its contributors may not 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. * * All other code in this file is * Copyright (C) 2005 Jochen Voss * and can be distributed under the GPL: * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301 USA * * Please send all comments, questions, bug reports, etc. about this * code to Jochen Voss . */ #ifndef FILE_JVRANDOM_H_SEEN #define FILE_JVRANDOM_H_SEEN #if defined(__GNUC__) #define JV_UNUSED __attribute__((__unused__)) #else #define JV_UNUSED #endif #include /* Period parameters */ #define MT_N 624 #define MT_M 397 #define MATRIX_A 0x9908b0dfUL /* constant vector a */ #define UPPER_MASK 0x80000000UL /* most significant w-r bits */ #define LOWER_MASK 0x7fffffffUL /* least significant r bits */ static unsigned long mt[MT_N]; /* the array for the state vector */ static int mti = MT_N + 1; /* mti==MT_N+1 means mt[MT_N] is not initialized */ static void init_noise (unsigned long s) /* initialise the random number generator */ { mt[0] = s & 0xffffffffUL; for (mti = 1; mti < MT_N; mti++) { mt[mti] = (1812433253UL * (mt[mti - 1] ^ (mt[mti - 1] >> 30)) + mti); mt[mti] &= 0xffffffffUL; } } static unsigned long jvrand_int32 (void) /* generates a random integer from the range 0, ..., 0xffffffff */ { unsigned long y; static unsigned long mag01[2] = { 0x0UL, MATRIX_A }; /* mag01[x] = x * MATRIX_A for x=0,1 */ if (mti >= MT_N) { /* generate MT_N words at one time */ int kk; for (kk = 0; kk < MT_N - MT_M; kk++) { y = (mt[kk] & UPPER_MASK) | (mt[kk + 1] & LOWER_MASK); mt[kk] = mt[kk + MT_M] ^ (y >> 1) ^ mag01[y & 0x1UL]; } for (; kk < MT_N - 1; kk++) { y = (mt[kk] & UPPER_MASK) | (mt[kk + 1] & LOWER_MASK); mt[kk] = mt[kk + (MT_M - MT_N)] ^ (y >> 1) ^ mag01[y & 0x1UL]; } y = (mt[MT_N - 1] & UPPER_MASK) | (mt[0] & LOWER_MASK); mt[MT_N - 1] = mt[MT_M - 1] ^ (y >> 1) ^ mag01[y & 0x1UL]; mti = 0; } y = mt[mti++]; /* Tempering */ y ^= (y >> 11); y ^= (y << 7) & 0x9d2c5680UL; y ^= (y << 15) & 0xefc60000UL; y ^= (y >> 18); return y; } static double jvrand_real2 (void) /* generates a random number from the interval [0,1). */ { return jvrand_int32() * (1.0 / 4294967296.0); /* divided by 2^32 */ } /* number of levels in the ziggurat */ #define LEVELS 128 /* position of right-most step */ #define PARAM_R 3.44428647676 /* level values */ static const double ytab[128] = { 1, 0.963598623011, 0.936280813353, 0.913041104253, 0.892278506696, 0.873239356919, 0.855496407634, 0.838778928349, 0.822902083699, 0.807732738234, 0.793171045519, 0.779139726505, 0.765577436082, 0.752434456248, 0.739669787677, 0.727249120285, 0.715143377413, 0.703327646455, 0.691780377035, 0.68048276891, 0.669418297233, 0.65857233912, 0.647931876189, 0.637485254896, 0.62722199145, 0.617132611532, 0.607208517467, 0.597441877296, 0.587825531465, 0.578352913803, 0.569017984198, 0.559815170911, 0.550739320877, 0.541785656682, 0.532949739145, 0.524227434628, 0.515614886373, 0.507108489253, 0.498704867478, 0.490400854812, 0.482193476986, 0.47407993601, 0.466057596125, 0.458123971214, 0.450276713467, 0.442513603171, 0.434832539473, 0.427231532022, 0.419708693379, 0.41226223212, 0.404890446548, 0.397591718955, 0.390364510382, 0.383207355816, 0.376118859788, 0.369097692334, 0.362142585282, 0.355252328834, 0.348425768415, 0.341661801776, 0.334959376311, 0.328317486588, 0.321735172063, 0.31521151497, 0.308745638367, 0.302336704338, 0.29598391232, 0.289686497571, 0.283443729739, 0.27725491156, 0.271119377649, 0.265036493387, 0.259005653912, 0.253026283183, 0.247097833139, 0.241219782932, 0.235391638239, 0.229612930649, 0.223883217122, 0.218202079518, 0.212569124201, 0.206983981709, 0.201446306496, 0.195955776745, 0.190512094256, 0.185114984406, 0.179764196185, 0.174459502324, 0.169200699492, 0.1639876086, 0.158820075195, 0.153697969964, 0.148621189348, 0.143589656295, 0.138603321143, 0.133662162669, 0.128766189309, 0.123915440582, 0.119109988745, 0.114349940703, 0.10963544023, 0.104966670533, 0.100343857232, 0.0957672718266, 0.0912372357329, 0.0867541250127, 0.082318375932, 0.0779304915295, 0.0735910494266, 0.0693007111742, 0.065060233529, 0.0608704821745, 0.056732448584, 0.05264727098, 0.0486162607163, 0.0446409359769, 0.0407230655415, 0.0368647267386, 0.0330683839378, 0.0293369977411, 0.0256741818288, 0.0220844372634, 0.0185735200577, 0.0151490552854, 0.0118216532614, 0.00860719483079, 0.00553245272614, 0.00265435214565 }; /* quick acceptance check */ static const unsigned long ktab[128] = { 0, 12590644, 14272653, 14988939, 15384584, 15635009, 15807561, 15933577, 16029594, 16105155, 16166147, 16216399, 16258508, 16294295, 16325078, 16351831, 16375291, 16396026, 16414479, 16431002, 16445880, 16459343, 16471578, 16482744, 16492970, 16502368, 16511031, 16519039, 16526459, 16533352, 16539769, 16545755, 16551348, 16556584, 16561493, 16566101, 16570433, 16574511, 16578353, 16581977, 16585398, 16588629, 16591685, 16594575, 16597311, 16599901, 16602354, 16604679, 16606881, 16608968, 16610945, 16612818, 16614592, 16616272, 16617861, 16619363, 16620782, 16622121, 16623383, 16624570, 16625685, 16626730, 16627708, 16628619, 16629465, 16630248, 16630969, 16631628, 16632228, 16632768, 16633248, 16633671, 16634034, 16634340, 16634586, 16634774, 16634903, 16634972, 16634980, 16634926, 16634810, 16634628, 16634381, 16634066, 16633680, 16633222, 16632688, 16632075, 16631380, 16630598, 16629726, 16628757, 16627686, 16626507, 16625212, 16623794, 16622243, 16620548, 16618698, 16616679, 16614476, 16612071, 16609444, 16606571, 16603425, 16599973, 16596178, 16591995, 16587369, 16582237, 16576520, 16570120, 16562917, 16554758, 16545450, 16534739, 16522287, 16507638, 16490152, 16468907, 16442518, 16408804, 16364095, 16301683, 16207738, 16047994, 15704248, 15472926 }; /* quick value conversion */ static const double wtab[128] = { 1.62318314817e-08, 2.16291505214e-08, 2.54246305087e-08, 2.84579525938e-08, 3.10340022482e-08, 3.33011726243e-08, 3.53439060345e-08, 3.72152672658e-08, 3.8950989572e-08, 4.05763964764e-08, 4.21101548915e-08, 4.35664624904e-08, 4.49563968336e-08, 4.62887864029e-08, 4.75707945735e-08, 4.88083237257e-08, 5.00063025384e-08, 5.11688950428e-08, 5.22996558616e-08, 5.34016475624e-08, 5.44775307871e-08, 5.55296344581e-08, 5.65600111659e-08, 5.75704813695e-08, 5.85626690412e-08, 5.95380306862e-08, 6.04978791776e-08, 6.14434034901e-08, 6.23756851626e-08, 6.32957121259e-08, 6.42043903937e-08, 6.51025540077e-08, 6.59909735447e-08, 6.68703634341e-08, 6.77413882848e-08, 6.8604668381e-08, 6.94607844804e-08, 7.03102820203e-08, 7.11536748229e-08, 7.1991448372e-08, 7.2824062723e-08, 7.36519550992e-08, 7.44755422158e-08, 7.52952223703e-08, 7.61113773308e-08, 7.69243740467e-08, 7.77345662086e-08, 7.85422956743e-08, 7.93478937793e-08, 8.01516825471e-08, 8.09539758128e-08, 8.17550802699e-08, 8.25552964535e-08, 8.33549196661e-08, 8.41542408569e-08, 8.49535474601e-08, 8.57531242006e-08, 8.65532538723e-08, 8.73542180955e-08, 8.8156298059e-08, 8.89597752521e-08, 8.97649321908e-08, 9.05720531451e-08, 9.138142487e-08, 9.21933373471e-08, 9.30080845407e-08, 9.38259651738e-08, 9.46472835298e-08, 9.54723502847e-08, 9.63014833769e-08, 9.71350089201e-08, 9.79732621669e-08, 9.88165885297e-08, 9.96653446693e-08, 1.00519899658e-07, 1.0138063623e-07, 1.02247952126e-07, 1.03122261554e-07, 1.04003996769e-07, 1.04893609795e-07, 1.05791574313e-07, 1.06698387725e-07, 1.07614573423e-07, 1.08540683296e-07, 1.09477300508e-07, 1.1042504257e-07, 1.11384564771e-07, 1.12356564007e-07, 1.13341783071e-07, 1.14341015475e-07, 1.15355110887e-07, 1.16384981291e-07, 1.17431607977e-07, 1.18496049514e-07, 1.19579450872e-07, 1.20683053909e-07, 1.21808209468e-07, 1.2295639141e-07, 1.24129212952e-07, 1.25328445797e-07, 1.26556042658e-07, 1.27814163916e-07, 1.29105209375e-07, 1.30431856341e-07, 1.31797105598e-07, 1.3320433736e-07, 1.34657379914e-07, 1.36160594606e-07, 1.37718982103e-07, 1.39338316679e-07, 1.41025317971e-07, 1.42787873535e-07, 1.44635331499e-07, 1.4657889173e-07, 1.48632138436e-07, 1.50811780719e-07, 1.53138707402e-07, 1.55639532047e-07, 1.58348931426e-07, 1.61313325908e-07, 1.64596952856e-07, 1.68292495203e-07, 1.72541128694e-07, 1.77574279496e-07, 1.83813550477e-07, 1.92166040885e-07, 2.05295471952e-07, 2.22600839893e-07 }; JV_UNUSED static double jvrand_standard_normal (void) /* generate a standard Gaussian random number */ { unsigned long U, sigma, i, j; double x, y; while (1) { U = jvrand_int32 (); i = U & 0x0000007F; sigma = U & 0x00000080; j = U>>8; x = j*wtab[i]; if (j < ktab[i]) break; if (i #include #include #include #include #include #include "fast-dm.h" /********************************************************************** * computation of the KS test statistics (simultaneously for many z) */ struct KS_stat { int N; double *T; /* array of T-values (length N+1) */ double zmin, zmax; /* z-values for T[0] and T[N] */ }; static struct KS_stat * new_KS_stat (int N, double zmin, double zmax) { struct KS_stat *result; result = xnew(struct KS_stat, 1); result->N = N; result->T = xnew(double, N+1); result->zmin = zmin; result->zmax = zmax; return result; } static void delete_KS_stat (struct KS_stat *result) { xfree (result->T); xfree (result); } static double KS_get_z (const struct KS_stat *result, double z) /* Use linear interpolation to get the T-value for a given z. */ { int N = result->N; double dz, ratio; int step_before; dz = (result->zmax - result->zmin) / N; step_before = (z - result->zmin) / dz; if (step_before >= N) step_before = N-1; ratio = (z - (result->zmin + dz*step_before)) / dz; return (1-ratio) * result->T[step_before] + ratio * result->T[step_before+1]; } static struct KS_stat * KS_stat_get (const struct samples *samples, const double *para) /* Compute the KS test statistic (simultaneously for many z) * * The computed test statistic is a measure for the difference between * the empirical distribution given by 'samples' and the theoretical * distribution described by the parameter set 'para'. * * The function returns a 'struct KS_stat' which the caller must free * after use. */ { struct F_calculator *fc; struct KS_stat *result; double p_mid, dp; double *T; int i, j, N; dp = 1.0/(samples->plus_used+samples->minus_used); p_mid = samples->minus_used*dp; fc = F_new (para); N = F_get_N (fc); result = new_KS_stat (N, F_get_z (fc, 0), F_get_z (fc, N)); T = result->T; for (i=0; i<=N; ++i) T[i] = 0; F_start (fc, b_upper); for (j=0; jplus_used; ++j) { const double *F = F_get_F (fc, samples->plus_data[j]); for (i=0; i<=N; ++i) { double p_theo = F[i]; double dist; dist = fabs (p_mid+j*dp-p_theo); if (dist > T[i]) T[i] = dist; dist = fabs (p_mid+(j+1)*dp-p_theo); if (dist > T[i]) T[i] = dist; } } F_start (fc, b_lower); for (j=0; jminus_used; ++j) { const double *F = F_get_F (fc, samples->minus_data[j]); for (i=0; i<=N; ++i) { double p_theo = F[i]; double dist; dist = fabs (p_mid-j*dp-p_theo); if (dist > T[i]) T[i] = dist; dist = fabs (p_mid-(j+1)*dp-p_theo); if (dist > T[i]) T[i] = dist; } } F_delete (fc); return result; } /********************************************************************** * Minimise the KS statistic */ static double check_bounds(const double *para) /* Check whether the parameters 'para' are valid. * * In case of invalid parameters, a value >1 is returned, the * magnitude gives the 'badness' of the violation. If the parameter * set is valid, 0 is returned. */ { double penalty = 0; int bad = 0; if (para[p_sz] < 0) { bad = 1; penalty += -para[p_sz]; } if (para[p_st0] < 0) { bad = 1; penalty += -para[p_st0]; } if (para[p_sv] < 0) { bad = 1; penalty += -para[p_sv]; } if (para[p_a] < para[p_sz]) { bad = 1; penalty += para[p_sz] - para[p_a]; } if (para[p_t0] < 0.5*para[p_st0]) { bad = 1; penalty += 0.5*para[p_st0] - para[p_t0]; } /* avoid problems caused by rounding errors */ return bad ? 1+penalty : 0.0; } static double Q_KS (double lambda) /* Implement equation (14.3.7) from numerical receipes. */ { double c, d, limit, sum; int n, nn; c = 2*lambda*lambda; d = 1/c; limit = d*log(d/(6*0.001)); n = 0; sum = 0; do { n += 1; nn = n*n; sum -= exp(-c*nn); n += 1; nn = n*n; sum += exp(-c*nn); } while (n<6 || nn<=limit); return -2*sum; } static double T_to_p(double T, int n) /* Implement equation (14.3.9) from numerical receipes. */ { double sqrtn = sqrt(n); return Q_KS ((sqrtn + 0.12 + 0.11/sqrtn)*T); } static void find_best_log_p (struct KS_stat *const*result, const struct dataset *ds, const int *z_used, double dist_ret[2], double *ret_z) /* Combine the T-values from 'result' into a common p-value. * * This computes p-values as the product of the probabilities for all * Ts from result and optimises over 'z'. This takes the different * experimental conditions into account. * * On entry 'z_ret' must point to an array of size 'ds->z->used'. * * The distance is returned in 'dist_ret'. If the parameters are * invalid, dist_ret[0]>0 on exit. Otherwise dist_ret[0]=0 and * dist_ret[1] = -log(p). The z-parameter values corresponding to * this (minimal) distance are returned in '*z_ret'. */ { double total_log; double penalty; int k; total_log = 0; penalty = 0; for (k=0; kz->used; k++) { double dz; double best_logp, best_z; double zmin = result[0]->zmin; double zmax = result[0]->zmax; int i, j, n; for (j=1; jsamples_used; ++j) { if (z_used[j]!=k) continue; if (zmin < result[j]->zmin) zmin = result[j]->zmin; if (zmax > result[j]->zmax) zmax = result[j]->zmax; } if (zmax < zmin) { /* no common z is available: abort the * computation and return a penalty value >1. */ ret_z[k] = (zmax+zmin)/2.0; penalty = 1 + (zmin-zmax); break; } /* Use sub-sampling of the interval zmin..zmax * to find the best z. */ n = (zmax - zmin) / 0.0001 + 1.5; dz = (zmax - zmin) / n; best_logp = - DBL_MAX; for (i=0; i<=n; ++i) { double z = zmin + i*dz; double logp = 0; for (j=0; jsamples_used; ++j) { double T; int N; if (z_used[j] != k) continue; if (result[j]->N > 0) { T = KS_get_z (result[j], z); } else { /* no point in interpolating */ T = result[j]->T[0]; } N = ds->samples[j]->plus_used + ds->samples[j]->minus_used; logp += log(T_to_p(T,N)); } if (logp > best_logp) { best_logp = logp; best_z = z; } } total_log += best_logp; ret_z[k] = best_z; } if (penalty > 0) { dist_ret[0] = penalty; dist_ret[1] = 0; } else { dist_ret[0] = 0; dist_ret[1] = - total_log; } } static void find_fixed_log_p (struct KS_stat *const*result, const struct dataset *ds, double dist_ret[2], double z) /* Combine the T-values from 'result' into a common p-value. * * 'z' gives the fixed z-value. * * If the parameters are invalid, dist_ret[0]>0 on exit. Otherwise * dist_ret[0]=0 and dist_ret[1] = -log(p). */ { double logp; double zmin = result[0]->zmin; double zmax = result[0]->zmax; int j; for (j=1; jsamples_used; ++j) { if (zmin < result[j]->zmin) zmin = result[j]->zmin; if (zmax > result[j]->zmax) zmax = result[j]->zmax; } if (z < zmin) { dist_ret[0] = 1 + (zmin-z); dist_ret[1] = 0; } if (z > zmax) { dist_ret[0] = 1 + (z-zmax); dist_ret[1] = 0; } logp = 0; for (j=0; jsamples_used; ++j) { double T; int N; if (result[j]->N > 0) { T = KS_get_z (result[j], z); } else { /* no point in interpolating */ T = result[j]->T[0]; } N = ds->samples[j]->plus_used + ds->samples[j]->minus_used; logp += log(T_to_p(T, N)); } dist_ret[0] = 0; dist_ret[1] = -logp; } static void badness (const struct dataset *ds, const double *x, double dist_ret[2], double *z_ret) /* Get the 'distance' between theoretical and target distribution. * * The target distribution is described by the dataset 'ds', the * theoretical distribution is described by the parameters 'x'. The * correnspondence between entries of 'x' and the model parameters is * encoded in the 'ds->cmds' field. * * If the parameter 'z' is being optimised, 'z_ret' must on entry * point to an array of size 'ds->z->used'. If the parameter 'z' is * fixed, the value 'z_ret' must be 'NULL'. * * If the parameters 'x' are invalid, a positive penalty value is * returned in dist_ret[0]. Otherwise dist_ret[0]=0 and the distance * between empirical and theoretically predicted distribution function * is returned in 'dist_ret[1]' as -log(p). If 'z_ret' is non-null, * the z-parameter values corresponding to this (minimal) distance are * returned in '*z_ret'. */ { struct KS_stat **result; int *z_used; double para[p_count], para_z, penalty; int i, z_idx = -1; result = xnew(struct KS_stat *, ds->samples_used); for (i=0; isamples_used; ++i) result[i] = NULL; z_used = xnew(int, ds->samples_used); penalty = 0; for (i=0; icmds_used; ++i) { int arg1 = ds->cmds[i].arg1; int arg2 = ds->cmds[i].arg2; switch (ds->cmds[i].cmd) { case c_copy_param: if (arg1 >= 0) { para[arg1] = x[arg2]; } else { assert(z_ret); z_idx = arg2; } break; case c_copy_const: if (arg1 >= 0) { para[arg1] = ds->consts[arg2]; } else { assert(! z_ret); para_z = ds->consts[arg2]; } break; case c_run: penalty = check_bounds (para); if (penalty > 0) break; result[arg1] = KS_stat_get (ds->samples[arg1], para); z_used[arg1] = z_idx; break; } if (penalty>0) break; } if (penalty>0) { dist_ret[0] = penalty; dist_ret[1] = 0; } else if (z_ret) { find_best_log_p(result, ds, z_used, dist_ret, z_ret); } else { find_fixed_log_p(result, ds, dist_ret, para_z*para[p_a]); } xfree(z_used); for (i=0; isamples_used; ++i) { if (result[i]) delete_KS_stat (result[i]); } xfree(result); } static void minimiser (const double *x, double res[2], void *data) /* Wrapper to call 'badness' from inside the 'simplex2' function. */ { struct dataset *ds = data; double *z; z = xnew(double, ds->z->used); badness(ds, x, res, z); xfree(z); } static void initialise_parameters (const struct dataset *ds, double *x, double *eps) { double def_x [p_count], def_eps [p_count]; int i; def_x[p_a] = 1; def_eps[p_a] = 0.5; def_x[p_v] = 0; def_eps[p_v] = 1; def_x[p_t0] = 0.3; def_eps[p_t0] = 0.5; def_x[p_sz] = 0.2; def_eps[p_sz] = 0.2; def_x[p_sv] = 0.2; def_eps[p_sv] = 0.2; def_x[p_st0] = 0.15; def_eps[p_st0] = 0.15; for (i=ds->cmds_used-1; i>=0; --i) { int arg1 = ds->cmds[i].arg1; int arg2 = ds->cmds[i].arg2; switch (ds->cmds[i].cmd) { case c_copy_param: if (arg1 < 0) break; x[arg2] = def_x[arg1]; eps[arg2] = def_eps[arg1]; break; case c_run: EZ_par (ds->samples[arg1], def_x+p_a, def_x+p_v, def_x+p_t0); def_x[p_sz] = 0.33*def_x[p_a]; break; default: break; } } } int main (int argc, char **argv) { const char *ex_name = "experiment.ctl"; struct experiment *ex; struct dataset *ds; int N; clock_t start, stop, start_total, stop_total; double cpu_time_used; if (argc == 2) { ex_name = argv[1]; } else if (argc > 2) { fprintf (stderr, "too many arguments\n"); exit (1); } ex = new_experiment (ex_name); if (! ex) { fprintf (stderr, "failed to load experiment control file \"%s\"\n", ex_name); exit (1); } experiment_print (ex); N=0; start_total = clock (); while ((ds = experiment_get_dataset (ex))) { double *x, *eps, dist[2], *z; int i; N++; dataset_print (ds); start = clock (); x = xnew(double, ds->param->used); eps = xnew(double, ds->param->used); set_precision (ds->precision); initialise_parameters (ds, x, eps); simplex2(ds->param->used, eps, 0.05, minimiser, x, dist, ds); if (dist[0] > 0) { printf (" ... penalty %g\n", dist[0]); } else { printf (" ... p = %g\n", exp(-dist[1])); } simplex2(ds->param->used, eps, 0.01, minimiser, x, dist, ds); if (dist[0] > 0) { printf (" ... penalty %g\n", dist[0]); } else { printf (" ... p = %g\n", exp(-dist[1])); } simplex2(ds->param->used, eps, 0.001, minimiser, x, dist, ds); if (dist[0] > 0) { printf (" ... penalty %g\n", dist[0]); } else { printf (" ... p = %g\n", exp(-dist[1])); } stop = clock (); cpu_time_used = (double)(stop - start) / CLOCKS_PER_SEC; if (ds->z->used > 0) z = xnew(double, ds->z->used); else z = NULL; badness (ds, x, dist, z); for (i=0; iz->used; ++i) { printf (" -> %s = %f\n", ds->z->entry[i], z[i]); } for (i=0; iparam->used; ++i) { printf (" -> %s = %f\n", ds->param->entry[i], x[i]); } dataset_save_result(ds, x, z, exp(-dist[1]), cpu_time_used); experiment_log(ex, ds, x, z, exp(-dist[1]), cpu_time_used); delete_dataset(ds); xfree(x); xfree(z); xfree(eps); } stop_total = clock (); cpu_time_used = (double)(stop_total - start_total) / CLOCKS_PER_SEC; printf ("%d dataset%s processed, total CPU time used: %.1fs\n", N, N==1?"":"s", cpu_time_used); delete_experiment (ex); return 0; } /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/EZ-diff.c0000644000175000017500000000560110511761337011155 00000000000000/* EZ-diff.c - estimate some parameters using the EZ-model * * This implements the EZ-model of Wagenmakers, E.-J., van der Maas, * H. L. J., & Grasman, R. P. P. P. (2006) * * Copyright (C) 2006 Jochen Voss, Andreas Voss. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #include #include #include "fast-dm.h" int sign(double value) { return (value >= 0) ? 1 : -1; } double logit(double value) { return log(value / (1 - value)); } int make_stat(const struct samples *data, double *mean, double *var, double *pc) { double sum = 0; int i; if (data->plus_used+data->minus_used <= 0) return -1; for (i = 0; i < data->plus_used; i++) sum += data->plus_data[i]; for (i = 0; i < data->minus_used; i++) sum += data->minus_data[i]; *mean = sum / (data->plus_used+data->minus_used); sum = 0; for (i = 0; i < data->plus_used; i++) sum += (data->plus_data[i]-*mean)*(data->plus_data[i]-*mean); for (i = 0; i < data->minus_used; i++) sum += (data->minus_data[i]-*mean)*(data->minus_data[i]-*mean); *var = sum / (data->plus_used+data->minus_used); *pc = (double)data->plus_used / (data->plus_used+data->minus_used); return 1; } int EZ_par(const struct samples *data, double *a, double *v, double *t0) /* Calculate estimates for some parameters of the diffusion modell. * * Based on the mean and variance of the reaction times and the * percentage of "correct" responses (i.e. of 'plus_data'), estimates * for the threshold separation (a), the drift (v), and the * response-time constant (t0) are calculated. The algorithm is * derived from Wagenmakers et al. (2006). */ { double RT_mean, RT_var, PC, L; if (make_stat(data, &RT_mean, &RT_var, &PC) < 0) return -1; if ((PC>0) && (PC<1)) L = logit(PC); else if (PC==0) L =logit(PC + 1.0/(data->minus_used+data->plus_used)); else if (PC==1) L =logit(PC - 1.0/(data->minus_used+data->plus_used)); *v = sign(PC-0.5) * pow(L*(PC*PC*L-PC*L+PC-0.5) / RT_var, 0.25); if (fabs(PC-0.5) > 1e-4) { *a = L / *v; *t0 = RT_mean - (((*a)/(2*(*v)))*(1-exp(-(*v)*(*a))) / (1+exp(-(*v)*(*a)))); } else { *a = pow (24 * RT_var, 0.25); *t0 = RT_mean - 0.25*(*a)*(*a); } return 1; } /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/simplex2.c0000644000175000017500000001451410553673135011503 00000000000000/* simplex2.c - downhill simplex method of Nelder and Mead * (2 valued objective function, lexicographical order) * * Copyright (C) 2006 Jochen Voss, Andreas Voss. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #include #include #include #include #include "fast-dm.h" /* The following parameters refer to the description of the method in * Jeffrey C. Lagarias, James A. Reeds, Margaret H. Wright, and Paul * E. Wright: Convergence Properties of the Nelder-Mead Simplex Method * In Low Dimensions. SIAM J. Optim, Vol. 9 (1998), No. 1, * pp. 112-147. * * http://citeseer.ist.psu.edu/3996.html */ #define RHO 1.0 /* reflection */ #define CHI 2.0 /* expansion */ #define GAMMA 0.5 /* contraction */ #define SIGMA 0.5 /* shrink */ static void move_point(int n, double p, const double *x, const double *y, double *z) /* Move a point in direction of another point. * x, y and z must be vectors of length n. * The function reads x and y and stores x + p*(y-x) in z. * For p=2 this calculates the reflection of x at y. */ { int i; for (i=0; idb[0]) return +1; if (da[1]db[1]) return +1; return 0; } void simplex2(int n, const double *eps, double size_limit, void (*fn)(const double *x, double res[2], void *data), double *x, double *fn_ret, void *data) /* Multidimensional minimisation of the function 'fn' using the * downhill simplex algorithm of Nelder and Mead. This version of the * function uses a two-valued objective function. * * 'fn' is the function to minimise. The first argument of 'fn' is a * vector x which consists of 'n' doubles. With the 'data' pointer * additional information may be forwarded to 'fn'. On input the * vector 'x' defines one vertex of the starting simplex. For the * other vertices, one of the n components of x is incremented by the * according value of 'eps'. 'size_limit' defines the precision of * the search. The algorithm is terminated as soon as all edges of * the simplex are smaller than 'size_limit'. * * On return the vector 'x' contains the best found solution, that * is, the parameters with the smallest result of 'fn'. If 'fn_ret' * is not NULL, the result of 'fn' applied to 'x' is copied into this * vector. */ { double *points; double *mid, *tmp1, *tmp2; int i, j, k; assert (n >= 2); /* Allocate an array for the vertices of the simplex. Vertex * k is stored in entries k*(n+2)+2, ..., k*(n+2)+n+1, the * function value at this vertex is stored in entries k*(n+2) * and k*(n+2)+1. Vertices are stored in order of increasing * function values. */ points = xnew(double, (n+1)*(n+2)); mid = xnew(double, n+2); tmp1 = xnew(double, n+2); tmp2 = xnew(double, n+2); /* initialise the simplex */ for (j=0; j<=n; ++j) { for (i=0; i max) { max = x; } } if (max-min > size) size = max-min; if (size > size_limit) break; } if (size < size_limit) break; /* calculate the reflection point */ for (i=2; i<=n+1; ++i) mid[i] = points[i]; for (j=1; j #include #include #include "fast-dm.h" /********************************************************************** * auxiliary functions */ static int string_to_int (const char *str, long int *res) /* return 1 on success and 0 on error */ { char *tail; long int x; x = strtol (str, &tail, 0); if (tail == str) return 0; if (*tail != '\0') return 0; *res = x; return 1; } static int string_to_double (const char *str, double *res) /* return 1 on success and 0 on error */ { char *tail; double x; x = strtod (str, &tail); if (tail == str) return 0; if (*tail != '\0') return 0; *res = x; return 1; } static void check_templates (const char *load_template, const char *save_template) { int has_load_star, has_save_star; if (! save_template) return; has_load_star = (strchr(load_template, '*') != NULL); has_save_star = (strchr(save_template, '*') != NULL); if (has_load_star && has_save_star) return; if (has_load_star && ! save_template) return; if (! has_load_star && ! has_save_star) return; fprintf (stderr, "incompatible templates '%s' and '%s', aborting\n", load_template, save_template); exit(1); } static void str_add (char **s1, const char *s2, int *used, int *alloc) { int l = strlen(s2); if (*used+l+1 >= *alloc) { *alloc += 64; *s1 = xrenew(char, *s1, *alloc); } memcpy (*s1+*used, s2, l); *used += l; (*s1)[*used] = '\0'; } /********************************************************************** * information about one experiment */ struct param_info { const char *name; int idx; struct set *depends; char *value; }; static const struct param_info default_params[] = { { "a", p_a, NULL, NULL}, { "z", -1, NULL, NULL}, { "v", p_v, NULL, NULL}, { "t0", p_t0, NULL, NULL}, { "sz", p_sz, NULL, NULL}, { "sv", p_sv, NULL, NULL}, { "st0", p_st0, NULL, NULL}, { NULL, 0, NULL, NULL} }; struct experiment { char *fname; /* precision for computing the CDF */ double precision; /* model parameters */ struct param_info *params; /* experimental conditions */ struct set *cond; /* data files */ char *data_template; struct array *files; int current_file; /* data file fields */ int nf; struct fi { enum fi_type { t_time, t_response, t_ignore, t_cond } type; int cond_idx; } *fi; /* per data-set log files */ char *save_template; /* common log file */ char *log_file_name; struct array *log_fields; }; struct experiment * new_experiment (const char *fname) /* Read information for a new experiment from the input file 'fname' * and return it as a structure. The format of experiment control * files is described in the users' guide (file "MANUAL" of the source * code distribution) */ { struct file *file; struct experiment *ex; struct param_info *params; const char *const *tokens; int depends_seen = 0; int format_seen = 0; int i, j, n; file = new_file (fname); if (!file) return NULL; ex = xnew(struct experiment, 1); ex->fname = xstrdup(fname); ex->precision = 3; ex->params = params = xmalloc(sizeof (default_params)); memcpy (params, default_params, sizeof (default_params)); for (i = 0; params[i].name; ++i) { params[i].depends = new_set (); } ex->cond = new_set(); ex->data_template = NULL; ex->save_template = NULL; ex->log_file_name = NULL; ex->log_fields = NULL; while (file_read (file, &tokens, &n)) { if (strcmp (tokens[0], "set") == 0) { if (depends_seen) file_error (file, "'set' after 'depends'"); if (n != 3) file_error (file, "syntax error"); for (i = 0; params[i].name; ++i) { if (strcmp (params[i].name, tokens[1]) == 0) break; } if (!params[i].name) file_error (file, "invalid parameter '%s'", tokens[1]); if (params[i].value) file_error (file, "parameter '%s' set twice", tokens[1]); params[i].value = xstrdup(tokens[2]); } else if (strcmp (tokens[0], "depends") == 0) { if (format_seen) file_error (file, "'depends' after 'format'"); if (n < 3) file_error (file, "not enough arguments"); for (i = 0; params[i].name; ++i) { if (strcmp (params[i].name, tokens[1]) == 0) break; } if (!params[i].name) file_error (file, "invalid parameter '%s'", tokens[1]); if (params[i].value) file_error (file, "parameter '%s' already set", tokens[1]); for (j = 2; j < n; ++j) { if (strcmp(tokens[j],"RESPONSE") == 0 || strcmp(tokens[j],"TIME") == 0 || strcmp(tokens[j],"*") == 0) { file_error (file, "invalid condition '%s'", tokens[j]); } set_item (params[i].depends, tokens[j], 1); set_item (ex->cond, tokens[j], 1); } } else if (strcmp (tokens[0], "format") == 0) { struct set *seen = new_set (); if (ex->data_template) file_error (file, "'format' after 'load'"); if (format_seen) file_error (file, "more than one 'format'"); format_seen = 1; ex->nf = n-1; ex->fi = xnew(struct fi, ex->nf); for (i = 1; i < n; ++i) { const char *field = tokens[i]; enum fi_type ft = t_ignore; j = set_item (ex->cond, field, 0); if (strcmp (field, "TIME") == 0) { ft = t_time; } else if (strcmp (field, "RESPONSE") == 0) { ft = t_response; } else if (j>=0) { ft = t_cond; } ex->fi[i-1].type = ft; if (ft == t_ignore) continue; if (set_item (seen, field, 0) >= 0) file_error (file, "duplicate field %s", field); set_item (seen, field, 1); if (ft == t_cond) ex->fi[i-1].cond_idx = j; } if (set_item (seen, "TIME", 0) < 0) file_error (file, "missing field 'TIME'"); if (set_item (seen, "RESPONSE", 0) < 0) file_error (file, "missing field 'RESPONSE'"); for (i=0; icond->used; ++i) { if (set_item (seen, ex->cond->item[i], 0) < 0) file_error (file, "unknown condition '%s'", ex->cond->item[i]); } delete_set (seen); } else if (strcmp (tokens[0], "load") == 0) { if (! format_seen) file_error (file, "data format not specified"); if (ex->data_template) file_error (file, "more than one 'load'"); if (n != 2) file_error (file, "wrong number of arguments"); ex->data_template = xstrdup(tokens[1]); } else if (strcmp (tokens[0], "save") == 0) { if (n != 2) file_error (file, "wrong number of arguments"); ex->save_template = xstrdup(tokens[1]); } else if (strcmp (tokens[0], "log") == 0) { if (n != 2) file_error (file, "wrong number of arguments"); ex->log_file_name = xstrdup(tokens[1]); } else if (strcmp (tokens[0], "precision") == 0) { if (n != 2) file_error (file, "wrong number of arguments"); if (! string_to_double (tokens[1], &ex->precision) || ex->precision < 1) file_error (file, "invalid precision '%s'", tokens[1]); } else { file_error (file, "unknown command '%s'", tokens[0]); } } if (! ex->data_template) file_error (file, "missing 'load'"); if (! (ex->save_template || ex->log_file_name)) { file_error (file, "missing 'save' or 'log'"); } check_templates (ex->data_template, ex->save_template); ex->files = file_names_find(ex->data_template); ex->current_file = -1; delete_file (file); return ex; } void delete_experiment (struct experiment *ex) { int i; if (ex->log_fields) delete_array(ex->log_fields); xfree(ex->log_file_name); xfree(ex->save_template); xfree(ex->fi); delete_array(ex->files); xfree(ex->data_template); delete_set(ex->cond); for (i = 0; ex->params[i].name; ++i) { delete_set(ex->params[i].depends); xfree(ex->params[i].value); } xfree(ex->params); xfree(ex->fname); xfree(ex); } void experiment_print (const struct experiment *ex) /* Print all information about the experiment "ex" to stdout. * * In detail, the names and the format of the data files are printed. * Additionally, it is specified for each parameter of the diffusion * model whether it is being optimised, or whether it is fixed to a * given value, and--where necessary--on which condition-variables of * the data file it depends. */ { int i, j, first; printf ("experiment %s (%d data sets):\n", ex->fname, ex->files->used); printf (" precision: %g\n", ex->precision); printf (" format of \"%s\":", ex->data_template); for (i=0; inf; ++i) { switch (ex->fi[i].type) { case t_time: printf (" TIME"); break; case t_response: printf (" RESPONSE"); break; case t_ignore: printf (" *"); break; case t_cond: printf (" %s", ex->cond->item[ex->fi[i].cond_idx]); break; } } putchar ('\n'); first = 1; for (i=0; ex->params[i].name; ++i) { if (ex->params[i].value) continue; if (first) { printf (" optimised parameters: "); first = 0; } else { printf (", "); } printf ("%s", ex->params[i].name); for (j=0; jparams[i].depends->used; ++j) { printf ("_%s",ex->params[i].depends->item[j]); } } if (! first) putchar ('\n'); first = 1; for (i=0; ex->params[i].name; ++i) { if (! ex->params[i].value) continue; if (first) { printf (" fixed parameters: "); first = 0; } else { printf (", "); } printf ("%s=%s", ex->params[i].name, ex->params[i].value); } if (! first) putchar ('\n'); } static char * experiment_get_data_name(const struct experiment *ex) { const char *key; key = ex->files->entry[ex->current_file]; return file_names_replace_star(ex->data_template, key); } static char * experiment_get_save_name(const struct experiment *ex) { const char *key = ex->files->entry[ex->current_file]; if (! ex->save_template) return 0; return file_names_replace_star(ex->save_template, key); } static struct file * experiment_open_dataset(struct experiment *ex) { char *fname; struct file *file; retry: ex->current_file += 1; if (ex->current_file >= ex->files->used) return NULL; fname = experiment_get_data_name(ex); file = new_file (fname); if (! file) { fprintf(stderr, "warning: failed to open file %s\n", fname); xfree(fname); goto retry; } xfree(fname); return file; } static void dataset_init_param (struct dataset *ds, struct param_info *param, const struct dict *condv) /* Add the necessary commands to 'ds' to initalise parameter 'param'. * * The dictionary 'condv' maps parameter names to experimental conditions * where required. */ { int name_used, name_alloc; char *name; int j; name_alloc = 64; name = xnew(char, name_alloc); name_used = 0; *name = '\0'; str_add (&name, param->name, &name_used, &name_alloc); for (j=0; jdepends->used; ++j) { const char *cv; cv = dict_lookup (condv, param->depends->item[j]); str_add (&name, "_", &name_used, &name_alloc); str_add (&name, cv, &name_used, &name_alloc); } if (param->value) { double x; if (! string_to_double (param->value, &x)) { fprintf (stderr, "invalid value '%s' for '%s'\n", param->value, name); exit (1); } dataset_add_cmd (ds, c_copy_const, param->idx, dataset_add_const (ds, x)); } else { if (param->idx >= 0) { dataset_add_cmd (ds, c_copy_param, param->idx, dataset_add_param (ds, name)); } else { dataset_add_cmd (ds, c_copy_param, param->idx, dataset_add_z (ds, name)); } } xfree(name); } struct dataset * experiment_get_dataset (struct experiment *ex) /* Read the next dataset. * * The returned data-set structure contains the parameters to be * optimised ('param'), values for the parameters fixed to a given * constant ('consts'), and arrays of responses and reaction times * ('samples'). If different experimental conditions are defined for * the experiment, different samples are allocated within the returned * structure. If the data file does not fit the format specified in * 'ex', an error message is printed to stderr and the next valid file * is returned instead. */ { struct dataset *ds; struct file *file; const char *key; const char *const* words; struct dict *condv; int sample_name_used, sample_name_alloc; char *sample_name; int needs_retry = 0; int i, n; retry: file = experiment_open_dataset (ex); if (! file) return NULL; ds = new_dataset (); ds->fname = xstrdup(file_name (file)); ds->logname = experiment_get_save_name (ex); key = ex->files->entry[ex->current_file]; ds->key = xstrdup(*key ? key : ds->fname); ds->precision = ex->precision; condv = new_dict (); sample_name_alloc = 80; sample_name = xnew(char, sample_name_alloc); sample_name_used = 1; sample_name[0] = '\0'; while (file_read (file, &words, &n)) { struct samples *samples; double t; long int resp; int idx; /* analyse a line from the data file */ if (n != ex->nf) { file_message (file, "wrong number of fields"); needs_retry = 1; goto abort; } dict_clear (condv); for (i=0; ifi[i].type) { case t_time: if (! string_to_double(words[i], &t)) { file_message (file, "invalid number '%s'", words[i]); needs_retry = 1; goto abort; } break; case t_response: if (! string_to_int(words[i], &resp) || (resp != 0 && resp != 1)) { file_message (file, "invalid response '%s'", words[i]); needs_retry = 1; goto abort; } break; case t_ignore: break; case t_cond: idx = ex->fi[i].cond_idx; dict_add (condv, ex->cond->item[idx], words[i]); break; } } /* get the sample set name */ sample_name_used = 0; sample_name[0] = '\0'; str_add (&sample_name, ds->fname, &sample_name_used, &sample_name_alloc); for (i=0; icond->used; ++i) { const char *val; val = dict_lookup (condv, ex->cond->item[i]); str_add (&sample_name, "_", &sample_name_used, &sample_name_alloc); str_add (&sample_name, val, &sample_name_used, &sample_name_alloc); } /* create new sample sets as needed */ idx = dataset_samples_idx (ds, sample_name, 0); if (idx < 0) { idx = dataset_samples_idx (ds, sample_name, 1); for (i=0; ex->params[i].name; ++i) { dataset_init_param (ds, ex->params+i, condv); } dataset_add_cmd (ds, c_run, idx, 0); } samples = ds->samples[idx]; /* register the sample data */ samples_add_sample (samples, t, resp); } abort: delete_file(file); xfree(sample_name); delete_dict(condv); if (needs_retry) { needs_retry = 0; delete_dataset(ds); goto retry; } for (i=0; isamples_used; ++i) samples_sort (ds->samples[i]); return ds; } static int file_find_headers (char *fname, struct array *fields) /* Search through the file 'fname' for the last header line. * * The header fields are stored in the array 'fields'. * * Return '-1' if the file does not exist, '0' if no (correct) header is * found, and '1', if everything is ok. */ { struct file *save; const char *const* words; int n, found; if (!(save = new_file(fname))) return -1; found = 0; while (file_read (save, &words, &n)) { int i; if (strcmp(words[0], "dataset") != 0 || n<2) continue; found = 1; array_clear (fields); for (i=0; iz->used; ++i){ array_append(fields, ds->z->entry[i]); } for (i=0; iparam->used; ++i) { array_append(fields, ds->param->entry[i]); } array_append(fields, "p"); array_append(fields, "time"); } static int dataset_get_value (const struct dataset *ds, const char *name, const double *param, const double *z, double p, double time, double *value_ret) { int i; if (strcmp(name, "p") == 0) { *value_ret = p; return 1; } else if (strcmp(name, "time") ==0 ) { *value_ret = time; return 1; } for (i=0; iparam->used; i++) { if (strcmp(name, ds->param->entry[i])==0) { *value_ret = param[i]; return 1; } } for (i=0; iz->used; i++) { if (strcmp(name, ds->z->entry[i])==0) { *value_ret = z[i]; return 1; } } return 0; } void experiment_log (struct experiment *ex, const struct dataset *ds, double *values, double *z, double p, double time) /* Save the results of the parameter estimation to the global log file. * * If 'ex->log_file_name' is defined, values for all Parameters are * appended to the output file. */ { struct array *fields; int needs_header_check = 1; int needs_header_line = 0; FILE *fd; double value; int i; if (! ex->log_file_name) return; if (! ex->log_fields) { ex->log_fields = new_array(); if (! file_find_headers(ex->log_file_name, ex->log_fields)) { dataset_default_headers (ds, ex->log_fields); needs_header_check = 0; needs_header_line = 1; } } fields = ex->log_fields; if (needs_header_check) { int bad_header = 0; struct array *target; target = new_array (); dataset_default_headers (ds, target); for (i=0; iused; ++i) { if (array_find(fields,target->entry[i]) == -1) { bad_header = 1; break; } } if (bad_header) { delete_array (ex->log_fields); ex->log_fields = target; fields = target; needs_header_line = 1; } else { delete_array (target); } } fd = fopen (ex->log_file_name, "a"); if (! fd) { fprintf(stderr, "error: cannot open log file %s\n", ex->log_file_name); exit(1); } if (needs_header_line) { int i; for (i=0; iused; ++i) fprintf (fd, " %7s", fields->entry[i]); fputc ('\n', fd); } for (i=0; iused; i++) { if (strcmp(fields->entry[i], "dataset") == 0) { fprintf (fd, " %7s", ds->key); } else { int found; found = dataset_get_value (ds, fields->entry[i], values, z, p, time, &value); if (found) fprintf (fd, " %7.3f", value); else fprintf (fd, " %7s", "-"); } } fputc ('\n', fd); fclose (fd); } /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/dataset.c0000644000175000017500000002052110527156664011364 00000000000000/* dataset.c - represent all the data for one run of the experiment * * Copyright (C) 2006 Jochen Voss, Andreas Voss. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #include #include #include #include "fast-dm.h" /********************************************************************** * auxiliary functions */ static int compare_doubles (const void *a, const void *b) { const double *da = a; const double *db = b; if (*da < *db) return -1; if (*da > *db) return 1; return 0; } static void str_add (char **s1, const char *s2, int *used, int *alloc) { int l = strlen(s2); if (*used+l+1 >= *alloc) { *alloc += 64; *s1 = xrenew(char, *s1, *alloc); } memcpy (*s1+*used, s2, l); *used += l; (*s1)[*used] = '\0'; } /********************************************************************** * samples */ struct samples * new_samples (void) { struct samples *samples; samples = xnew(struct samples, 1); samples->plus_alloc = samples->minus_alloc = 32; samples->plus_data = xnew(double, samples->plus_alloc); samples->minus_data = xnew(double, samples->minus_alloc); samples->plus_used = samples->minus_used = 0; return samples; } void delete_samples (struct samples *s) { xfree(s->plus_data); xfree(s->minus_data); xfree(s); } void samples_add_sample (struct samples *samples, double t, int response) { if (response) { if (samples->plus_used >= samples->plus_alloc) { samples->plus_alloc += 32; samples->plus_data = xrenew(double, samples->plus_data, samples->plus_alloc); } samples->plus_data [samples->plus_used++] = t; } else { if (samples->minus_used >= samples->minus_alloc) { samples->minus_alloc += 32; samples->minus_data = xrenew(double, samples->minus_data, samples->minus_alloc); } samples->minus_data [samples->minus_used++] = t; } } void samples_sort (struct samples *samples) { qsort (samples->plus_data, samples->plus_used, sizeof(double), compare_doubles); qsort (samples->minus_data, samples->minus_used, sizeof(double), compare_doubles); } /********************************************************************** * datasets */ struct dataset * new_dataset (void) { struct dataset *ds; ds = xnew(struct dataset, 1); ds->fname = NULL; ds->logname = NULL; ds->key = NULL; ds->precision = -1; ds->cmds_used = 0; ds->cmds_alloc = 16; ds->cmds = xnew(struct cmds, ds->cmds_alloc); ds->param = new_array(); ds->z = new_array(); ds->consts_used = 0; ds->consts_alloc = 8; ds->consts = xnew(double, ds->consts_alloc); ds->samples_used = 0; ds->samples_alloc = 8; ds->samples = xnew(struct samples *, ds->samples_alloc); ds->samples_name = xnew(char *, ds->samples_alloc); return ds; } void delete_dataset (struct dataset *ds) { int i; for (i=0; isamples_used; ++i) { xfree(ds->samples_name[i]); delete_samples (ds->samples[i]); } xfree(ds->samples_name); xfree(ds->samples); xfree(ds->consts); delete_array (ds->z); delete_array (ds->param); xfree(ds->cmds); xfree(ds->key); xfree(ds->logname); xfree(ds->fname); xfree(ds); } void dataset_print (const struct dataset *ds) /* Print details of the data set to stdout. * * Parameters are indexed for each experimental condition and sample * sizes per result RESULT (i.e., per response) are given for each * experimental condition. */ { char buffer[64]; int pused, palloc; char *pstr; int i; pused = 0; palloc = 80; pstr = xnew (char, palloc); *pstr = '\0'; printf ("dataset %s:\n", ds->fname); for (i=0; icmds_used; ++i) { int arg1 = ds->cmds[i].arg1; int arg2 = ds->cmds[i].arg2; switch (ds->cmds[i].cmd) { case c_copy_param: if (*pstr) str_add (&pstr, ", ", &pused, &palloc); if (arg1>=0) str_add (&pstr, ds->param->entry[arg2], &pused, &palloc); else str_add (&pstr, ds->z->entry[arg2], &pused, &palloc); break; case c_copy_const: snprintf (buffer, 64, "%g", ds->consts[arg2]); if (*pstr) str_add (&pstr, ", ", &pused, &palloc); str_add (&pstr, buffer, &pused, &palloc); break; case c_run: printf (" %s (%d+%d samples)\n", pstr, ds->samples[arg1]->plus_used, ds->samples[arg1]->minus_used); pused = 0; *pstr = '\0'; break; } } xfree (pstr); } void dataset_print_commands (const struct dataset *ds) { const char *pname[p_count]; int i; pname[p_a] = "a"; pname[p_v] = "v"; pname[p_t0] = "t0"; pname[p_sz] = "sz"; pname[p_sv] = "sv"; pname[p_st0] = "st0"; for (i=0; icmds_used; ++i) { int arg1 = ds->cmds[i].arg1; int arg2 = ds->cmds[i].arg2; switch (ds->cmds[i].cmd) { case c_copy_param: if (arg1 >= 0) { printf (" c%d: use %s as %s\n", i, ds->param->entry[arg2], pname[arg1]); } else { printf (" c%d: use %s as z\n", i, ds->z->entry[arg2]); } break; case c_copy_const: if (arg1 >= 0) { printf (" c%d: use %g as %s\n", i, ds->consts[arg2], pname[arg1]); } else { printf (" c%d: use %g*a as z\n", i, ds->consts[arg2]); } break; case c_run: printf (" c%d: analyse sample %s\n", i, ds->samples_name[arg1]); break; } } } int dataset_samples_idx (struct dataset *ds, const char *name, int add) /* find and add sample sets */ { int i; for (i=0; isamples_used; ++i) { if (strcmp (ds->samples_name[i], name) == 0) return i; } if (! add) return -1; if (ds->samples_used >= ds->samples_alloc) { ds->samples_alloc += 8; ds->samples = xrenew(struct samples *, ds->samples, ds->samples_alloc); ds->samples_name = xrenew(char *, ds->samples_name, ds->samples_alloc); } ds->samples[ds->samples_used] = new_samples (); ds->samples_name[ds->samples_used] = xstrdup(name); return ds->samples_used++; } int dataset_add_const (struct dataset *ds, double x) { int i; for (i=0; iconsts_used; ++i) { if (ds->consts[i] == x) return i; } if (ds->consts_used >= ds->consts_alloc) { ds->consts_alloc += 8; ds->consts = xrenew(double, ds->consts, ds->consts_alloc); } ds->consts[ds->consts_used] = x; return ds->consts_used++; } int dataset_add_param (struct dataset *ds, const char *name) { int i; for (i=0; iparam->used; ++i) { if (strcmp (ds->param->entry[i], name) == 0) return i; } if (ds->param->used >= ds->param->alloc) { ds->param->alloc += 16; ds->param->entry = xrenew(char *, ds->param->entry, ds->param->alloc); } ds->param->entry[ds->param->used] = xstrdup(name); return ds->param->used++; } int dataset_add_z (struct dataset *ds, const char *name) { int i; for (i=0; iz->used; ++i) { if (strcmp (ds->z->entry[i], name) == 0) return i; } if (ds->z->used >= ds->z->alloc) { ds->z->alloc += 4; ds->z->entry = xrenew(char *, ds->z->entry, ds->z->alloc); } ds->z->entry[ds->z->used] = xstrdup(name); return ds->z->used++; } void dataset_add_cmd (struct dataset *ds, enum cmd cmd, int arg1, int arg2) { if (ds->cmds_used >= ds->cmds_alloc) { ds->cmds_alloc += 16; ds->cmds = xrenew(struct cmds, ds->cmds, ds->cmds_alloc); } ds->cmds[ds->cmds_used].cmd = cmd; ds->cmds[ds->cmds_used].arg1 = arg1; ds->cmds[ds->cmds_used].arg2 = arg2; ds->cmds_used++; } void dataset_save_result (const struct dataset *ds, const double *x, const double *z, double p, double time) { FILE *fd; int i; if (! ds->logname) return; fd = fopen (ds->logname, "w"); for (i=0; iz->used; ++i) fprintf (fd, "%s = %f\n", ds->z->entry[i], z[i]); for (i=0; iparam->used; ++i) fprintf (fd, "%s = %f\n", ds->param->entry[i], x[i]); fprintf (fd, "precision = %f\n", ds->precision); fprintf (fd, "p = %f\n", p); fprintf (fd, "time = %f\n", time); fclose (fd); } /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/container.c0000644000175000017500000001135310524405576011720 00000000000000/* container.c - container data types for storing strings * * Copyright (C) 2006 Jochen Voss, Andreas Voss. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #include #include #include "fast-dm.h" /********************************************************************** * sets of strings (use only for small sets) */ struct set * new_set (void) { struct set *set; set = xnew(struct set, 1); set->used = 0; set->alloc = 8; set->item = xnew(char *, set->alloc); return set; } void delete_set (struct set *set) { int i; for (i = 0; i < set->used; ++i) { xfree(set->item[i]); } xfree(set->item); xfree(set); } int set_item (struct set *set, const char *item, int add) /* Test whether 'set' contains 'item' and conditionally add 'item'. * * This function tests whether a string equal to 'item' is already * contained in 'set'. If this is the case, the index of the * corresponding entry in set is returned. Otherwise it 'add' is * true, a copy of 'item' is added to 'set' and the index of the newly * added element is returned. Otherwise -1 is returned. */ { int i; for (i = 0; i < set->used; ++i) { if (strcmp (set->item[i], item) == 0) return i; } if (! add) return -1; if (set->used >= set->alloc) { set->alloc += 8; set->item = xrenew (char *, set->item, set->alloc); } set->item[set->used] = xstrdup (item); return set->used++; } /********************************************************************** * dictionaries of strings (use only for small dictionaries) */ struct dict { int used, alloc; char **keys; char **values; }; struct dict * new_dict (void) { struct dict *dict; dict = xnew(struct dict, 1); dict->used = 0; dict->alloc = 8; dict->keys = xnew(char *, dict->alloc); dict->values = xnew(char *, dict->alloc); return dict; } void dict_clear (struct dict *dict) { int i; for (i = 0; i < dict->used; ++i) { xfree(dict->keys[i]); xfree(dict->values[i]); } dict->used = 0; } void delete_dict (struct dict *dict) { dict_clear (dict); xfree(dict->keys); xfree(dict->values); xfree(dict); } void dict_add (struct dict *dict, const char *key, const char *value) { int i; for (i = 0; i < dict->used; ++i) { if (strcmp (dict->keys[i], key) == 0) { xfree(dict->values[i]); dict->values[i] = xstrdup(value); return; } } if (dict->used >= dict->alloc) { dict->alloc += 8; dict->keys = xrenew (char *, dict->keys, dict->alloc); dict->values = xrenew (char *, dict->values, dict->alloc); } dict->keys[dict->used] = xstrdup (key); dict->values[dict->used] = xstrdup (value); dict->used++; } const char * dict_lookup (const struct dict *dict, const char *key) { int i; for (i = 0; i < dict->used; ++i) { if (strcmp (dict->keys[i], key) == 0) { return dict->values[i]; } } return NULL; } /********************************************************************** * arrays of strings */ struct array * new_array (void) { struct array *array; array = xnew(struct array, 1); array->used = 0; array->alloc = 16; array->entry = xnew(char *, array->alloc); return array; } void delete_array (struct array *array) { int i; for (i=0; iused; ++i) xfree(array->entry[i]); xfree(array->entry); xfree(array); } void array_clear (struct array *array) { int i; for (i=0; iused; ++i) xfree(array->entry[i]); array->used = 0; } int array_find (struct array *array, const char *str) { int i; for (i = 0; i < array->used; ++i) { if (strcmp (array->entry[i], str) == 0) return i; } return -1; } void array_append (struct array *array, const char *str) { if (array->used >= array->alloc) { array->alloc += 16; array->entry = xrenew(char *, array->entry, array->alloc); } array->entry[array->used] = xstrdup(str); array->used += 1; } static int compare_strings (const void *a, const void *b) { const char *aa = *(const char **)a; const char *bb = *(const char **)b; return strcmp(aa, bb); } void array_sort (struct array *array) { qsort(array->entry, array->used, sizeof(const char *), compare_strings); } /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/file.c0000644000175000017500000002057610553126065010657 00000000000000/* file.c - handle control and data files * * Copyright (C) 2006 Jochen Voss, Andreas Voss. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #include #include #include #include #include #include #ifndef _WIN32 #include #include #define PATH_SEP '/' #else #include "win32dir.h" #define PATH_SEP '\\' #endif #include "fast-dm.h" /********************************************************************** * handle file names */ struct array * file_names_find (const char *pattern) { const char *ptr, *star; char *path, *pre, *post; size_t pre_len, post_len; struct array *keys; /* find the path for 'pattern' */ ptr = strrchr(pattern, PATH_SEP); if (ptr) { path = xstrndup(pattern, ptr-pattern); pattern = ptr+1; } else { path = xstrdup("."); } /* find the globbing character "*" */ star = NULL; for (ptr=pattern; *ptr; ++ptr) { if (*ptr != '*') continue; if (star) { fprintf(stderr, "error: invalid pattern \"%s\"\n", pattern); exit(0); } star = ptr; } if (star) { pre = xstrndup(pattern, star-pattern); post = xstrndup(star+1, ptr-star-1); } else { pre = xstrdup(pattern); post = xstrdup(""); } pre_len = strlen(pre); post_len = strlen(post); keys = new_array(); if (star) { DIR *dp; struct dirent *ep; dp = opendir(path); if (!dp) { perror("opendir failed"); exit(1); } while ((ep = readdir(dp))) { const char *fname = ep->d_name; size_t fname_len = strlen(fname); char *key; if (strncmp(fname,pre,pre_len) != 0) continue; if (strcmp(fname+fname_len-post_len,post) != 0) continue; key = xstrndup(fname+pre_len, fname_len-pre_len-post_len); array_append(keys, key); xfree(key); } closedir (dp); } else { array_append(keys, ""); } array_sort(keys); xfree(post); xfree(pre); xfree(path); return keys; } char * file_names_replace_star(const char *template, const char *key) { const char *ptr; size_t template_len, pre_len; char *res; ptr = strchr(template, '*'); if (! ptr) return xstrdup(template); template_len = strlen(template); pre_len = ptr-template; res = xnew(char, template_len-1+strlen(key)+1); res[0] = '\0'; strncat(res, template, pre_len); strcat(res, key); strcat(res, ptr+1); return res; } /********************************************************************** * handle file contents */ struct file { FILE *fd; char *fname; int line_no; int line_used, line_alloc; char *line; int tokens_used, tokens_alloc; const char **tokens; }; struct file * new_file (const char *fname) { struct file *file; file = xnew (struct file, 1); file->fd = fopen (fname, "r"); if (!file->fd) { if (errno == ENOENT) { xfree (file); return NULL; } else { fprintf (stderr, "%s: open failed (%s)\n", fname, strerror (errno)); exit (1); } } file->fname = xstrdup (fname); file->line_no = 0; file->line_used = 0; file->line_alloc = 80; file->line = xnew (char, file->line_alloc); file->tokens_used = 0; file->tokens_alloc = 80; file->tokens = xnew (const char *, file->tokens_alloc); return file; } void delete_file (struct file *file) { fclose (file->fd); xfree (file->tokens); xfree (file->line); xfree (file->fname); xfree (file); } const char * file_name (const struct file *file) { return file->fname; } static void file_store_char (struct file *file, char c) { if (file->line_used >= file->line_alloc) { file->line_alloc += 80; file->line = xrenew (char, file->line, file->line_alloc); } file->line[file->line_used++] = c; } static void file_start_token (struct file *file) { file_store_char (file, '\0'); if (file->tokens_used >= file->tokens_alloc) { file->tokens_alloc += 80; file->tokens = xrenew (const char *, file->tokens, file->tokens_alloc); } file->tokens[file->tokens_used++] = file->line + file->line_used; } void file_error (struct file *file, const char *format, ...) /* Abort the program with an error message. */ { va_list ap; va_start (ap, format); fprintf (stderr, "%s:%d: ", file->fname, file->line_no); vfprintf (stderr, format, ap); fprintf (stderr, ", aborting\n"); va_end (ap); exit (1); } void file_message (struct file *file, const char *format, ...) /* print an error message */ { va_list ap; va_start (ap, format); fprintf (stderr, "%s:%d: ", file->fname, file->line_no); vfprintf (stderr, format, ap); fprintf (stderr, "\n"); va_end (ap); } int file_read (struct file *file, const char *const**w_ptr, int *n_ptr) /* Read a new input line and convert it into tokens. * * All lines must be terminated by an end of line. The function * returns 0 on end of file. Otherwise 1 is returned and * '*w_ptr' contains '*n_ptr' tokens of a complete, non-empty input * line. */ { enum { s_start, s_token, s_space, s_string, s_comment } state; int c, done; file->line_no += 1; file->line_used = 0; file->tokens_used = 0; state = s_start; done = 0; while (!done) { c = fgetc (file->fd); if (c == EOF && ferror(file->fd) != 0) { fprintf (stderr, "%s:%d: read failed (%s)\n", file->fname, file->line_no, strerror (errno)); exit (1); } switch (state) { case s_start: if (c == EOF) { done = 1; } else if (c == '\n') { file->line_no += 1; } else if (isspace (c)) { /* do nothing */ } else if (c == '#') { state = s_comment; } else if (c == '"') { file_start_token (file); state = s_string; } else if (isgraph (c)) { file_start_token (file); file_store_char (file, c); state = s_token; } else { fprintf (stderr, "%s:%d: unexpected character '%c', " "aborting\n", file->fname, file->line_no, c); exit (1); } break; case s_space: if (c == EOF) { fprintf (stderr, "%s:%d: warning: " "unexpected end of file\n", file->fname, file->line_no); done = 1; } else if (c == '\n' || c == '\r') { done = 1; } else if (isspace (c)) { /* do nothing */ } else if (c == '#') { state = s_comment; } else if (c == '"') { file_start_token (file); state = s_string; } else if (isgraph (c)) { file_start_token (file); file_store_char (file, c); state = s_token; } else { fprintf (stderr, "%s:%d: unexpected character '%c', " "aborting\n", file->fname, file->line_no, c); exit (1); } break; case s_token: if (c == EOF) { fprintf (stderr, "%s:%d: warning: " "unexpected end of file\n", file->fname, file->line_no); done = 1; } else if (c == '\n' || c == '\r') { done = 1; } else if (isspace (c)) { state = s_space; } else if (c == '#') { state = s_comment; } else if (c == '"') { state = s_string; } else if (isgraph (c)) { file_store_char (file, c); } else { fprintf (stderr, "%s:%d: unexpected character '%c', " "aborting\n", file->fname, file->line_no, c); exit (1); } break; case s_string: if (c == EOF || c == '\n' || c == '\r') { file_error (file, "unterminated string"); } else if (c == '"') { state = s_token; } else { file_store_char (file, c); } break; case s_comment: if (c == EOF) { fprintf (stderr, "%s:%d: warning: " "unexpected end of file\n", file->fname, file->line_no); done = 1; } else if (c == '\n' || c == '\r') { if (file->tokens_used > 0) { done = 1; } else { file->line_no += 1; state = s_start; } } else { /* do nothing */ } break; } } file_store_char (file, '\0'); *w_ptr = file->tokens; *n_ptr = file->tokens_used; return (c != EOF); } /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/plot-cdf.c0000644000175000017500000000517610571555774011464 00000000000000/* plot-cdf.c - plot cumulative distribution functions * * Copyright (C) 2006 Jochen Voss, Andreas Voss. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #include #include #include #ifndef _WIN32 #include #endif #include #include "fast-dm.h" #define N 500 int main (int argc, char **argv) { struct F_calculator *fc; double para[p_count], z, precision; double dt = 5.0/N; double F[2*N+1]; clock_t start, stop; int optc, i; para[p_a] = 1.0; z = 0.5; para[p_v] = 0.0; para[p_t0] = 0.3; para[p_sz] = 0.0; para[p_sv] = 0.0; para[p_st0] = 0.0; precision = 3; #ifndef _WIN32 while ((optc = getopt (argc, argv, "a:z:v:t:Z:V:T:p:")) != -1) { switch (optc) { case 'a': para[p_a] = atof (optarg); break; case 'z': z = atof (optarg); break; case 'v': para[p_v] = atof (optarg); break; case 't': para[p_t0] = atof (optarg); break; case 'Z': para[p_sz] = atof (optarg); break; case 'V': para[p_sv] = atof (optarg); break; case 'T': para[p_st0] = atof (optarg); break; case 'p': precision = atof(optarg); break; } } #endif fprintf (stderr, "a = %g\n", para[p_a]); fprintf (stderr, "z = %g\n", z); fprintf (stderr, "v = %g\n", para[p_v]); fprintf (stderr, "t0 = %g\n", para[p_t0]); fprintf (stderr, "sz = %g\n", para[p_sz]); fprintf (stderr, "sv = %g\n", para[p_sv]); fprintf (stderr, "st0 = %g\n", para[p_st0]); fprintf (stderr, "precision = %g\n", precision); set_precision (precision); start = clock (); fc = F_new (para); F_start (fc, b_upper); for (i=0; i<=N; ++i) { F[N+i] = F_get_val (fc, i*dt, z); } F_start (fc, b_lower); for (i=1; i<=N; ++i) { F[N-i] = F_get_val (fc, i*dt, z); } F_delete (fc); stop = clock (); fprintf (stderr, "time = %.2f\n", (double)(stop - start) / CLOCKS_PER_SEC); for (i=0; i<=2*N; ++i) { printf ("%f %.20f\n", (i-N)*dt, F[i]); } return 0; } /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/s2test.c0000644000175000017500000000317610553673135011166 00000000000000/* s2test.c - test the simplex2 function * * Copyright (C) 2007 Jochen Voss. * * $Id$ */ #include #include #include #include "fast-dm.h" static void fn1(const double *x, double res[2], void *data) { res[0] = x[0]*x[0] + x[1]*x[1] + x[2]*x[2]; res[1] = 0; } static void fn1b(const double *x, double res[2], void *data) { res[0] = x[0]*x[0] + x[1]*x[1] + x[2]*x[2]; res[1] = x[0]+100; } static void fn2(const double *x, double res[2], void *data) { res[0] = 0; res[1] = x[0]*x[0] + x[1]*x[1] + x[2]*x[2]; } static void fn3(const double *x, double res[2], void *data) { res[0] = (x[0]<=0) ? 1-x[0] : 0; res[1] = (x[0]+1)*(x[0]+1) + x[1]*x[1] + x[2]*x[2]; } static void fn4(const double *x, double res[2], void *data) { res[0] = (x[0]>=0) ? 1+x[0] : 0; res[1] = (x[0]-1)*(x[0]-1) + x[1]*x[1] + x[2]*x[2]; } static void doit(void (*fn)(const double *x, double res[2], void *data), const char *name) { double eps[3] = { 1.0, 1.0, 1.0 }; double x[3], val[2], d; double prec = 1e-6; static int n = 1; x[0] = 10; x[1] = 2; x[2] = 3; simplex2(3, eps, prec, fn, x, val, NULL); d = fabs(x[0]); if (d < fabs(x[1])) d = fabs(x[1]); if (d < fabs(x[2])) d = fabs(x[2]); if (d <= 2*prec) { printf ("test %d (%s): %g %g -> ok\n", n++, name, val[0], val[1]); } else { printf ("test %d (%s): x=(%g,%g,%g), val=(%g,%g) -> failed\n", n++, name, x[0], x[1], x[2], val[0], val[1]); } } int main () { doit(fn1, "only first value set"); doit(fn1b, "first value used, second ignored"); doit(fn2, "only second value set"); doit(fn3, "penalise x[0]<=0"); doit(fn4, "penalise x[0]>=0"); return 0; } fast-dm-26/tune-local.c0000644000175000017500000001375110574242170011777 00000000000000/* tune-local.c - * * Copyright (C) 2007 Jochen Voss * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA */ #include #include #include #include #include #include "fast-dm.h" #include "measure.h" #include "jvrandom.h" static inline long dgels (char TRANS, long M, long N, long NRHS, double *A, long LDA, double *B, long LDB, double *WORK, long LWORK) { extern void dgels_ (const char *TRANSp, const long *Mp, const long *Np, const long *NRHSp, double *A, const long *LDAp, double *B, const long *LDBp, double *WORK, const long *LWORKp, long *INFOp); long info; dgels_ (&TRANS, &M, &N, &NRHS, A, &LDA, B, &LDB, WORK, &LWORK, &info); return info; } static inline double dnrm2 (long N, const double *X, long INCX) { extern double dnrm2_ (const long *Np, const double *X, const long *INCXp); return dnrm2_ (&N, X, &INCX); } static inline double ddot(long n, const double *dx, long incx, const double *dy, long incy) { extern double ddot_(const long *np, const double *dx, const long *incxp, const double *dy, const long *incyp); return ddot_(&n, dx, &incx, dy, &incy); } int main (int argc, char **argv) { double data[7000], rhs[2000], param[7], error_target; int k, i; init_noise (time (NULL)); init_ds(); error_target = pow(10, -3.0); set_precision(-log10(error_target)); param[0] = log(TUNE_PDE_DT_MIN); param[1] = log(TUNE_PDE_DT_SCALE); param[2] = log(TUNE_PDE_DT_MAX); param[3] = log(TUNE_DZ); param[4] = log(TUNE_DV); param[5] = log(TUNE_DT0); param[6] = 1; for (k=0; k<10000; ++k) { int d0; double f1, f2, err1, cost1, dp[7], f6, err2, cost2, f7; /* output 1 */ printf("\tTUNE_PDE_DT_MIN = %g;\n", exp(param[0])); printf("\tTUNE_PDE_DT_SCALE = %g;\n", exp(param[1])); printf("\tTUNE_PDE_DT_MAX = %g;\n", exp(param[2])); printf("\tTUNE_DZ = %g;\n", exp(param[3])); printf("\tTUNE_DV = %g;\n", exp(param[4])); printf("\tTUNE_DT0 = %g;\n", exp(param[5])); /* data acquisition */ for (d0=0; d0<1000; ++d0) { double err, cost, v0[7]; memcpy(v0, param, 7*sizeof(double)); for (i=0; i<6; ++i) v0[i] += NOISE(0.02); doit(v0, &err, &cost); for (i=0; i<7; ++i) data[1000*i+d0] = v0[i]; rhs[d0] = err; rhs[d0+1000] = cost; } /* data analysis */ { double m0[7000], f0; long lwork; double *work; memcpy (m0, data, 7000*sizeof(double)); dgels('N', 1000, 7, 2, m0, 1000, rhs, 1000, &f0, -1); lwork = f0+0.5; work = malloc(lwork*sizeof(double)); dgels('N', 1000, 7, 2, m0, 1000, rhs, 1000, work, lwork); free(work); } f1 = dnrm2(6, rhs, 1); f2 = dnrm2(6, rhs+1000, 1); err1 = ddot(7, param, 1, rhs, 1); cost1 = ddot(7, param, 1, rhs+1000, 1); if (k%2 == 0) { double f3, f4; f3 = log(error_target)-err1; if (f3>0) { memcpy(dp, rhs+1000, 6*sizeof(double)); } else { memcpy(dp, rhs, 6*sizeof(double)); } f4 = ddot(6, dp, 1, rhs, 1); for (i=0; i<6; ++i) dp[i] *= f3/f4; } else { double f5; f5 = ddot(6, rhs, 1, rhs+1000, 1); for (i=0; i<6; ++i) dp[i] = rhs[i]*f5/(f1*f1); for (i=0; i<6; ++i) dp[i] -= rhs[i+1000]; for (i=0; i<6; ++i) dp[i] *= 0.05; } f6 = dnrm2(6, dp, 1); if (f6 > 0.02) for (i=0; i<6; ++i) dp[i] *= 0.02/f6; dp[6] = 0; err2 = 0; for (i=0; i<7; ++i) err2 += (param[i]+dp[i])*rhs[i]; cost2 = 0; for (i=0; i<7; ++i) cost2 += (param[i]+dp[i])*rhs[i+1000]; /* output 2 */ printf("\t/* %gm CYC, error=%g (from %d samples) */\n", exp(cost1), exp(err1), 1000); printf("\n"); f7 = ddot(6, rhs, 1, rhs+1000, 1); printf("cos(phi) = %g\n", f7/(f2*f1)); printf("\n"); printf("param................err ......cost ........dp\n"); printf("PDE_DT_MIN %10.2f %10.2f %10.3f\n", rhs[0]/f1, rhs[1000]/f2, dp[0]); printf("PDE_DT_SCALE %10.2f %10.2f %10.3f\n", rhs[1]/f1, rhs[1001]/f2, dp[1]); printf("PDE_DT_MAX %10.2f %10.2f %10.3f\n", rhs[2]/f1, rhs[1002]/f2, dp[2]); printf("DZ %10.2f %10.2f %10.3f\n", rhs[3]/f1, rhs[1003]/f2, dp[3]); printf("DV %10.2f %10.2f %10.3f\n", rhs[4]/f1, rhs[1004]/f2, dp[4]); printf("DT0 %10.2f %10.2f %10.3f\n", rhs[5]/f1, rhs[1005]/f2, dp[5]); printf("\n"); printf("\t/* %gm CYC, error=%g (estimated) */\n", exp(cost2), exp(err2)); if (k%2 == 1) { char s0[80]; FILE *fd; snprintf(s0, 80, "tune%+#.2g.dat", log10(error_target)); fd = fopen(s0, "w"); fprintf(fd, "\t/* %gm CYC, error=%g (from %d samples) */\n", exp(cost1), exp(err1), 1000); fprintf(fd, "\tTUNE_PDE_DT_MIN = %g;\n", exp(param[0])); fprintf(fd, "\tTUNE_PDE_DT_SCALE = %g;\n", exp(param[1])); fprintf(fd, "\tTUNE_PDE_DT_MAX = %g;\n", exp(param[2])); fprintf(fd, "\tTUNE_DZ = %g;\n", exp(param[3])); fprintf(fd, "\tTUNE_DV = %g;\n", exp(param[4])); fprintf(fd, "\tTUNE_DT0 = %g;\n", exp(param[5])); fclose(fd); } /* update */ for (i=0; i<7; ++i) param[i] += dp[i]; } return 0; } fast-dm-26/measure.c0000644000175000017500000000756510571555774011421 00000000000000/* measure.c - measure the effect of tuning parameter settings * * Copyright (C) 2006 Jochen Voss, Andreas Voss. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #include #include #include #include #include #include #include "fast-dm.h" #include "measure.h" static const int N = 500; #define DS_COUNT 11 /********************************************************************** * read the reference data */ struct ds { double para[p_count], z; double *G; }; static void read_params(const char *fname, double *para, double *z) { FILE *fp; fp = fopen(fname, "r"); if (! fp) { perror("cannot open parameter file"); exit(1); } fscanf(fp, "a = %lf\n", para+p_a); fscanf(fp, "z = %lf\n", z); fscanf(fp, "v = %lf\n", para+p_v); fscanf(fp, "t0 = %lf\n", para+p_t0); fscanf(fp, "sz = %lf\n", para+p_sz); fscanf(fp, "sv = %lf\n", para+p_sv); fscanf(fp, "st0 = %lf\n", para+p_st0); fclose(fp); } static void read_data(const char *fname, int n, double *data) { FILE *fp; int i; fp = fopen(fname, "r"); if (! fp) { perror("cannot open target data file"); exit(1); } for (i=0; ipara, &ds->z); ds->G = xnew(double, 2*N+1); snprintf(buffer, 80, "%d.dat", i); read_data(buffer, 2*N+1, ds->G); } /********************************************************************** * optmise the parameters */ FILE *logfile = NULL; static void eval_one(const struct ds *ds, double *T_ret, double *d_ret) { int counters [1] = { PAPI_TOT_CYC }; double *F; struct F_calculator *fc; double dist, dt = 5.0/N; long_long elapsed; int i; F = xnew(double, 2*N+1); PAPI_start_counters(counters, 1); fc = F_new(ds->para); F_start(fc, b_upper); for (i=0; i<=N; ++i) { F[N+i] = F_get_val(fc, i*dt, ds->z); } F_start(fc, b_lower); for (i=1; i<=N; ++i) { F[N-i] = F_get_val(fc, i*dt, ds->z); } F_delete(fc); PAPI_stop_counters(&elapsed, 1); *T_ret = elapsed / 1e6; dist = 0; for (i=0; i<2*N+1; ++i) { double d = fabs(F[i]-ds->G[i]); if (d > dist) dist = d; } *d_ret = dist; xfree(F); } static struct ds ds[DS_COUNT]; void init_ds(void) { int i, nc; set_precision(4.0); for (i=0; i dist) dist = d[i]; } *err_ret = log(dist); *cost_ret = log(elapsed); } /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/measure.h0000644000175000017500000000040110571555774011404 00000000000000/* measure.h - declarations for the functions from measure.c */ #ifndef FILE_MEASURE_H_SEEN #define FILE_MEASURE_H_SEEN extern void init_ds(void); extern void doit(const double *param, double *err_ret, double *cost_ret); #endif /* FILE_MEASURE_H_SEEN */ fast-dm-26/tune-params.c0000644000175000017500000001622610571555774012206 00000000000000/* tune-params.c - tune the adjustable parameters of fast-dm * * Copyright (C) 2006 Jochen Voss, Andreas Voss. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #include #include #include #include #include #include #include #include #include #include "fast-dm.h" static const int N = 500; #define DS_COUNT 11 /********************************************************************** * read the reference data */ struct ds { double para[p_count], z; double *G; }; static void read_params(const char *fname, double *para, double *z) { FILE *fp; fp = fopen(fname, "r"); if (! fp) { perror("cannot open parameter file"); exit(1); } fscanf(fp, "a = %lf\n", para+p_a); fscanf(fp, "z = %lf\n", z); fscanf(fp, "v = %lf\n", para+p_v); fscanf(fp, "t0 = %lf\n", para+p_t0); fscanf(fp, "sz = %lf\n", para+p_sz); fscanf(fp, "sv = %lf\n", para+p_sv); fscanf(fp, "st0 = %lf\n", para+p_st0); fclose(fp); } static void read_data(const char *fname, int n, double *data) { FILE *fp; int i; fp = fopen(fname, "r"); if (! fp) { perror("cannot open target data file"); exit(1); } for (i=0; ipara, &ds->z); ds->G = xnew(double, 2*N+1); snprintf(buffer, 80, "%d.dat", i); read_data(buffer, 2*N+1, ds->G); } /********************************************************************** * optmise the parameters */ FILE *logfile = NULL; static void write_params(double elapsed, double dist, double accuracy) { char buffer[80]; static double best_elapsed = DBL_MAX; static double best_dist = DBL_MAX; FILE *fd; printf("%g %g %g %g %g %g -> %g*%g %g\n", TUNE_PDE_DT_MIN, TUNE_PDE_DT_MAX, TUNE_PDE_DT_SCALE, TUNE_DZ, TUNE_DV, TUNE_DT0, dist/accuracy, accuracy, elapsed); if (logfile) { fprintf(logfile, "%g %g %g %g %g %g %g %g\n", TUNE_PDE_DT_MIN, TUNE_PDE_DT_MAX, TUNE_PDE_DT_SCALE, TUNE_DZ, TUNE_DV, TUNE_DT0, dist, elapsed); fflush(logfile); } if (best_dist <= accuracy) { /* find the fastest among the valid parameter sets */ if (dist > accuracy || elapsed >= best_elapsed) return; } else { /* try to get into the valid parameter range */ if (dist > best_dist) return; } snprintf(buffer, 80, "tune-%#.2g.dat", -log10(accuracy)); fd = fopen(buffer, "w"); fprintf(fd, "\t/* %gm CYC, error <= %g */\n", elapsed, dist); fprintf(fd, "\tTUNE_PDE_DT_MIN = %g;\n", TUNE_PDE_DT_MIN); fprintf(fd, "\tTUNE_PDE_DT_MAX = %g;\n", TUNE_PDE_DT_MAX); fprintf(fd, "\tTUNE_PDE_DT_SCALE = %g;\n", TUNE_PDE_DT_SCALE); fprintf(fd, "\tTUNE_DZ = %g;\n", TUNE_DZ); fprintf(fd, "\tTUNE_DV = %g;\n", TUNE_DV); fprintf(fd, "\tTUNE_DT0 = %g;\n", TUNE_DT0); fclose(fd); best_elapsed = elapsed; best_dist = dist; } static void eval_one(const struct ds *ds, double *T_ret, double *d_ret) { int counters [1] = { PAPI_TOT_CYC }; double *F; struct F_calculator *fc; double dist, dt = 5.0/N; long_long elapsed; int i; F = xnew(double, 2*N+1); PAPI_start_counters(counters, 1); fc = F_new(ds->para); F_start(fc, b_upper); for (i=0; i<=N; ++i) { F[N+i] = F_get_val(fc, i*dt, ds->z); } F_start(fc, b_lower); for (i=1; i<=N; ++i) { F[N-i] = F_get_val(fc, i*dt, ds->z); } F_delete(fc); PAPI_stop_counters(&elapsed, 1); *T_ret = elapsed / 1e6; dist = 0; for (i=0; i<2*N+1; ++i) { double d = fabs(F[i]-ds->G[i]); if (d > dist) dist = d; } *d_ret = dist; xfree(F); } struct parameters { const struct ds *ds; double accuracy; }; static void eval_all(const struct parameters *p, double *e_ret, double *d_ret) { double elapsed, dist, d[DS_COUNT], e[DS_COUNT]; int i; for (i=0; ids+i, e+i, d+i); elapsed = 0; dist = 0; for (i=0; iaccuracy); if (dist > p->accuracy) res[0] = dist / p->accuracy; else res[0] = 0; res[1] = elapsed; } static sigjmp_buf leave_loop; static void handle_alarm(int signum) { siglongjmp(leave_loop, 1); } int main() { struct ds ds[DS_COUNT]; struct parameters p; double tune[6], tuneps[6]; int nc, i; for (i=0; i, 2002 * * A portable implementation of the Gaussian error function erf(), * using the Chebyshev algorithm. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: erf.c,v 1.3 2002/03/21 18:55:54 gtw Exp $ */ #include double erf (double x) { double t, z, retval; z = fabs( x ); t = 1.0 / ( 1.0 + 0.5 * z ); retval = t * exp( -z * z - 1.26551223 + t * ( 1.00002368 + t * ( 0.37409196 + t * ( 0.09678418 + t * ( -0.18628806 + t * ( 0.27886807 + t * ( -1.13520398 + t * ( 1.48851587 + t * ( -0.82215223 + t * 0.1708727 ) ) ) ) ) ) ) ) ); if( x < 0.0 ) return retval - 1.0; return 1.0 - retval; } /* * Local Variables: * c-file-style: "linux" * End: */ fast-dm-26/win32dir.c0000644000175000017500000001355510524373062011377 00000000000000/* win32dir.c - emulate opendir/readdir/closedir on MS Windows systems * * This is a modified version of the file build/win32/dirent/dirent.c * as distributed by glib-2.12.4. The original file comes with the * following notice: * * dirent.c * This file has no copyright assigned and is placed in the Public * Domain. This file is a part of the mingw-runtime package. No * warranty is given; refer to the file DISCLAIMER within the * package. * * Derived from DIRLIB.C by Matt J. Weinstein * This note appears in the DIRLIB.H * DIRLIB.H by M. J. Weinstein Released to public domain 1-Jan-89 * * Updated by Jeremy Bettis * Significantly revised and rewinddir, seekdir and telldir added by * Colin Peters * * All changed from the original file are copyright (C) 2006 Jochen * Voss and can be redistributed 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. */ #include #include #include #include #include #define WIN32_LEAN_AND_MEAN #include /* for GetFileAttributes */ #include #include "win32dir.h" #ifdef _UNICODE #define _tdirent _wdirent #define _TDIR _WDIR #define _topendir _wopendir #define _tclosedir _wclosedir #define _treaddir _wreaddir #define _trewinddir _wrewinddir #define _ttelldir _wtelldir #define _tseekdir _wseekdir #else #define _tdirent dirent #define _TDIR DIR #define _topendir opendir #define _tclosedir closedir #define _treaddir readdir #define _trewinddir rewinddir #define _ttelldir telldir #define _tseekdir seekdir #endif #define SUFFIX _T("*") #define SLASH _T("\\") /* * opendir * * Returns a pointer to a DIR structure appropriately filled in to begin * searching a directory. */ _TDIR * _topendir (const _TCHAR *szPath) { _TDIR *nd; unsigned int rc; _TCHAR szFullPath[MAX_PATH]; errno = 0; if (!szPath) { errno = EFAULT; return (_TDIR *) 0; } if (szPath[0] == _T('\0')) { errno = ENOTDIR; return (_TDIR *) 0; } /* Attempt to determine if the given path really is a directory. */ rc = GetFileAttributes (szPath); if (rc == (unsigned int)-1) { /* call GetLastError for more error info */ errno = ENOENT; return (_TDIR *) 0; } if (!(rc & FILE_ATTRIBUTE_DIRECTORY)) { /* Error, entry exists but not a directory. */ errno = ENOTDIR; return (_TDIR *) 0; } /* Make an absolute pathname. */ _tfullpath (szFullPath, szPath, MAX_PATH); /* Allocate enough space to store DIR structure and the complete * directory path given. */ nd = (_TDIR *) malloc (sizeof (_TDIR) + (_tcslen(szFullPath) + _tcslen (SLASH) + _tcslen(SUFFIX) + 1) * sizeof(_TCHAR)); if (!nd) { /* Error, out of memory. */ errno = ENOMEM; return (_TDIR *) 0; } /* Create the search expression. */ _tcscpy (nd->dd_name, szFullPath); /* Add on a slash if the path does not end with one. */ if (nd->dd_name[0] != _T('\0') && nd->dd_name[_tcslen (nd->dd_name) - 1] != _T('/') && nd->dd_name[_tcslen (nd->dd_name) - 1] != _T('\\')) { _tcscat (nd->dd_name, SLASH); } /* Add on the search pattern */ _tcscat (nd->dd_name, SUFFIX); /* Initialize handle to -1 so that a premature closedir doesn't try * to call _findclose on it. */ nd->dd_handle = -1; /* Initialize the status. */ nd->dd_stat = 0; /* Initialize the dirent structure. ino and reclen are invalid under * Win32, and name simply points at the appropriate part of the * findfirst_t structure. */ nd->dd_dir.d_ino = 0; nd->dd_dir.d_reclen = 0; nd->dd_dir.d_namlen = 0; memset (nd->dd_dir.d_name, 0, FILENAME_MAX); return nd; } /* * readdir * * Return a pointer to a dirent structure filled with the information on the * next entry in the directory. */ struct _tdirent * _treaddir (_TDIR * dirp) { errno = 0; /* Check for valid DIR struct. */ if (!dirp) { errno = EFAULT; return (struct _tdirent *) 0; } if (dirp->dd_stat < 0) { /* We have already returned all files in the directory * (or the structure has an invalid dd_stat). */ return (struct _tdirent *) 0; } else if (dirp->dd_stat == 0) { /* We haven't started the search yet. */ /* Start the search */ dirp->dd_handle = _tfindfirst (dirp->dd_name, &(dirp->dd_dta)); if (dirp->dd_handle == -1) { /* Whoops! Seems there are no files in that * directory. */ dirp->dd_stat = -1; } else { dirp->dd_stat = 1; } } else { /* Get the next search entry. */ if (_tfindnext (dirp->dd_handle, &(dirp->dd_dta))) { /* We are off the end or otherwise error. _findnext sets errno to ENOENT if no more file Undo this. */ DWORD winerr = GetLastError(); if (winerr == ERROR_NO_MORE_FILES) errno = 0; _findclose (dirp->dd_handle); dirp->dd_handle = -1; dirp->dd_stat = -1; } else { /* Update the status to indicate the correct * number. */ dirp->dd_stat++; } } if (dirp->dd_stat > 0) { /* Successfully got an entry. Everything about the file is * already appropriately filled in except the length of the * file name. */ dirp->dd_dir.d_namlen = _tcslen (dirp->dd_dta.name); _tcscpy (dirp->dd_dir.d_name, dirp->dd_dta.name); return &dirp->dd_dir; } return (struct _tdirent *) 0; } /* * closedir * * Frees up resources allocated by opendir. */ int _tclosedir (_TDIR * dirp) { int rc; errno = 0; rc = 0; if (!dirp) { errno = EFAULT; return -1; } if (dirp->dd_handle != -1) { rc = _findclose (dirp->dd_handle); } /* Delete the dir structure. */ free (dirp); return rc; } fast-dm-26/win32dir.h0000644000175000017500000000576710524352422011407 00000000000000/* win32dir.h - emulate opendir/readdir/closedir on MS Windows systems * * This is a modified version of the file build/win32/dirent/dirent.h * as distributed by glib-2.12.4. The original file comes with the * following notice: * * DIRENT.H (formerly DIRLIB.H) This file has no copyright assigned * and is placed in the Public Domain. This file is a part of the * mingw-runtime package. No warranty is given; refer to the file * DISCLAIMER within the package. * * All changed from the original file are copyright (C) 2006 Jochen * Voss and can be redistributed 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. */ #ifndef FILE_WIN32DIR_H_SEEN #define FILE_WIN32DIR_H_SEEN #include #include struct dirent { long d_ino; /* Always zero. */ unsigned short d_reclen; /* Always zero. */ unsigned short d_namlen; /* Length of name in d_name. */ char d_name[FILENAME_MAX]; /* File name. */ }; /* * This is an internal data structure. Good programmers will not use it * except as an argument to one of the functions below. * dd_stat field is now int (was short in older versions). */ typedef struct { /* disk transfer area for this dir */ struct _finddata_t dd_dta; /* dirent struct to return from dir (NOTE: this makes this thread * safe as long as only one thread uses a particular DIR struct at * a time) */ struct dirent dd_dir; /* _findnext handle */ long dd_handle; /* * Status of search: * 0 = not started yet (next entry to read is first entry) * -1 = off the end * positive = 0 based index of next entry */ int dd_stat; /* given path for dir with search pattern (struct is extended) */ char dd_name[1]; } DIR; DIR* __cdecl opendir (const char*); struct dirent* __cdecl readdir (DIR*); int __cdecl closedir (DIR*); /* wide char versions */ struct _wdirent { long d_ino; /* Always zero. */ unsigned short d_reclen; /* Always zero. */ unsigned short d_namlen; /* Length of name in d_name. */ wchar_t d_name[FILENAME_MAX]; /* File name. */ }; /* * This is an internal data structure. Good programmers will not use it * except as an argument to one of the functions below. */ typedef struct { /* disk transfer area for this dir */ struct _wfinddata_t dd_dta; /* dirent struct to return from dir (NOTE: this makes this thread * safe as long as only one thread uses a particular DIR struct at * a time) */ struct _wdirent dd_dir; /* _findnext handle */ long dd_handle; /* * Status of search: * 0 = not started yet (next entry to read is first entry) * -1 = off the end * positive = 0 based index of next entry */ int dd_stat; /* given path for dir with search pattern (struct is extended) */ wchar_t dd_name[1]; } _WDIR; _WDIR* __cdecl _wopendir (const wchar_t*); struct _wdirent* __cdecl _wreaddir (_WDIR*); int __cdecl _wclosedir (_WDIR*); #endif /* FILE_WIN32DIR_H_SEEN */ fast-dm-26/tune-local.py0000755000175000017500000001321710571555774012223 00000000000000#! /usr/bin/env python # tune-local.py - autogenerate tune-local.c using CSimGen # # copyright (c) 2007 Jochen Voss # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 USA from csimgen.value import value from csimgen.code import Source from csimgen.vector import ConstVector, ExplicitVector source = Source("tune-local.c", license="GPL2") source.add_include('"fast-dm.h"') source.add_include('"measure.h"') main = source.main() main.init_noise() main.funcall("init_ds") N = 1000 data = main.define_matrix(N, 7, name="data", transposed=True) rhs = main.define_matrix(N, 2, name="rhs", transposed=True) param = main.define_vector(7, name="param") error_target = main.define_double(name="error_target", init=main.pow10(-3.0)) main.funcall("set_precision", -main.log10(error_target)) main.store_double(param[0], main.log(value("TUNE_PDE_DT_MIN"))) main.store_double(param[1], main.log(value("TUNE_PDE_DT_SCALE"))) main.store_double(param[2], main.log(value("TUNE_PDE_DT_MAX"))) main.store_double(param[3], main.log(value("TUNE_DZ"))) main.store_double(param[4], main.log(value("TUNE_DV"))) main.store_double(param[5], main.log(value("TUNE_DT0"))) main.store_double(param[6], 1) ###################################################################### k = main.define_int(name="k") mainloop = main.loop(k, 0, 10000) mainloop.statement("/* output 1 */") labels = [ "PDE_DT_MIN", "PDE_DT_SCALE", "PDE_DT_MAX", "DZ", "DV", "DT0" ] for i,label in enumerate(labels): mainloop.output_string(r'"\tTUNE_%s = %%g;\n"'%label, mainloop.exp(param[i])) ###################################################################### mainloop.statement("", "/* data acquisition */") i = mainloop.define_int() loop = mainloop.loop(i, 0, N) err = loop.define_double(name="err") cost = loop.define_double(name="cost") noise = ConstVector(6, "NOISE(0.02)") p = loop.define_vector(7, init=param) loop.iadd_vector(p[0:6], noise) loop.funcall("doit", p, err.reference(), cost.reference()) drow = data.get_row(i) loop.store_vector(drow, p) loop.store_double(rhs[i,0], err) loop.store_double(rhs[i,1], cost) ###################################################################### mainloop.statement("", "/* data analysis */") mainloop.least_squares_matrix_vector(data, rhs) err = rhs.get_column(0)[0:6] err_l = mainloop.norm2_vector(err) cost = rhs.get_column(1)[0:6] cost_l = mainloop.norm2_vector(cost) err1 = mainloop.dot_vector_vector(param, rhs.get_column(0)[0:7], name="err1") cost1 = mainloop.dot_vector_vector(param, rhs.get_column(1)[0:7], name="cost1") dp = mainloop.define_vector(7, name="dp") case1,case2 = mainloop.ifelse("%s%%2 == 0"%k) # case 1: fix precision delta = case1.define_double(init=case1.log(error_target)-err1); c1,c2 = case1.ifelse("%s>0"%delta) c1.store_vector(dp[0:6], cost) c2.store_vector(dp[0:6], err) case1.imult_vector(dp[0:6], delta/case1.dot_vector_vector(dp[0:6],rhs.get_column(0)[0:6])) # case 2: improve cost q = case2.dot_vector_vector(err, cost) case2.store_vector(dp[0:6], err*q/(err_l*err_l)) case2.isub_vector(dp[0:6], cost) case2.imult_vector(dp[0:6], 0.05) dp_l = mainloop.norm2_vector(dp[0:6]) c = mainloop.cond("%s > 0.02"%dp_l) c.imult_vector(dp[0:6], 0.02/dp_l) mainloop.store_double(dp[6], 0) err2 = mainloop.dot_vector_vector(param+dp, rhs.get_column(0)[0:7], name="err2") cost2 = mainloop.dot_vector_vector(param+dp, rhs.get_column(1)[0:7], name="cost2") ###################################################################### mainloop.statement("", "/* output 2 */") mainloop.output_string(r'"\t/* %gm CYC, error=%g (from %d samples) */\n"', mainloop.exp(cost1), mainloop.exp(err1), N) mainloop.output_string(r'"\n"') mainloop.output_string(r'"cos(phi) = %g\n"', mainloop.dot_vector_vector(err,cost)/(cost_l*err_l)) mainloop.output_string(r'"\n"') mainloop.output_string(r'"param................err ......cost ........dp\n"') for i,label in enumerate(labels): mainloop.output_string(r'"%-13s %%10.2f %%10.2f %%10.3f\n"'%label, err[i]/err_l, cost[i]/cost_l, dp[i]) mainloop.output_string(r'"\n"') mainloop.output_string(r'"\t/* %gm CYC, error=%g (estimated) */\n"', mainloop.exp(cost2), mainloop.exp(err2)) mainloop.statement("") c = mainloop.cond("%s%%2 == 1"%k) fname = c.define_string(80, '"tune%+#.2g.dat"', c.log10(error_target)) fd = c.define_file("fd", fname=fname, fmode="w") c.output_string(r'"\t/* %gm CYC, error=%g (from %d samples) */\n"', c.exp(cost1), c.exp(err1), N, fd=fd) for i,label in enumerate(labels): c.output_string(r'"\tTUNE_%s = %%g;\n"'%label, c.exp(param[i]), fd=fd) c.close_file(fd) ###################################################################### mainloop.statement("", "/* update */") mainloop.iadd_vector(param, dp) source.save()